You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Was working on plotting some IGRINS spectra order by order this morning and I found this weird glitch. When you execute a line like specs[0][order].normalize().plot() (where specs is a list of IGRINSSpectrumLists) the plotted spectrum for a particular order is nicely normalized, but if you initialize a matplotlib figure and subplot and instead execute specs[0][order].normalize().plot(ax = ax) the plotted order is not normalized. If instead you set your new axis equal to the plot for the normalized order (ax = specs[0][order].normalize().plot()) the order is normalized and you can change things about the plot like the title, range, etc. Thought it was kind of weird, is anyone else running into this?
The text was updated successfully, but these errors were encountered:
My guess is this is a copy issue--- whether the .plot operates on a copy or a view of the original. As a workaround, I recommend making an intermediate spectrum:
Merely a workaround until a scrupulous look at how/whether intermediate copies are made. The copying behavior is a legacy of how specutils stores SpectrumCollections. Someday I'd like to get a specutils contributor to give a critical look at muler-- they'd probably have some good guidance.
Was working on plotting some IGRINS spectra order by order this morning and I found this weird glitch. When you execute a line like
specs[0][order].normalize().plot()
(where specs is a list of IGRINSSpectrumLists) the plotted spectrum for a particular order is nicely normalized, but if you initialize a matplotlib figure and subplot and instead executespecs[0][order].normalize().plot(ax = ax)
the plotted order is not normalized. If instead you set your new axis equal to the plot for the normalized order (ax = specs[0][order].normalize().plot()
) the order is normalized and you can change things about the plot like the title, range, etc. Thought it was kind of weird, is anyone else running into this?The text was updated successfully, but these errors were encountered: