Hi all,
Here's my first attempt at creating a script for PixInsight, it is a batch linear fit script created by shamelessly copy-pasting and hacking together something that seems to work.
The script was born from a need to fit mosaic frames better together, as I didn't get quite the results I wanted by any other means. The mosaic frames I have have wildly varying sky brightness levels, I also have a decent amount of data with a different camera orientation and framing, so I made this to automate the most boring part of guaranteeing data compatibility of mosaic frames before stacking.
After several variations my intended flow for a mosaic is to approach it thinking in layers, so:
- build a master reference mosaic for alignment from a layer of good quality images,
- align all images based on the master reference mosaic (without frame adaptation).
- Then linear fit images, merge and stack layers for each filter separately:
- linear fit a single exposure layer of images with each other and use GradientMergeMosaic to a create a per filter reference mosaic,
- verify that the result has a reasonably uniform, seamless background, redo if necessary
- use this script to linear fit all images to the corresponding filter reference mosaic,
- (write a script to) use GMM and merge each exposure layer into new mosaic-size subexposure images,
- stack the GMM'd results as with any normal, calibrated, registered set of images to make the final per-filter stacks.
- Combine stacks into a perfect result as with any other image.
This processing flow should allow using mosaic data from various mosaic layouts and instruments with a fairly good reliability, as GMM is applied separately for each layer.
-Antti
Updated: v0.2.0 with option for resetting image minimum value back to zero.