Author Topic: 2 images Mosaic question...  (Read 7058 times)

Offline Emanuele

  • PixInsight Addict
  • ***
  • Posts: 270
2 images Mosaic question...
« on: 2010 December 21 06:55:48 »
Hi all.

I am working on some Hubble fits and I am running into a problem. The Fits overlap by 10-15% I would say, but StarAlignement fails to create a mosaic of the two images. There are perhaps 6-7 stars in the overlap area, and that might be the problem.
How can I create a mosaic of the two images, by hand (using DynamicAlignment) or have StarAlignment succeed?

Thank you,
E.

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: 2 images Mosaic question...
« Reply #1 on: 2010 December 21 09:32:59 »
Hi Emanuele,

StarAlignment needs at least 6 stars shared by both images. Try defining a preview covering (roughly) the overlapped area on both images, then use StarAlignment in mosaic mode. In this way SA will restrict star matching to the areas covered by the previews, and hence there will be less uncertainty.

If that doesn't work either, then you must use DynamicAlignment. Unfortunately, DA doesn't have a mosaic mode yet (this will change in a new version), so you must carry out a bit of the work manually. This is the general procedure:

- Use the Crop tool (Geometry) to extend one of the images, so that the second image can be accommodated on it. The Crop tool allows you to specify four margins in pixels, one on each side of the image. A positive margin extends the image, while a negative margin crops it.

- Launch the DynamicAlignment tool. Select the extended image as the "source" alignment frame (#1), and the other one as "target" (#2).

- Manually define at least three alignment stars on both images. DA will work with just one star, but that won't give you a nice result. At last three stars are necessary; much better if you can select 6-8 stars.

Let me know if that works.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline Emanuele

  • PixInsight Addict
  • ***
  • Posts: 270
Re: 2 images Mosaic question...
« Reply #2 on: 2010 December 22 05:11:19 »
Juan,

thank you for your kind help.
I tried as you suggested and I can't make it work.

I have attached a screenshot of the files I am working with.


Offline Emanuele

  • PixInsight Addict
  • ***
  • Posts: 270
Re: 2 images Mosaic question...
« Reply #3 on: 2010 December 22 05:23:18 »
Here I am again.
Ok, so something happened: looking at the screenshot you can see that I think the images are aligned. The problem is that using the STF tool, the images are not stretching properly ? I am not sure what is that due to?

:)

E.

Offline Emanuele

  • PixInsight Addict
  • ***
  • Posts: 270
Re: 2 images Mosaic question...
« Reply #4 on: 2010 December 26 07:52:54 »
Any help with this ? :)

Offline Emanuele

  • PixInsight Addict
  • ***
  • Posts: 270
Re: 2 images Mosaic question...
« Reply #5 on: 2010 December 27 03:18:38 »
Juan,
can you take a look at this really really quickly?   ;D

I would appreciate it very much!

E.


Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: 2 images Mosaic question...
« Reply #6 on: 2010 December 27 03:45:00 »
Hi Emanuele,

I'll be glad to take a look if you can provide me with the raw images that you are trying to align.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline Emanuele

  • PixInsight Addict
  • ***
  • Posts: 270
Re: 2 images Mosaic question...
« Reply #7 on: 2010 December 27 05:23:39 »
Thanks Juan!

Sent you an email with the link to the files! :)

E.


Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: 2 images Mosaic question...
« Reply #8 on: 2010 December 27 10:22:00 »
Hi Emanuele

This mosaic works like a charm. The only problem is with the canvas that both images have because they have been rotated. This has been a very unfortunate decision, which complicates processing unnecessarily, and to add even more trouble, the canvases have constant values well above zero (55 and 49 ADU) that cannot be distinguished from the sky backgrounds.

So the only solution is cropping and derotating both images. With DynamicCrop you can adjust the rotation angle and the cropping rectangle accurately:


Note that the image edges are not straight; you must find an 'average' crop orientation and be careful not to generate black boundaries.


These are the cropped/derotated images:


This is a first try with frame adaptation disabled:


