PixInsight Forum

PixInsight => Release Information => Topic started by: Juan Conejero on 2017 May 11 09:48:58

Title: New in PixInsight 1.8.5: FrameAdaptation
Post by: Juan Conejero on 2017 May 11 09:48:58
Hi all,

It's been pretty quiet here lately, so just wanted to warm things up a little bit. We have a new tool almost ready for the next 1.8.5 release of PixInsight: FrameAdaptation. This tool performs a local normalization of images based on multiscale robust statistics analysis. Here is a comparison:

Before FrameAdaptation:

(http://forum-images.pixinsight.com/20170511/FA/FA-before-tn.jpg) (http://forum-images.pixinsight.com/20170511/FA/FA-before.jpg)
Click on the image for a full size version (http://forum-images.pixinsight.com/20170511/FA/FA-before.jpg)

After FrameAdaptation:

(http://forum-images.pixinsight.com/20170511/FA/FA-after-tn.jpg) (http://forum-images.pixinsight.com/20170511/FA/FA-after.jpg)
Click on the image for a full size version (http://forum-images.pixinsight.com/20170511/FA/FA-after.jpg)

What you see here are screenshots of my workstation with a working/testing version of the tool. The final version will be very different. It will work in batch mode just like StarAlignment, and will have a few more parameters. In this example, the reference image is on the left. On the right we have a different image of the same data set, with much less signal and a very strong gradient. Obviously, both images have been previously calibrated and registered.

After FrameAdaptation, background and signal levels have been normalized on a pixel-per-pixel basis. The gradient is completely gone as a result of this local normalization process. FrameAdaptation will be an optional image preprocessing step between registration and integration. It has other interesting applications, such as color correction and automatic gradient modeling/correction, among others. More or less, you can think of FrameAdaptation as a local version of LinearFit, able to work at different dimensional scales.

More warm-ups coming soon, so stay tuned. The next one will probably be a new mosaic blending tool based on... let's keep this secret for now :) Just two words to describe it: *seamless* mosaics. I'm working on it.
Title: Re: New in PixInsight 1.8.5: FrameAdaptation
Post by: msmythers on 2017 May 11 10:27:35
Juan

Thank you!!! :) :) :) :)

I can see this for images from multiple days or years collection.


Mike
Title: Re: New in PixInsight 1.8.5: FrameAdaptation
Post by: chris.bailey on 2017 May 11 23:46:09
Oooh nice.

Chris
Title: Re: New in PixInsight 1.8.5: FrameAdaptation
Post by: RickS on 2017 May 12 00:03:57
Looks very useful, Juan, speaking as someone who has been blending data from multiple scope/camera combinations lately.
Title: Re: New in PixInsight 1.8.5: FrameAdaptation
Post by: pfile on 2017 May 12 00:07:37
this is great - i've often worried about bad LP gradients messing up the statistics during integration and have gone as far as to run ABE on all my input frames before registration/integration. but that does not always work well because the gradient changes from hour to hour and night to night and the single set of ABE settings do not always capture the gradients properly.

so in batch mode, one should prepare a high-quality DBE'd version of the reference sub for the other frames to be adapted to?

thanks

rob
Title: Re: New in PixInsight 1.8.5: FrameAdaptation
Post by: Juan Conejero on 2017 May 12 00:22:56
Guys, thanks.

Quote
so in batch mode, one should prepare a high-quality DBE'd version of the reference sub for the other frames to be adapted to?

Yes, this is one of this tool's main applications. After local normalization, all works better and more accurately in ImageIntegration. This tool, along with the new large scale rejection feature that we have already implemented, will make the image integration task better and easier to use than ever before. We'll put a few examples later.
Title: Re: New in PixInsight 1.8.5: FrameAdaptation
Post by: Niall Saunders on 2017 May 12 04:27:24
Quote
We'll put a few examples later

There's that relativistic time frame again  :police:

Looking forward to it Juan
Title: Re: New in PixInsight 1.8.5: FrameAdaptation
Post by: Ignacio on 2017 May 12 09:28:04
This one looks very promising!

Does this mean that one can skip the normalization step in ImageIntergation?

Ignacio
Title: Re: New in PixInsight 1.8.5: FrameAdaptation
Post by: Juan Conejero on 2017 May 12 09:42:35
Hi Ignacio,

