when the program first starts, the Halpha image is displayed in the mainframe.
the user can click 'r' to display the r-band image, and then 'h' to get back to Halpha.
however, every time a new image is displayed, the zoom goes back to the full image. Ideally, the zoom will be the same as before changing the image, so that if I'm inspecting a galaxy in Halpha and want to see what it looks like in r, I don't have to recenter and rezoom.
I tried to implement this
if key == 'r':
z = self.coadd.fitsimage.settings.get_setting('zoomlevel')
print('zoom = ',z)
p = self.coadd.fitsimage.settings.get_setting('pan')
print('pan = ',p)
self.coadd.fitsimage.set_data(self.r)
self.coadd.fitsimage.zoom_to(z.value)
self.coadd.fitsimage.panset_xy(p.value[0],p.value[1])
self.coadd.canvas.redraw()
elif key == 'h':
self.coadd.fitsimage.set_data(self.halpha_cs)
Unfortunately, this doesn't work.
this is an enhancement - it doesn't really hinder forward progress on research, so I'll leave this for a later date once the code is operational.
Unfortunately, this doesn't work.