Author Topic: Mosaic Problems . . .  (Read 1439 times)

Offline Terry Danks

  • PixInsight Addict
  • ***
  • Posts: 137
Mosaic Problems . . .
« on: 2019 September 06 16:47:11 »
I am trying to put together a mosaic using Image Solver, MBC and GMM.
All images successfully image solved and have registered WSC files produced by the MBC tool.
But too often I am seeing an error in the GMM process:

Error states "Current image width differs from first image width."
I'm not sure how to get around this?
Any ideas?

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
Re: Mosaic Problems . . .
« Reply #1 on: 2019 September 06 17:35:14 »
can you open them all and see what dimensions they have? i have seen this error a long, long time ago when using StarAlignment to make mosaics but i've never seen that with MBC.

rob

Offline Terry Danks

  • PixInsight Addict
  • ***
  • Posts: 137
Re: Mosaic Problems . . .
« Reply #2 on: 2019 September 06 18:29:43 »
Hi Rob:

Yes, I can open them all. They look "normal." I may be imagining things but it seems not consistent?
I put a screen shot in dropbox:  https://www.dropbox.com/s/bornxv1cknv63ud/Capture3.JPG?dl=0

Of six frames, I can successfully produce a mosaic for frames 1,2&3. Also a successful mosaic for frames 6,7&8. I show both
of these in the screen shot.
But running GMM on all six frames results in the error.

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
Re: Mosaic Problems . . .
« Reply #3 on: 2019 September 06 20:07:12 »
i guess what i meant was to open each output from MBC and see what the X/Y dimensions are.

can you upload the 6 un-registered masters? i can try to reproduce it.

rob

Offline Terry Danks

  • PixInsight Addict
  • ***
  • Posts: 137
Re: Mosaic Problems . . .
« Reply #4 on: 2019 September 07 05:55:49 »
Hi Again, Rob:

Dropbox link to the 6 frames in question:
https://www.dropbox.com/sh/v6aejf0tzqf9urz/AABlFrEOOTtpnRXHARDwpU7Xa?dl=0

Note they are drizzled and about 145MB apiece. Also linear with default STF applied.

Facing Hurricane Dorian here later today and may be offline for a few days depending on power availability.

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
Re: Mosaic Problems . . .
« Reply #5 on: 2019 September 07 12:02:32 »
ok - well that's a "good" thing in the sense that the registered images are absolutely massive and tied up my machine for quite a while in MBC. without really thinking about it i tried to load them into blink and PI is hanging; the registered images are 46.3GB each. i should have thought about that and adjusted the image scale in MBC when making the panels. anyway it could take me a couple of days just to suss out what's going on :)

at any rate i suppose that due to the massive size of the image (in X - Y) that perhaps there was a rounding error somewhere and the images produced by MBC could differ by a couple of pixels. we'll have to see if PI actually manages to load all of the blinked images - i have 64GB of physical memory on this machine but that's only good for 1.5 out of the 8 images and not sure if i have enough space on my disk for a VM image of that size.

rob

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
Re: Mosaic Problems . . .
« Reply #6 on: 2019 September 07 16:50:28 »
well OK, this was user error on my part, i think i needed to recalculate the size before running MBC. the enormous size is simply due to the fact that the mosaic seems to span most of the sky... lol.

at any rate all the images coming out of MBC were the same (enormous) dimensions, but i think i might be running a downrev version of PI so this is not a good test. i'll try again.

rob

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
Re: Mosaic Problems . . .
« Reply #7 on: 2019 September 08 09:53:53 »
hope you are doing OK with the hurricane.

i fixed my problem with the center coordinates of the mosaic and i was able to successfully create the panes for GMM, which did all come out to be the same size. can you load your MBC output frames into the workspace and see how the dimensions differ?

as mentioned i'm not running the latest version of PI so that could be the difference.

one thing i noticed is that there's distortions at the edges of the frames, can't tell if it's just field curvature or some other problem. the stars are also not round at the edges of the frames. but the net effect is that in lots of places there are double stars in the mosaic'd result. it might help to crop the original frames by a few hundred pixels on all of the edges that mate other frames. one nice thing about MBC is there's no requirement for the images to actually overlap.

andres would have to comment on this: i don't know if MBC tries to undo optical distortions like you have. it probably can't fix star shapes but it might be able to warp the image to undo any pincushion/barrel effects. i think i have MBC set to "fast" registration so it's possible it would do better on "high quality" - i have to test.

rob

Offline Andres.Pozo

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 927
Re: Mosaic Problems . . .
« Reply #8 on: 2019 September 08 12:02:55 »
andres would have to comment on this: i don't know if MBC tries to undo optical distortions like you have. it probably can't fix star shapes but it might be able to warp the image to undo any pincushion/barrel effects. i think i have MBC set to "fast" registration so it's possible it would do better on "high quality" - i have to test.
When the astrometry is calculated with ImageSolver with the distortion correction activated, MosaicByCoordinates generates an image with the geometric distortion fixed. It does not fix the PSF of the stars (the stars at the corners are still elongated) but the stars are moved so their position is correct for the chosen projection.

The script AlignByCoordinates has an option for creating an undistorted image.

In the case of the images of Terry Dansk, it is necessary to solve them with distortion correction. Doing this, then MBC can generate a quite good alignment in the corners. The attached GIF shows the intersection of four frames with the distortion correction activated.

Offline Terry Danks

  • PixInsight Addict
  • ***
  • Posts: 137