Yes, after applying FrameAdaptation to a set of frames you can disable normalization in ImageIntegration, both rejection and output normalizations.

After local normalization with respect to a common reference image (which not necessarily has to be one of the individual frames; it can be the result of a previous integration for example), all of the frames in the set are statistically compatible. FrameAdaptation functions will be included in drizzle data files (new XDRZ XML-based format), so the same normalization will be applied by the DrizzleIntegration tool. This also applies to mosaiced data, since DrizzleIntegration now supports direct integration from monochrome CFA frames (Bayer drizzle).
Title: Re: New in PixInsight 1.8.5: FrameAdaptation
Post by: Ignacio on 2017 May 12 10:03:35
Wonderful. I guess that the SNR weighting in ImageIntergration is going to work much better after FA.

Ignacio
Title: Re: New in PixInsight 1.8.5: FrameAdaptation
Post by: msmythers on 2017 May 12 10:27:44
Juan and team!


You like making more work for us. Now I get to reprocess my old data all over again. ::) ::) ::)

Thanks for all the hard work.



Mike
Title: Re: New in PixInsight 1.8.5: FrameAdaptation
Post by: polare70 on 2017 May 12 12:50:27
Nice Work Juan-Tnx. !
Title: Re: New in PixInsight 1.8.5: FrameAdaptation
Post by: tsaban on 2017 May 14 13:06:25
Very interesting tool for me too. Since I have to do imaging at some distance from my home I only get a few hours per session. I always end up with sets of frames which differ a lot.

Thanks
Title: Re: New in PixInsight 1.8.5: FrameAdaptation
Post by: Astrodoc on 2017 May 24 16:47:46
Will the Frame Adaptation step be included in the BPP script?

Clear skies,
Ron
Title: Re: New in PixInsight 1.8.5: FrameAdaptation
Post by: Juan Conejero on 2017 May 25 00:29:10
Hi Ron,

This tool will be named MultiscaleLocalNormalization (MLN) instead of FrameAdaptation, since MLN describes much better what it does and how it works. No, MLN won't be part of BPP, since BPP must not be used for image integration of light frames. MLN will be available in the ImageIntegration tool as a new pixel rejection normalization algorithm. Thanks to MLN, pixel rejection will work independently of gradients and other local signal variations, which leads to important SNR improvements. Here is an example:

(http://forum-images.pixinsight.com/20170525/MLN/MLNR-comparison-tn.png) (http://forum-images.pixinsight.com/20170525/MLN/MLNR-comparison.png)
Click on the image for a full size version (http://forum-images.pixinsight.com/20170525/MLN/MLNR-comparison.png)

In this example we have integrated a data set with strong signal variations and gradients caused by varying atmospheric conditions. With the usual scale + zero offset rejection normalization, pixel rejection (Winsorized sigma clipping in this case) makes many mistakes because local illumination variations cannot be modeled correctly with a global image normalization. These mistakes lead to many outlier pixels surviving the rejection phase, as can be seen on the left of the above screenshot. With the MLN algorithm (on the right, applied at the scale of 256 pixels in this case), pixel rejection is virtually perfect even in this difficult case. In this example, MLN has also been applied as an output normalization for integration.

MLN, along with the new large-scale pixel rejection algorithm, are an important step forward in our image preprocessing tool chain.
Title: Re: New in PixInsight 1.8.5: FrameAdaptation
Post by: jkmorse on 2017 July 13 20:20:12
Geez, take a little time away to retire and have my hip replaced and all of a sudden, 1.8.5 is on the horizon  :D :D :D

Juan and Co., thank you so much for the continued dedication.  Gonna have lots to add to my workbook when all of these fun new tools start appearing in the update list.

Best,

Jim
Title: Re: New in PixInsight 1.8.5: FrameAdaptation
Post by: cdesselles on 2017 August 03 19:24:31
As usual, I am in complete awe of the time and talent put into PixInsight by the foremost astrophotography processing team on the planet. What you gentlemen do is nothing short of amazing.

  :surprised:
Title: Re: New in PixInsight 1.8.5: FrameAdaptation
Post by: mmirot on 2017 August 04 22:11:55
I don't see this in the release of 1.8.5.

Did it get cut from the release?

Max
Title: Re: New in PixInsight 1.8.5: FrameAdaptation
Post by: pfile on 2017 August 04 23:44:39
it's called "LocalNormalization" now

rob
Title: Re: New in PixInsight 1.8.5: FrameAdaptation
Post by: brew on 2017 August 07 11:40:24
I'm trying to get this to work, and have a couple of questions.

1) When I select a reference image in LocalNormalization, do I use one reference across all filters, or a separate reference for each filter set? I am currently using a Luminance image, the same one used for alignment.

2) When I use Subframe Selection, I specify a fits keyword to hold the calculated weight for the image (SSWEIGHT). I see this keyword in the approved images. However, after StarAlignment the aligned images do not contain the SSWEIGHT keyword. LocalNormalization runs against the aligned images, right? So, LN does not see the weights. This doesn't seem right. Doesn't ImageIntegration also need to see the weights? 

