PhotometricMosiac 4.0

Hi John,
Has anyone produced a video using your script?
Eric
I am not aware of any video tutorials yet. If any have been created, please let me know! Version 3.2 will be released soon, so hopefully someone will create a video tutorial after its release.

However, I have put a great deal of effort into the help file. The first half of the help file explains how to use the script, and includes a quick start guide and a tutorial. I have included lots of images to illustrate difficult situations and how to solve them. The second half provides a reference guide, explaining what each control does.

Hope you find the help file useful,
Regards, John Murphy
 
John,

I followed your tutorial/instruction and got a result, But not sure all my selections were correct. The video would be for us reading impaired.

Also, how does this process compare with the standard PI mosaic process. That is, producing a crude mosaic template, registering the individual files to that template and using GradientMergeMosaic?

Eric
 
John,

Thanks so much for this wonderful tool. I am using v3.2 beta. The first time I used on a 2 panel wide M31 mosaic I used defaults and with 'Overlay' mode got a really good and smooth join. I couldn't discern the overlap join portion at all - even zoomed in.

I did have a big problem with gradients. One of the panels was way darker than the other and had seemingly had a different white reference point. When I tried to calibrate color via PCC or AutoColor or manual ColorCalibration before and after the joining the panels via PM; the end result after stretching the RGB portion of the mosaic was terrible. One could clearly make out the two panels in the mosaic. The colors were different and when I tried to apply a curves or other tweak - it just made it worse.

I tried various combinations and methods. I focused on color calibration as I thought that was the key factor. I use LinearFit when making masters after DynamicCrop and early on I wanted to try to this as well for the panels, but of course that tool failed when applied to different mosaic panels so I looked for other solutions. Then I re-discovered LightVortex Mosaic Tutorial and within it a link to David Ault's site where he provides a script for doing LinearFit on mosaic panels called "dnaLinearFit."

I applied this tool to my panels just before starting the mosaic integration process and the end-result was exactly what I had hoped for: seamless mosaic with good color and balanced lightness.

M31 is of course an LRGB target. As you suggested I created separate masters for lum and rgb for each panel and then ran lum and rgb separately through the mosaic joining process to produce two mosaics. I re-applied some DBE to each and I then stretched each one and finally did a LRGB combine to form the final mosaic. Worked great!. The following is just after a basic LRGB combine.

View attachment Mosaic_LRGB_temp.jpg
 
Last edited:
John,

Thanks so much for this wonderful tool. I am using v3.2 beta. The first time I used on a 2 panel wide M31 mosaic I used defaults and with 'Overlay' mode got a really good and smooth join. I couldn't discern the overlap join portion at all - even zoomed in.

I did have a big problem with gradients. One of the panels was way darker than the other and had seemingly had a different white reference point. When I tried to calibrate color via PCC or AutoColor or manual ColorCalibration before and after the joining the panels via PM; the end result after stretching the RGB portion of the mosaic was terrible. One could clearly make out the two panels in the mosaic. The colors were different and when I tried to apply a curves or other tweak - it just made it worse.

I tried various combinations and methods. I focused on color calibration as I thought that was the key factor. I use LinearFit when making masters after DynamicCrop and early on I wanted to try to this as well for the panels, but of course that tool failed when applied to different mosaic panels so I looked for other solutions. Then I re-discovered LightVortex Mosaic Tutorial and within it a link to David Ault's site where he provides a script for doing LinearFit on mosaic panels called "dnaLinearFit."

I applied this tool to my panels just before starting the mosaic integration process and the end-result was exactly what I had hoped for: seamless mosaic with good color and balanced lightness.

M31 is of course an LRGB target. As you suggested I created separate masters for lum and rgb for each panel and then ran lum and rgb separately through the mosaic joining process to produce two mosaics. I re-applied some DBE to each and I then stretched each one and finally did a LRGB combine to form the final mosaic. Worked great!. The following is just after a basic LRGB combine.

View attachment 10407

I am very pleased you got a good result in the end, but deeply concerned that PhotometricMosaic failed to scale the images correctly. Provided that the images are linear and there are unsaturated stars within the overlap, it should never be necessary to use other software, such as "dnaLinearFit" to do this.

Photometry is capable of measuring brightness differences really accurately, and the solution is independent of any differences in gradients or star profiles. "dnaLinearFit" is a great program, but without photometry, these ambiguities remain.

