ginga
ginga copied to clipboard
Add precise image warping to Mosaic plugin
This adds an option to the Mosaic plugin to warp images precisely according to the WCS of the reference image. This option is slower than the standard rotate/flip mosaicing, but can produce more accurate mosaics, especially when there is some distortion near the edge of the field.
The same functionality was previously added to the Collage plugin.
Left todo: tile labelling
labeling fixed
@pllim, it should be in good enough shape for you to test now. I think your org has a plugin that is a subclass of this, right?
Probably there are some more things to fix or work out for backward compatibility. For example, it now creates an alpha mask in the mosaic image so that the empty space between the tiles does not show. But we might need to strip it off for saving the result mosaic? Let me know how it breaks things for you! :smile_cat:
Rebased
Thanks, I'll put this in my queue to review. 😸
Thanks, I'll put this in my queue to review. smile_cat
Take your time. I propose to bump this forward for release 4.0 in the fall.
@ejeschke , sorry this slipped through. Are you still waiting for my review? Would you mind rebasing? Thanks!
Rebased. No hurry on this one, @pllim!
This should still be considered a draft PR.
I checked out this branch, using dev version of stginga
, and dev version of wss_tools
. I loaded over 300 small images. Then I used MosaicAuto plugin for this workflow: https://wss-tools.readthedocs.io/en/latest/wss_tools/quip/usage_thumbs.html
https://wss-tools.readthedocs.io/en/latest/wss_tools/quip/mosaicauto.html
I get this error:
AssertionError
Non-GUI thread (...) is executing GUI (...) code! File ".../ginga/ginga/rv/Control.py", line 424, in error_wrap
return method(*args, **kwargs)
File ".../ginga/rv/plugins/Mosaic.py", line 484, in mosaic
self.fv.assert_gui_thread()
File ".../ginga/ginga/gw/GwMain.py", line 224, in assert_gui_thread
assert my_id == self.gui_thread_id, \
There is no error with the same images using dev version of Ginga instead of this branch.
Kicked down the road to release 4.1
Rebased