Closed zkbt closed 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:
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!
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.
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?
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!
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.
@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 manyRainbow
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.r = Rainbow('bla/*e92-1d.fits', format='nres', order=57)
to load in a bunch of files and organize their fluxes, times, and wavelengths into a rainbow..timelike['time']
with the BJD and.fluxlike['flux']
with the normalized flux. It should also populate a.fluxlike['uncertainty']
array with the normalized uncertainty. Because there are a lot of masked wavelengths in the dataset we're dealing with, we should also populate a.fluxlike['mask']
so we can keep track of which data points are good and bad..fluxlike['wavelength']
2D array.@zkbt is going to work on making sure the next step goes smoothly.
mask
can be propagated appropriately everywhere it needs to be (= is theok
array being used everywhere it needs to be)?imshow
will behave reasonably even with wildly sparse time grids. (Switch to aTime Index
option, as we did for irregular wavelength grids.)I'm super stoked to be able to bin and visualize high resolution spectra with chromatic!