So something went very wrong when you were using PhotometricMosaic. I would like to investigate this to find the root cause. Would you be able to provide me with a link to your registered data? Ideally before using LinearFit / dnaLinearFit / or any form of color calibration. Please save in XISF format, using 'XISF Data Block Compression' (the black areas compress really well!).

Thanks
John Murphy
 
John,
This image shows the differential in lightness between my "raw" rgb masters. They are linear; with the individual R, G, B that make up each master having been aligned, linear fit, cropped and DBE'd. My luminance master (actually Optec LPro) show the same issue as noted image. This image is produced by applying a linked (default) ST to the "rgb_1" image and then applying the same stretch to "rgb_2". I have no idea why there is such a difference between masters. I did capture various lights over a month's time. Like my non-mosaic lights, I capture some of each filter/panel and then go back iteratively add some more to help average out any moon age or other deficiencies common to shooting lights over periods of weeks.

1614291861941.png


Google Drive: RGB masters.
 
Last edited:
John,
This image shows the differential in lightness between my "raw" rgb masters. They are linear; with the individual R, G, B that make up each master having been aligned, linear fit, cropped and DBE'd. My luminance master (actually Optec LPro) show the same issue as noted image. This image is produced by applying a linked (default) ST to the "rgb_1" image and then applying the same stretch to "rgb_2". I have no idea why there is such a difference between masters. I did capture various lights over a month's time. Like my non-mosaic lights, I capture some of each filter/panel and then go back iteratively add some more to help average out any moon age or other deficiencies common to shooting lights over periods of weeks.

View attachment 10413

Will provide requested images in my next post.
Thanks. When developing new software, it's really useful to see problem cases. It's hard to think of all situations! I will look into it as soon as you send the data.
Regards, John Murphy
 
Thanks. When developing new software, it's really useful to see problem cases. It's hard to think of all situations! I will look into it as soon as you send the data.
Regards, John Murphy

I uploaded a zip of the two RGB master to here; let me know if you have an issue getting them. They are the RGB master shown above but have been ImageSolved and MosaicByCoordinated so that you don't have to do those steps.
 
Just to show what I am seeing without using dnaLinearFit prior to using PM. I took the two masters linked above; applied the pixel math to make sure near black is black and then the MosaicTrim tool. This is what I have after a default join using PM:

1614298353150.png

One can see some gradient issue left center and the color is off in the two panels. Applying an extreme saturation curve to this and one can plainly see the issues.
1614298746465.png
 

Attachments

  • 1614298682823.png
    1614298682823.png
    544.2 KB · Views: 77
Just to show what I am seeing without using dnaLinearFit prior to using PM. I took the two masters linked above; applied the pixel math to make sure near black is black and then the MosaicTrim tool. This is what I have after a default join using PM:

View attachment 10415
One can see some gradient issue left center and the color is off in the two panels. Applying an extreme saturation curve to this and one can plainly see the issues.
View attachment 10417
This has been an interesting mosaic to analyse. The problems visible in the saturated lower image are due to intensity scale errors. The color difference between the left and right sides of the mosaic is directly due to a scale error. The blue horizontal band on the left of the image is a little more complicated. The scale error has introduced an invalid gradient correction that tracks the brightness of the galaxy. Target gradient correction is on by default, so this invalid gradient correction has been propagated across the target image. The target image gradient graph, with default settings, is shown below:
1614978577537.png

The default settings are not ideal in this case - the gradient line follows a local (false) gradient. Increasing the gradient smoothing to maximum would help prevent the blue band. Alternatively, the 'Target image' check box could be deselected.

This would help, but the scale error still remains, so the color difference between the left and right panels would remain. So, what can cause a scale error, and how can it be solved?

PhotometricMosaic will usually measure the scale difference between the two images very accurately. However, the photometry requires that the data is linear, that star flux has been conserved and that a single intensity scale factor is valid for the whole of the target image. There are plenty of ways of breaking these requirements:
  • The images should be flat corrected.
  • When using a background extraction program (for example DBE) you should always select the correction to be 'Subtraction'. Do not use 'Division' because this will cause the scale factor to vary across the image.
  • Some Deconvolution algorithms preserve star flux, but algorithms that are great at coping with noise usually don't. Any ringing around the stars will also cause photometry problems.
