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

add ability to read and work with echelle spectra #69

Closed zkbt closed 2 years ago

zkbt commented 2 years ago

@will-waalkes and I are working on a modeling problem where it'd be nice to be able to load multiple exposures of a single order of an echelle spectrum into a Rainbow object. One key challenge with this is that the different time points will generally have ever-so-slightly different wavelength arrays associated with them, whereas many Rainbow abilities require a single 1D wavelength array that applies to all times. Here's our plan:

@will-waalkes is going to draft a from_nres reader to load in NRES spectra for a single order.

@zkbt is going to work on making sure the next step goes smoothly.

I'm super stoked to be able to bin and visualize high resolution spectra with chromatic!

zkbt commented 2 years ago

OK, @will-waalkes , I think I have things mostly drafted in the add-wobbly-wavelengths branch to allow us to align slightly variable wavelength arrays onto one shared wavelength axis. This example shows a fake stellar absorption spectrum with different wavelength grids for each time, shifted (by a known amount) to line up on the same shared wavelength axis:

wavelength-alignment-demonstration

zkbt commented 2 years ago

I'll take a look at your draft of the NRES reader in the morning, and we can start try to tie these both together!

will-waalkes commented 2 years ago

That wavelength alignment looks great! I still need to add a few lines of code to loop through all the observations and open the same order for each time point. Currently it is only opening a single order from a single observation.

zkbt commented 2 years ago

Hi @will-waalkes ! Since you made some plots loading in an NRES order with this, could you please post an imshow plot here so we can document our progress? The H-alpha order you showed me earlier today was great, except maybe set vmin=0.5, vmax=1.5 or some such, to show the photospheric lines a little more clearly?

zkbt commented 2 years ago

And if you made any more changes to the add-nres-reader branch, please commit and push them. I'll try to merge it into the main code later this week!

zkbt commented 2 years ago

I'll call this one closed by #71 , but I'll open a new one saying that we should add an example or two to the documentation, showing how to load and work with NRES data. Please keep this in mind as you're progressing on your project, of imagining what a nice short example might look like.