PhotometricMosiac 4.0

jmurphy

Well-known member
This is a significant update of the PhotometricMosaic script.

Some of the improvements include:
  • Using the pidoc format for the Help html file. The help has been rewritten from scratch.
  • Updated the script to use PixInsight's SurfaceSpline to model the relative gradient between the reference and target images.
  • The graphs now display smooth curves instead of line segments
  • The graphs are now interactive, allowing the user to zoom (mouse wheel) and display the mouse coordinates in the title bar (left click), or save as a PixInsight view (right click).
  • Graph.js is a reusable component for displaying graphs. You may use this in your own projects, and if you wish, copy it and modify it. I only ask that you credit me when you do so.
  • Followed Juan Conejero's advice to significantly improve the image samples read / write performance.
  • Updated the user interface to use SectionBar
  • And many more improvements...
PhotometricMosaicQuickStart.png



GradientGraphOk2.png


I would like to thank the Basingstoke Astronomical Society (UK) for reading through the help and testing the script. I will also be testing the script over the next few weeks.

Hope you find the script useful, and please provide feedback on any problems encountered.
Thanks
John Murphy
 
Last edited:
I have attached the uncompiled source for the PhotometricMosaic help file. I have not done anything complicated, so you may find it useful as an extra example on how to get started with the pidoc system.
 
just install the script and test with my M33 mosaic

but trim mosaic tile keep reporting error , any idea ?
trimMosaisErr1b.jpg
 
just install the script and test with my M33 mosaic

but trim mosaic tile keep reporting error , any idea ?

Hi Avan
Thanks for testing the script. All feedback is very useful.
I can reproduce this error in PixInsight version 1.8.8-4, but not in the current version (1.8.8-5).
The script uses some of the newest features within PixInsight, and hence requires the latest version.
I will update the script to check the PixInsight version. It should warn the user if the version is too old.
Thanks
John Murphy
 
Last edited:
Hi John,
thanks for the updated script. I followed the suggested workflow for a recent 4 panel mosaic of the IC1396 region in HOO and it worked like a charm.
/Ralf
Hi Ralf
Thanks for the feedback. I am very pleased to hear it is working well.
Regards, John
 
The attached MosaicScripts.zip file contains:
  • PhotometricMosaic 2.1 (Updated to warn if the PixInsight version is too old)
  • TrimMosaicTile 1.1 (Updated to include PixInsight Reference Documentation)
  • SplitMosaicTile 1.1 (Updated to include PixInsight Reference Documentation)

Installation instructions:
Unzip the attached MosaicScripts.zip file. Save the JohnMurphy folder anywhere you wish.
Then, in PixInsight, use 'SCRIPT > Feature Scripts...' and then in the 'Feature Scripts' dialog box, press the 'Add' button and select the JohnMurphy folder. It should find the three scripts.

To install the help files, unzip 'PhotometricMosaicHelp.zip' to '[PixInsight]/doc/scripts/PhotometricMosaic'
For example, on Windows, the correct installation would include:
C:/Program Files/PixInsight/doc/scripts/PhotometricMosaic/PhotometricMosaic.html
C:/Program Files/PixInsight/doc/scripts/PhotometricMosaic/images/

Run the three scripts in the usual way:
SCRIPT -> Mosaic -> PhotometricMosaic

I am no longer using my website - it seems to get nervous about zip files that contain javascript :(
 
Last edited:
This is amazing, thank you for this!! saved me a *LOT* of time! Hopefully they get you incorporated into PI directly with auto updates ;)
 
This is amazing, thank you for this!! saved me a *LOT* of time! Hopefully they get you incorporated into PI directly with auto updates ;)

Hi Byron
Thanks for the feedback, I am very pleased to hear the script is working well.
The script appears to be stable - currently there are no known bugs, and no bugs have been reported yet. It also looks likely that this script will be included in future PixInsight releases - In the earlier thread for PhotometricMosaic 1.1, Juan Conejero said:

