I am using a synthetic template image (created by the CatalogStarGenerator script) as a Reference Image in StarAlignment process to allow me to skip the image-by-image "Register/Union - Mosaic" working mode to create such a template (which is usually necessary before using the GradientMergeMosiac process to combine the various sub-frames of the mosaic seamlessly with each other.)
Everything works great, except for one thing, which become apparent in the output from the Process console:
---
StarAlignment: Processing view: M31_0202_crop
Synthetic_M31Area_GSC_VMag:
Structure map: done
Detecting stars: done
9508 stars found.
M31_0202_crop:
Structure map: done
Detecting stars: done
117 stars found.
* Reference image: Limiting to 2000 brightest stars.
Matching stars: done
112 putative star pair matches.
Performing RANSAC: done
80 star pair matches in 131 RANSAC iterations.
Summary of model properties:
Inliers : 0.714
Overlapping : 0.112
Regularity : 0.497
Quality : 0.496
Root mean square error:
delta_RMS : 0.677 px
RMS error deviation:
sigma_RMS : 0.272 px
Peak errors:
delta_x_max : 1.998 px
delta_y_max : 1.906 px
Transformation matrix:
-0.0091 -0.9980 +7284.1440
+0.9980 -0.0092 -5435.3911
-0.0000 -0.0000 +1.0000
scale : 1.003
scale-X : 1.002
scale-Y : 1.002
rotation : +90.52 deg
dx : +7284.14 px
dy : -5435.39 px
Generating registered image: M31_0202_crop_registered
Homographic Projection / Lanczos-3 interpolation, c=0.30: done
Linear frame adaptation functions:
y0 = +0.000100 + 0.000000*x0
Applying frame adaptation: done
** Insufficient data - skipping frame adaptation for channel #1
** Insufficient data - skipping frame adaptation for channel #2
Registration successful.
27.057 s
---
What is happening is that the Linear Frame Adaptation function is setting all of the red channel (channel #0) to 0.0001, effectively stripping it away. Since the synthetic reference image is grey, while the target images are debayered RGB, it makes sense that there would be insufficient data for channels #1 and #2. If it only left the #0 channel alone also, the technique would work great! The statistics show what is happening:
The Synthetic reference image:
Synthetic_M31Area_GSC_VMag
K
count (%) 99.99991
count (px) 104857506
mean 0.0001030
median 0.0001000
avgDev 0.0000030
MAD 0.0000000
minimum 0.0001000
maximum 0.9910045
The debayered OSC sub-frame:
M31_0202_crop
R G B
count (%) 100.00000 100.00000 100.00000
count (px) 10481300 10481300 10481300
mean 0.0110300 0.0090045 0.0110308
median 0.0108227 0.0088418 0.0108397
avgDev 0.0004228 0.0003293 0.0003902
MAD 0.0002009 0.0001562 0.0001854
minimum 0.0093026 0.0077639 0.0094153
maximum 0.3626077 0.2728820 0.3425369
The frame adapted, registered sub-frame:
M31_0202_crop_registered
R G B
count (%) 10.02248 10.02248 10.02248
count (px) 10509329 10509329 10509329
mean 0.0001000 0.0090046 0.0110309
median 0.0001000 0.0088416 0.0108391
avgDev 0.0000000 0.0003286 0.0003890
MAD 0.0000000 0.0001554 0.0001841
minimum 0.0001000 0.0077911 0.0094040
maximum 0.0001001 0.2715408 0.3376214
The technique of using a synthetic image as a reference image template for creating a mosaic is very powerful, and works well, except for this small problem. I hope someone can point me to a work-around or perhaps it can be sorted out with some code changes.
Just to give you a taste for how close it is to working, I have attached an screen capture of the merged mosaic I am working on, straight out of GradientMergeMosaic, and only missing the red channel!
Steve.