PhotometricMosiac 2.0

jmurphy

Active member
Jun 13, 2010
30
11
This is a significant update of the PhotometricMosaic script.
The script is attached. The help files:


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
 

Attachments

Last edited:

jmurphy

Active member
Jun 13, 2010
30
11
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.
 

Attachments

avan1

Active member
Feb 15, 2011
25
0
just install the script and test with my M33 mosaic

but trim mosaic tile keep reporting error , any idea ?trimMosaisErr1b.jpg
 

jmurphy

Active member
Jun 13, 2010
30
11
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:

rakla

Well-known member
Dec 17, 2018
45
7
Switzerland
ko-fi.com
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
 

jmurphy

Active member
Jun 13, 2010
30
11
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
 

jmurphy

Active member
Jun 13, 2010
30
11
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)
The help zip:

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 :(
 

Attachments

Last edited:

sn2006gy

Active member
Jun 10, 2020
30
4
This is amazing, thank you for this!! saved me a *LOT* of time! Hopefully they get you incorporated into PI directly with auto updates ;)
 

jmurphy

Active member
Jun 13, 2010
30
11
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:

jmurphy

Active member
Jun 13, 2010
30
11
I have just released PhotometricMosaic version 2.2
The script is attached. The updated help file link:

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
 

Attachments

Last edited:

jiberjaber

Member
Feb 2, 2014
6
0
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:

jmurphy

Active member
Jun 13, 2010
30
11
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
 

jiberjaber

Member
Feb 2, 2014
6
0
(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?
 

jmurphy

Active member
Jun 13, 2010
30
11
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
 
  • Like
Reactions: jiberjaber

jiberjaber

Member
Feb 2, 2014
6
0
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.