"Hi John,
Very nice! Thank you so much for this excellent contribution. Please let me some time to review your code. At any rate, I'd like to include this script in the official distribution, if you agree."
(Juan Conejero)


Regards,
John Murphy
 
Last edited:
I have just released PhotometricMosaic version 2.2

New in this version:
  • Fixes some display problems on high resolution screens.
  • The output displayed for: Detected stars, Photometry stars, Mask stars, Sample grid and Binned sample grid now use a scrolled window instead of creating a PixInsight view. This allows the user to scroll and zoom the image without leaving the script.
  • Many controls are now available in the dialog windows. The displayed graphics update as the controls are adjusted.
Installation instructions:
Unzip the attached MosaicScripts.zip file. Save the JohnMurphy folder anywhere you wish.
Then, in PixInsight, use 'SCRIPT > Feature Scripts...' and then in the 'Feature Scripts' dialog box, press the 'Add' button and select the JohnMurphy folder. It should find the three scripts.

To install the help files, unzip 'PhotometricMosaicHelp.zip' to '[PixInsight]/doc/scripts/PhotometricMosaic'
For example, on Windows, the correct installation would include:
C:/Program Files/PixInsight/doc/scripts/PhotometricMosaic/PhotometricMosaic.html
C:/Program Files/PixInsight/doc/scripts/PhotometricMosaic/images/

Run the three scripts in the usual way:
SCRIPT -> Mosaic -> PhotometricMosaic

GradientGraphTgtOverlay.png


PhotometryGraphOutlierFix.png



Samples.PNG



PhotometryStars.png
 
Last edited:
ETA: PI V1.8.6

I can't seem to get the Join Region to work, v2.2, I must be doing something wrong?

Ref: Part1 Target: Part2

I create a preview on Part2, select Join Region and select the preview in the "From preview"

phtomosaic0.JPG


It doesn't seem to get used, instead, a new overlap and joinregion is created every time?
phtomosaic1.JPG



Happens in both overlay and Random combination modes.
phtomosaic2.JPG
 
Last edited:
ETA: PI V1.8.6

I can't seem to get the Join Region to work, v2.2, I must be doing something wrong?

Ref: Part1 Target: Part2

I create a preview on Part2, select Join Region and select the preview in the "From preview"

View attachment 9308

It doesn't seem to get used, instead, a new overlap and joinregion is created every time?
View attachment 9306


Happens in both overlay and Random combination modes.
View attachment 9307

(1) The Overlap preview shows the bounding box of the actual overlap between the two images. This is not affected by the specified Join Region. The scale factor is calculated from stars within this region.
(2) The Join Region is being calculated from the specified preview. The specified preview determines the 'thickness' of the Join Region, but the length always extends to the full length of the join. The Join Region determines the gradient that will be subtracted from the target image.

It is designed to work this way because if the specified preview was used without extending it to the the full length of the join, part of the join would be left uncorrected, which would usually be undesirable.

Does this answer your question?

If this mosaic is proving difficult, send me a message with a link to your images (e.g. on google drive, please save the image with XISF Data Block Compression selected) and I will try to find a solution.

Regards
John Murphy
 
(1) The Overlap preview shows the bounding box of the actual overlap between the two images. This is not affected by the specified Join Region. The scale factor is calculated from stars within this region.
(2) The Join Region is being calculated from the specified preview. The specified preview determines the 'thickness' of the Join Region, but the length always extends to the full length of the join. The Join Region determines the gradient that will be subtracted from the target image.

It is designed to work this way because if the specified preview was used without extending it to the the full length of the join, part of the join would be left uncorrected, which would usually be undesirable.

Does this answer your question?

If this mosaic is proving difficult, send me a message with a link to your images (e.g. on google drive, please save the image with XISF Data Block Compression selected) and I will try to find a solution.

Regards
John Murphy

Thanks for the offer John, yes, it's being a bit of a pain as the top and bottom of the join is causing a problem with the extended gradient, which if I could constrain the height of the join would remove the issue I think.

