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

Address `.imshow` + `.pcolormesh` aliasing issues. Add `.paint` as friendlier wrapper. #246

Open zkbt opened 2 months ago

zkbt commented 2 months ago

This pull request addresses @Pat-Wachiraphan 's issue in #238, where previous versions of .imshow and .pcolormesh both failed to accurately display Rainbow flux arrays that contained many more data points than there were pixels available. The main changes are:

zkbt commented 2 months ago

@Pat-Wachiraphan and @catrionamurray , while addressing the weird behavior for imshow/pcolormesh-ing large arrays in #238 , I'm trying to clarify the ways we make 2D flux plots. Previously, .imshow() was our default and would sneakily try to switch to .pcolormesh() in the background, if it seemed like that would help. I worry that's going to cause confusion, since they now can behave a bit more differently, so I'm hoping to do this instead:

I wanted to give you the heads up because I found-and-replaced imshow_quantities and imshow_with_models to paint_quantities and paint_with_models, and I believe this would likely break some chromatic_fitting functionality? It's a small dumb thing, but wanted to make sure you were aware of it!

zkbt commented 2 months ago

@Pat-Wachiraphan and @catrionamurray , I added you as reviewers, to make sure you see this!