Where possible, do as much of the processing after the mosaic has been created. However, this might not always be possible. I have therefore added an option within PhotometricMosaic that can be used in these cases to adjust the applied scale factor:
1614979831075.png


1614979949437.png

This shows the gradient that will be propagated across the target image. Use the mouse to read off the coordinate at the peaks/troughs in this graph. Ignore any due to stars, but if one or more of these correspond to a bright part of a galaxy or nebula, they indicate a scale error. Adjust the controls until the peak disappears:
1614980105770.png


This new dialog will be included in PhotometricMosaic v3.2
 
If the noise levels between the two images differ, the color noise will reveal the two panels. To avoid this, the saturation should be applied via a mask created from a heavily stretched luminance channel to protect the noisier background.
 
I have attached the new version. Please let me know if you find any errors so that I can fix them before submitting v3.2 to the PixInsight platform.
Regards
John Murphy

PhotometricMosaic 3.2 is now available as a PixInsight update.
 
Last edited:
This looks really useful, but at the risk of asking a really dumb question, where do I find the prerequisites and quick start guide documentation? I see the pop-ups for buttons on the script control panel, but I can't find the anything on https://pixinsight.com/doc/#Scripts, and no links to these guides in script. Is the most recent just what is posted here in #24 - #40? Thanks - Jeff
edit - nevermind - found it at https://drive.google.com/file/d/1sxPP-L2WMMQEESTsZVFEtQr8xr1ugti4/view?usp=sharing
Thanks!
 
Last edited:
Hi Jeff
I am very pleased to hear that you are interested in reading the help file!

The first section of the help file, '1 Description' contains sub sections on 'Prerequisites', 'Quick Start Guide' and 'Tutorial: Sample rejection and gradient graphs'.

Since PhotometricMosaic 3.0 is now included in the official PixInsight distribution, provided that your PixInsight is up to date, the help file for version 3.0 should already be installed. On Windows 10 it should be located at:
file:///C:/Program Files/PixInsight/doc/scripts/PhotometricMosaic/PhotometricMosaic.html

To invoke the help from the script, use the 'page' icon at the bottom left of the script dialog:
1615219508191.png


I am currently updating the help for PhotometricMosaic 3.2 It should be completed within the next couple of weeks. Both the script and the help file will then be uploaded to the PixInsight platform and delivered as an update.

You are correct - my script's help file has not yet been added to the PixInsight Reference Documentation page.

Regards
John Murphy
 
This looks really useful, but at the risk of asking a really dumb question, where do I find the prerequisites and quick start guide documentation? I see the pop-ups for buttons on the script control panel, but I can't find the anything on https://pixinsight.com/doc/#Scripts, and no links to these guides in script. Is the most recent just what is posted here in #24 - #40? Thanks - Jeff
edit - nevermind - found it at https://drive.google.com/file/d/1sxPP-L2WMMQEESTsZVFEtQr8xr1ugti4/view?usp=sharing
Thanks!
I have uploaded the help for v3.2
It is a work in progress - I still need to add a section for the new 'Adjust Scale' dialog, and expand the 'Common Problems' section.
https://drive.google.com/file/d/1sxPP-L2WMMQEESTsZVFEtQr8xr1ugti4/view?usp=sharing
Regards
John Murphy
 
John, when do you expect to have 3.2 included in the official distribution?
Larry Phillips
I need to finish the help file, and perform some extra testing.
I hope to upload it within the next couple of weeks. It may take a few days after that before Juan Conejero has time to create the update.
Regards, John
 
I have uploaded the final draft of the help files for PhotometricMosaic, TrimMosaicTile and SplitMosaicTile. This time it is the compiled help - the html file and the images.

On a Windows 10 machine, these files should be copied to
C:/Program Files/PixInsight/doc/scripts/
For example:
C:/Program Files/PixInsight/doc/scripts/PhotometricMosaic/PhotometricMosaic.html

Regards, John

The PhotometricMosaic 3.2 help is now available as a PixInsight update.
 
Last edited:
PhotometricMosaic 3.2.1
This version fixes a bug that could cause a crash on MacOS.
It also requires less memory.

It will be in the up coming PixInsight release.

Regards, John Murphy
 
PhotometricMosaic 3.2.2

The join dialog has been updated. The reference / target toggle has been removed. Instead, the reference image is shown on the reference side of the join line, the target image on the other side.
 
Back
Top