This 2 panel is going to be added to a 4 panel of NGC7000 which is also suffering from similar issues though I have managed to overcome some of that by the order of joining sections together but I still suffer a band at one of the joins in a similar way... though I've noticed that joining with SHO images seems to be a bit better than making the mosaic of seperate filters and then combining to SHO...

Do you just want the registered images?
 
Thanks for the offer John, yes, it's being a bit of a pain as the top and bottom of the join is causing a problem with the extended gradient, which if I could constrain the height of the join would remove the issue I think.

This 2 panel is going to be added to a 4 panel of NGC7000 which is also suffering from similar issues though I have managed to overcome some of that by the order of joining sections together but I still suffer a band at one of the joins in a similar way... though I've noticed that joining with SHO images seems to be a bit better than making the mosaic of seperate filters and then combining to SHO...

Do you just want the registered images?
Yes, send links to the registered images. The XISF Data Block Compression is very efficient at compressing the black areas.

It is useful to have difficult data to test the software and fine tune it.

Regards
John Murphy
 
Yes, send links to the registered images. The XISF Data Block Compression is very efficient at compressing the black areas.

It is useful to have difficult data to test the software and fine tune it.

Regards
John Murphy

Thanks for the help John! (y)

My key learning from this is to make sure you inspect the edges of the source and target images in readout mode to ensure you have a clean edge, in one of my images there was a background that wasn't 0 near the edge of the actual image data, I think this might have been a none visible remnant of the channel combination in to SHO

This script certainly has made my experiments in mosaics far easier! :) Thank You for that John.
 
I am currently working on version 2.3
Improvements include:
  • Improved photometry accuracy
  • The default background sample size will be calculated from the pixel angular size from the plate solved FITS header entry
  • The gradient graphs have been improved to make them much easier to interpret
  • Updated user interface
The code is almost finished, and I will start updating the tooltips and help file very soon.
John Murphy
 
John

Your tool is fantastic! I hope it gets included in future releases of PixInsight as standard. I could not have done any of the below without it. It takes little time learning to use it and despite the size of the panels it's handling for me, it always delivers!
Thank you for sharing it!

Roberto

M45 - 2x2
-k0tACYGDRWY_1824x0_kLAwEngG.jpg


Veil Complex - 3x3
OF1-AlB8R4Qs_1824x0_z0-o-ol5.jpg


Sh2-150 - 1x2
kv-ceQwuyyYc_1824x0_n2P9MPgJ.jpg


Cederblad 214 - 2x2
yVSxHE6S7R0-_1824x0_O9v_WA7x.jpg
 
Installation instructions:
Unzip the attached MosaicScripts.zip file. Save the JohnMurphy folder anywhere you wish.
Then, in PixInsight, use 'SCRIPT > Feature Scripts...' and then in the 'Feature Scripts' dialog box, press the 'Add' button and select the JohnMurphy folder. It should find the three scripts.

Hi, John. I ran into a snag trying to install your script. I unzipped to a shared folder on my Linux server, then I followed the instructions above, but when I navigated to the JohnMurphy folder, PI couldn't find any scripts during its search (attached snap1.jpg). Even when I specified the mosaics folder under JohnMurphy (where the three .js files are located; see snap2.jpg), PI still didn't find them.

Can you tell me what I'm doing wrong?

--- Mike
 

Attachments

  • Snap1.jpg
    Snap1.jpg
    20.7 KB · Views: 122
  • Snap2.jpg
    Snap2.jpg
    21.2 KB · Views: 101
...but when I navigated to the JohnMurphy folder, PI couldn't find any scripts during its search (attached snap1.jpg). Even when I specified the mosaics folder under JohnMurphy (where the three .js files are located; see snap2.jpg), PI still didn't find them.

Never mine. I moved the .js files and the lib folder from the mosaics folder up one level to the JohnMurphy folder, than followed the instructions again. Now your three scripts appear in the Feature Scripts list.

--- Mike
 
Back
Top