Hi Brian,
I chose not to reply when you posted this two months ago, because I didn’t feel I have a good solution and I didn’t know exactly what’s the problem you were facing. Now this topic was brought back by Carl. I feel a bit more confident about talking about it, because I also struggled with this in the past few months and I had found a solution.
Based on your description (wanted to use photometric mosaic but it’s too difficult to use), I guess the bottleneck you were facing was matching the brightness/color/contrast of the mosaic panels. I experienced many methods: photometric mosaic, linear fit, APP, Registar. All these have the capability to match the brightness/color/contrast of mosaic panels, and none worked for me.
Photometric mosaic first. It’s tedious to use as you mentioned. Furthermore, matching panel by panel can propagate errors to subsequent panels. So this isn’t really ideal. My way of using photometric mosaic was to shoot a wide-field image that covers the entire mosaic. It’s wide-field, so it usually contains much more nebular-free regions for good gradient removal. The gradient removed wide-field image can then be registered (WCS matched) to each mosaic panel to form a reference image. (So if you have N mosaic panels, you will have N reference images from the wide-field image.). Then the reference image can be used in photometric mosaic to both remove the gradient in its counterpart mosaic panel, as well as match the brightness/color/contrast of the panel to the reference image. Since all reference images come from the same wide-field image, this essentially match the brightness/color/contrast of all the panels. Then the panels can go through mosaic by coordinates and the standard mosaicking process. You mentioned that gradient merge mosaic does not work well. This is almost always true, and I truly think it is a flawed tool. However, if all the panels have nearly perfectly removed gradient and nearly perfectly matched brightness/color/contrast to start with, then gradient merge mosaic actually works OK. It needs your help to perform well.
The above method still doesn’t escape from the fact that photometric mosaic works only on a pair of image each time. So it’s still tedious. But it’s much more efficient than asking it to work on two large images (created by mosaic by coordinates) where only a tiny fraction of them actually contain data. If it can give nice results, I find the time required by this worthwhile…… if it can give nice results. This used to work for me in the past, but not any more for my recent, much larger mosaic. (A small fraction of this mosaic can be seen here.) Photometric mosaic couldn’t match the brightness/color/contrast well enough. Nor does any other methods (APP, linear fit in PI, Registar, etc).
I came to the conclusion that none of these method can match the brightness/color/contrast of my mosaic panels because the star density is way too high. Extremely high star density (reaching “confusion limit,” I believe you know this term as a radio astronomer) means problematic photometry, and I believe this causes trouble for photometric mosaic. At the same time, linearly fitting the pixels who are either extremely dark (background region) or are very bright (stars) is subject to the PSF difference of the two panels in the overlapping region. This causes trouble for fitting based methods like linear fit, Registar, APP, gradient merge mosaic, etc. They only work well when the overlapping regions contain diffuse emission with large brightness variation (so the fitting mainly relies on the diffuse part, not on stars).
I spend nearly half year experiencing all kinds of different mosaic strategies. None of them worked, likely because of the reasons I mentioned above. At the end, after realizing (or guessing) that the stars are the problems, what I did are:
Use a wide-field image as a gradient removal model, like I used to do with photometric mosaic. However, this time, I don’t use photometric mosaic. I use PI’s multi-scale gradient correction tool. I believe most people use this tool with PI’s MARS database. But this tool does offer the option of using user’s own reference image. In general, it works almost as well as photometric mosaic, but much much faster, and it’s easily scriptable. So if you have a good reference image, this is the way to go, for the gradient removal part.
Mosaic by coordinates for all the panels.
I rely on the fact that my target (Milky Way around Crux region, shoot from Western Australia) had relatively a small range of airmass during my imaging and there were no clouds (photometric condition). So I gave up matching the contrast of the panels (the slope term in the fitting) and I assume they all have consistent photometry to start with. Then all I want is to match a constant offset in the image background (caused by different levels of airglow/aurora). I wrote a PI script (with help from ChatGPT) to calculate the medians (R,G,B separated) of the overlapping region between panels to subtract the median offset. This is done on pairs of panels after mosaic by coordinates.
Here comes the key. If the median offset subtraction is done on regular images, it will equally suffer from the problems caused by dense star fields. It will NOT work. What I did is, I sent two sets of images to mosaic by coordinates in step #2: the starless version and the star-only version. (I use StarNet by the way.) Only the starless ones need to go through the median offset matching process, the star-only images don’t (since the star-only images have zero background). This matches the starless panels very nicely. The matched panels were sent to gradient merge mosaic, and it can handle whatever small amounts of residual mis-match in background brightness and create a seamless starless mosaic without artifacts.
Then I use the regular integration tool to combine the star-only panels, and add the star-only mosaic to the starless mosaic. Basically this is how this image was created. This is a small subset of the mosaic that I am working on. The success is a proof of concept. I also tried the method on the full mosaic at a reduced resolution (to speed up the processing). Now I just need to find time to work on the full mosaic at native resolution. It could be another half year of works.
The method I described above is definitely not a perfect solution. Instead, it is created because none of the existing tools work. It’s a terrible workaround, I would say. But I hope what I wrote above can give you some ideas—especially if your struggle has the same nature as mine. If the fundamental issue of your struggle is different, then the above may not help.
Anyway, good luck to your works. I am looking forward to see your results.