zkbt / chromatic

Tools for visualizing spectrosopic light curves, with flux as a function of wavelength and time.
MIT License
14 stars 4 forks source link

fix numpy/imshow/units problem #234

Closed zkbt closed 12 months ago

zkbt commented 12 months ago

I'm not sure why, but some problem emerged with some new version of either numpy, matplotlib, or astropy where attempting to imshow quantities with astropy units would through unit conversion errors. This PR (I think!) fixes the problem by stripping units before imshowing them with remove_units.

It also modifies rainbow.imshow to default to .pcolormesh for non-uniform grids, unless being told not to with use_pcolormesh=False.