3) When I run ImageIntegration against the aligned images (including the localNormalization files) the process console indicates that the local normalization data is found, but is not being used (green message). How do I make sure the files are being used? Is this due to the missing keyword, or something else?
Title: Re: New in PixInsight 1.8.5: FrameAdaptation
Post by: GordonH on 2017 August 08 18:23:33
I tried the new LocalNormalization with the Output Files stored in the same directory as the previously registered images.  The process runs to conclusion with a ".xnml" file for each of the image files.
In ImageIntegration I set Normalization to Local normalization but get:

"Warning: Local normalization data not available - No normalization will be applied!

Note: The image files are RGB

What am I missing?

Title: Re: New in PixInsight 1.8.5: FrameAdaptation
Post by: pfile on 2017 August 08 20:38:23
you need to add the LN files to the ImageIntegration tool... there is a button to the left of the file list.

rob
Title: Re: New in PixInsight 1.8.5: FrameAdaptation
Post by: Juan Conejero on 2017 August 09 03:37:29
Please bear with us while we complete a few tutorials on the new tools released with PixInsight 1.8.5. LocalNormalization is a powerful but complex image analysis tool requiring a full description and detailed usage notes. The same applies to PhotometricColorCalibration.
Title: Re: New in PixInsight 1.8.5: FrameAdaptation
Post by: GordonH on 2017 August 09 12:19:02
rob,
Thanks, I should have payed more attention.

That did the trick.

Gordon
Title: Re: New in PixInsight 1.8.5: FrameAdaptation
Post by: RichInLesta on 2017 August 23 06:04:14
I just updated to 1.8.5 and was following the updated Pre-Processing instructions at http://www.lightvortexastronomy.com/tutorial-pre-processing-calibrating-and-stacking-images-in-pixinsight.html and hit a snag when adding the Local Normalization files.  I get the attached error.  I'm going to continue processing without adding the new normalization files, but would like to know if it's something I may have done incorrectly.

Thanks

UPDATE 08.24.17:  I think I figured it out.  There's some ambiguity in the creation of the "normalized" images in the instructions on Light Vortex (just at this step!  The rest is awesome).  In the instructions, this step appears after the images have had the drizzle data added.  The step to add the normalization data files appears to use the PRE-DRIZZLED images; that is, the instructions themselves doesn't clarity this, and the accompanying graphic shows the pre-drizzled images.  It's when I used the pre-drizzled images that I received the attached error.  I re-ran the LocalNormalization process on the POST-DRIZZLED images, and I could then add the normalized image files that this created to the ImageIntegration process.
Title: Re: New in PixInsight 1.8.5: FrameAdaptation
Post by: joelshort on 2017 August 30 06:20:45
I'm playing around with the new LocalNormalization process and ImageIntegration process. My basic question is, is it ever possible that using LocalNormalization with rejection stacking will result in a slightly higher SNR than just stacking without any rejection (and therefore without LocalNormalization)?

I am finding that in many cases when I stack a set of images without rejection, and then stack with rejection and LocalNormalization, the LN stack has a higher SNR which doesn't quite make sense to me.

For example, I stacked a small set of 12-5min images.  Without rejection the SNR reported in the process console was 1.33+04.  When using Windsorized Sigma Clipping and LN the resulting SNR was 1.54+04.  This seems to be a common occurrence with small stacks of images.  However with larger stacks and using LinearFit rejection the resulting SNR is lower than the non-rejected stack, which is what I would expect.
Title: Re: New in PixInsight 1.8.5: FrameAdaptation
Post by: alcol on 2017 September 11 06:05:25
you need to add the LN files to the ImageIntegration tool... there is a button to the left of the file list.

