Open awhoward opened 3 months ago
As a summary to reference later, here is my current sandbox approach for drift-correcting the stellar spectra (copied from slack thread, but listed here for convenience):
For the stellar RV calculation: -Select only observations that have both an evening LFC_WLS master and a morning LFC_WLS master with the same UT date. -Compute the stellar RV using the evening master LFC WLS, only including orders that are LFC-calibrated (>order index 11 on the Green).
For the LFC drift tracking: -Compute every day’s LFC master ‘RV’ (evening and morning) using the evening LFC_WLS master solution only. For evening masters, the RV should be very close to 0 since the WLS is derived from this file. -Linearly interpolate each day’s evening-to-morning LFC RV drift onto the timestamps of the stellar observations.
Stellar spectra quality cuts: -Outlier rejection at >1000 m/s off of the median target RV. This does nothing for some targets, for others it removes some clear outliers that should be followed up on jump. -Rejection of points where the RV error is >2x the median RV error in the timeseries (i.e. if the flux level is a factor of 4x lower than the median observation for that target, reject that point.). This also typically affects very few points.
We will sprint on this.
Components needed:
modules/wavelength_cal/src/wavelength_cal.py
calledWaveInterpolate
. There will also be a method in a new class calledWaveInterpolation
inmodules/wavelength_cal/src/alg.py
. @bjfultn will develop this. He should start a new branch (feature/drift_corr
) ASAP and merge it to develop. @RussLaher and @shalverson can then use these classes.WaveInterpolation
so that it can be run in other environments. The algorithm should look backward first and return the best WLS (order: LFC, Thar), then look forward in time and return a matching type of WLS, if available, and return nothing if unavailable. @RussLaher will develop this.WLSFILE
is truncated; it should be split). Let's also add a keyword calledWLSNOTE
that can have comments about the WLS interpolation used (e.g., "linear interpolation").Testing (@howardisaacson):
/testdata
directory to store outputs./testdata
, and run it./testdata
. This could be accomplished withAnalyzeTimeSeries()
or using other methods.