Re: Mosaic Problems . . .
« Reply #9 on: 2019 September 08 15:08:47 »
I lost power due to the hurricane the past 24 hours. Back now. Not sure for how long. Seems to be holding.
I have to digest what Rob and Andres have posted. Not sure I understand it all. Please note that I have been very successful in assembling eight of these drizzled Ha panels so far. IS, MBC and GMM were doing great for me! Then I "hit a wall" with that error. Not sure why.

The six images uploaded are only half of the mosiac's full width.

The registered WCS files are NOT all the same size! Frames 1, 2 & 3 are all 9177 x 13717. Frames 6, 7 & 8 are 8547 x 13818.
I appreciate your effort, Rob but my machine seems not be having any great difficulty, or taking an inordinate amount of time in handling these drizzled files. Why the registered WCS files seem of slightly different size I have no idea. Then again, I had no idea they were even supposed to be of identical size.
Seeing as how they do differ in size, is there any way forward for me in this project? Andres mentions Align By Coordinates. I will give that a try. Never used it before and did not understand what its function is.
The panels, BTW are from an FSQ106 reduced to f/3.6, 385mm EFL mounted to an STL full frame. Each panel spans about 3.4 x 5.1 degrees of sky. So, yes, the mosaic covers a lot of sky!

Offline Andres.Pozo

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 927
Re: Mosaic Problems . . .
« Reply #10 on: 2019 September 08 15:23:49 »
The registered WCS files are NOT all the same size! Frames 1, 2 & 3 are all 9177 x 13717. Frames 6, 7 & 8 are 8547 x 13818.
You must be doing something wrong. If you align the six frames using MBC at the same time, there is no way that the aligned frames have different size.

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
Re: Mosaic Problems . . .
« Reply #11 on: 2019 September 08 17:27:40 »
I lost power due to the hurricane the past 24 hours. Back now. Not sure for how long. Seems to be holding.
I have to digest what Rob and Andres have posted. Not sure I understand it all. Please note that I have been very successful in assembling eight of these drizzled Ha panels so far. IS, MBC and GMM were doing great for me! Then I "hit a wall" with that error. Not sure why.

The six images uploaded are only half of the mosiac's full width.

The registered WCS files are NOT all the same size! Frames 1, 2 & 3 are all 9177 x 13717. Frames 6, 7 & 8 are 8547 x 13818.
I appreciate your effort, Rob but my machine seems not be having any great difficulty, or taking an inordinate amount of time in handling these drizzled files. Why the registered WCS files seem of slightly different size I have no idea. Then again, I had no idea they were even supposed to be of identical size.
Seeing as how they do differ in size, is there any way forward for me in this project? Andres mentions Align By Coordinates. I will give that a try. Never used it before and did not understand what its function is.
The panels, BTW are from an FSQ106 reduced to f/3.6, 385mm EFL mounted to an STL full frame. Each panel spans about 3.4 x 5.1 degrees of sky. So, yes, the mosaic covers a lot of sky!

good to hear you're back online!

my problem was simply user error - i had been working on a mosaic of the andromeda galaxy and accidentally left the center coordinates checked for that project, hence i was asking for a mosaic all the way from andromeda to cygnus, which is quite a bit of sky. i didn't realize what i had done until after i posted that response. after i fixed that problem i got 8 reasonably-sized frames of exactly the same dimensions that GMM was perfectly happy with.

if you ran MBC on all 8 files at the same time, there's no way they should have different sizes. i was asking about the sizes because in the past, i've seen StarAlignment sometimes output mosaic panels of the size X,Y and X+1, Y, meaning the size is only off by one pixel. here something else is going on - i've never seen MBC do that. did you run 1,2,3 separately from 6,7,8 in MBC? it sounds like you did, since the mosaic image is roughly square when i run all 8 at once, and yours are rectangular.

i think you *can* run MBC multiple times on subsets of your mosaic as long as you lock down the center coordinates and pixel scale, etc. before running the second batch. otherwise, the center coordinates, rotation, pixelscale, etc. are computed from the input files given, which if you load one set in one run and another set in another run without locking that stuff, you'll definitely get different sized images centered on different places.

rob



Offline Terry Danks

  • PixInsight Addict
  • ***
  • Posts: 137
Re: Mosaic Problems . . .
« Reply #12 on: 2019 September 09 10:09:37 »
Andres and Rob:
Thanks very much for your efforts here. I think you have given me a clue. Run all panels though MBC AT THE SAME TIME!
I have NOT been doing that! I have been doing this piecemeal, trying to add new panels to those already done! Clearly, I did not understand this to be a blunder, nor its ramifications.
I will try again, using the information you have provided!

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
Re: Mosaic Problems . . .
« Reply #13 on: 2019 September 09 10:36:08 »
ah - OK. doing it piecemeal is how you do it with StarAlignment, so it's not a foreign concept...

let us know how it comes out.

rob

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: Mosaic Problems . . .
« Reply #14 on: 2019 September 09 11:38:25 »
Just a note to let you know that I am working on a new mosaic construction tool. It performs astrometry-based image alignment similar to MBC, although being implemented in C++ and parallelized, it is orders of magnitude faster. It also includes sophisticated image registration features in a similar way to StarAlignment, as well as powerful image combination algorithms that equalize overlapped regions both in brightness and texture. This tool will be released for PixInsight 1.8.7 before the end of this year.

PixInsight 1.8.7, to be released in a few weeks, includes a new version of the StarAlignment tool with a completely redesigned distortion correction algorithm. The new version of SA is already finished and its performance in terms of arbitrary distortion correction is outstanding in our tests. We achieve centipixel accuracy throughout the entire image under strong local distortions. This is a big step forward.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/