And here you can see how StarAlignment's frame adaptation yields a seamless mosaic:


StarAlignment found 52 star pair matches to build this mosaic from an initial set of 55 (95% of inliers). The overall quality of the registration model was 0.94, which is very high for a mosaic with so small overlapping.

The only parameters that I have changed are RANSAC tolerance, which I have increased to make the star matching algorithm more tolerant to small-scale distortion (although in this case I think this is unnecessary); coordinate interpolation, which I have set to 2D surface splines; and frame adaptation enabled. The rest of parameters have default values.

Nice mosaic! ;)
« Last Edit: 2010 December 27 10:29:18 by Juan Conejero »
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline Emanuele

  • PixInsight Addict
  • ***
  • Posts: 270
Re: 2 images Mosaic question...
« Reply #9 on: 2010 December 27 13:58:17 »
Juan,

once again I cannot thank you enough! :) Didn't think of mentioning that the frames were rotated!
Glad you like the mosaic! ;)

Bad weather forces me to process Hubble Data! ...

Thank you again!
E.

Offline FredrikOedling

  • Newcomer
  • Posts: 2
Re: 2 images Mosaic question...
« Reply #10 on: 2014 February 09 15:31:09 »
Posting in this thread instead of new topic since my problem is very similar.

I'm having issues using the star alignment tool for creating mosaics with data from the Hubble legacy archive (HLA). (screenshot attached)

RANSAC seems to be unable to find a valid set of star pair matches, I have been spending well over an hour tinkering with the different settings without success. I know that there are at least 15 stars in the overlap, so it should work.

I could do it with dynamical align instead, and I have. But then I ran into trouble with illumination differences across the mosaic, so I really want to use the Frame adaption feature within SA.

Or are there other ways to fix the uneven illumination?

If you want the data to try it out yourself it can be found here:http://hla.stsci.edu/hlaview.html#FlFootprints|filterText%3D%24filterTypes%3D|query_string=m81&posfilename=&poslocalname=&posfilecount=&listdelimiter=whitespace&listformat=degrees&RA=148.888220&Dec=69.065290&Radius=0.224167&inst=ACS&imagetype=color&prop_id=10584&spectral_elt=&proprietary=both&preview=1&output_size=256&cutout_size=12.8|ra=&dec=&sr=&level=&image=&inst=ACS%2CACSGrism%2CWFC3%2CWFPC2%2CNICMOS%2CNICGRISM%2CCOS%2CWFPC2-PC%2CSTIS%2CFOS%2CGHRS&ds=

The two images you are looking for are named HST_10584_04... and HST_10584_08.. under the column named "Dataset". If the link doesn't work, search for M81 and use 10584 as proposal ID.

Thanks!

Offline Andres.Pozo

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 927
Re: 2 images Mosaic question...
« Reply #11 on: 2014 February 10 03:06:10 »
Since the FITS in the HLA have coordinates in the WCS convention you can use the script MosaicByCoordinates for aligning them. I have just done a fast test and it seems to work ok with these images.

Please read the documentation of MosaicByCoordinates in order to know what it does and how to use it.

Offline FredrikOedling

  • Newcomer
  • Posts: 2
Re: 2 images Mosaic question...
« Reply #12 on: 2014 February 10 14:53:04 »
Since the FITS in the HLA have coordinates in the WCS convention you can use the script MosaicByCoordinates for aligning them. I have just done a fast test and it seems to work ok with these images.

Please read the documentation of MosaicByCoordinates in order to know what it does and how to use it.

Oh, didn't think about using that script. That should be alot less tedious than using dynamical alignment for sure. But I still have illumination issues that I hoped the frame adaption feature within SA would fix.

Thanks!

Offline georg.viehoever

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2132
Re: 2 images Mosaic question...
« Reply #13 on: 2014 February 11 10:12:53 »
As I understand it, the frame adaption in SA is equivalent to a LinearFit on already aligned images. Also, you may want to have a look at GradientMergeMosaic to combine the images.
Georg
Georg (6 inch Newton, unmodified Canon EOS40D+80D, unguided EQ5 mount)