rob

Hi Rob, can you expand on where this button is. I am having trouble trying to find the xnml files after producing them with LocalNormalisation. I can see them in Windows File Explorer but ImageIntegration doesn't seem recognise xnml files and I can't therefore Add Files to ImageIntegration.

Probably something simple I am missing??
Title: Re: New in PixInsight 1.8.5: FrameAdaptation
Post by: pfile on 2017 September 11 07:48:37
check the screenshot above, you'll see the button right under 'add files'

rob
Title: Re: New in PixInsight 1.8.5: FrameAdaptation
Post by: alcol on 2017 September 11 09:42:51
Thanks Rob,

not sure why but my ImageIntegration input panel doesn't have these extra boxes in, it looks the same as the old version of PI. I downloaded the new version a few days ago and just checked and it says in the program files that it is the new version.

Presumably I should re-install the new version??
Title: Re: New in PixInsight 1.8.5: FrameAdaptation
Post by: pfile on 2017 September 11 10:04:10
hmm, have you installed all the available updates? something is definitely wrong... maybe somehow the old version did not get uninstalled?

rob
Title: Re: New in PixInsight 1.8.5: FrameAdaptation
Post by: alcol on 2017 September 11 12:31:34
All sorted. Uninstalled and reinstalled PI and all now working. However, it may have been me all the time. I realised when I attempted to load the files again, that until I Added the registered files to ImageIntegration the Add localnormalisation box was blanked out!

Thanks again Rob for getting me back on the rails. My initial reaction having run it with a few files is that the integrated image is a significant improvement. Thanks everyone at PI for such great software even if it really tests an old boy like me.
Title: Re: New in PixInsight 1.8.5: FrameAdaptation
Post by: alcol on 2017 September 28 07:51:06
Can someone give me some clarification. I am getting some odd master images resulting from running using localnormalization (LN) on sets of Andromeda Galaxy images I have. these images were taken at 60s, 120s and 300s. I have registered them all together, is the process to produce LN images in batches aligned with the exposure lengths or can they all be run together. ie add all the images into LN and run it and then all the images into Image Integration?

Putting all the subs into LN together give me an image, but still with a gradient. When I apply DBE to it I get a rather horrible result.

Any ideas please?
Title: Re: New in PixInsight 1.8.5: FrameAdaptation
Post by: jkmorse on 2017 December 13 10:57:47
Hey folks,

I have tried using LocalNormalization but am running into a consistent problem, namely dark halos around my bright stars.  I see nothing in the popup help that mentions ringing and am wondering if anybody has a suggestion where to start experimenting.

Thanks,

Jim
Title: Re: New in PixInsight 1.8.5: FrameAdaptation
Post by: RickS on 2017 December 14 20:49:18
I usually get bright halos with the default settings, Jim.  Setting Scale to 256 fixes them.  Not sure it will work in your case but worth a try if you haven't tried adjusting Scale yet.

Cheers,
Rick.
Title: Re: New in PixInsight 1.8.5: FrameAdaptation
Post by: jkmorse on 2017 December 16 18:28:39
Thanks,

Will give that a shot and report back.  Could be a few days since I am well under way on a five panel mosaic of the Double Cluster.

Best,

Jim
Title: Re: New in PixInsight 1.8.5: FrameAdaptation
Post by: pscammp on 2017 December 17 06:53:07
I wonder when Juan will be ready to release the tutorials he talked about for this tool and PCC

???
Title: Re: New in PixInsight 1.8.5: FrameAdaptation
Post by: tsaban on 2017 December 23 11:28:00
I have a big mosaic of the Orion region with lots of gradients waiting since May, which I stopped to work on in order to make use of this promising function. Juan had promised to describe its usage in September; unfortunately now 2017 has almost passed... :'( :'( :'(
Title: Re: New in PixInsight 1.8.5: FrameAdaptation
Post by: msmythers on 2017 December 23 20:29:24
Guys

I'm not trying to speaking for Juan but this posting might help a little to understand the delays. Maybe some of the other users who have had success with the tools could help. I would suggest starting a new posting in the general area and ask specific questions if possible.

https://pixinsight.com/forum/index.php?topic=11822.msg73046#msg73046 (https://pixinsight.com/forum/index.php?topic=11822.msg73046#msg73046)


Mike