Moment images no longer have attribute FITSFigure
jmangum opened this issue · 4 comments
jmangum commented
Change from python 3.7 to python 3.9 environments has resulted in the FITSFigure
attribute not being assigned to the moment images created. This messes-up the quicklook plots. Specifically:
if hasattr(mom, 'FITSFigure'):
mom.FITSFigure.colorbar.show(axis_label_text=labels[moment].format(mom.unit.to_string('latex_inline')))
mom.FITSFigure.save(filename=figfilename)
mom.FITSFigure.close()
else:
mom.figure.savefig(figfilename)
...does not produce the nice quicklook plot as before. Not sure which attribute I should test against now.
keflavich commented
you need to pip install aplpy
to fix this
jmangum commented
I thought I had, but apparently not. Would it make sense to spit out a warning when the FITSFigure attribute is missing with instructions on what to do?
keflavich commented
yes, this has been an issue for a while... radio-astro-tools/spectral-cube#835