RvSpectML Internals
As a heads up, these functions and types are more likely to change going forward than functions and types that are exported.
Functions
General purpose
RvSpectML.bin_times
— Method.bintimes() Bins times from a SpectralTimeSeriesCommonWavelengths object using the groupings from timeidx in the metadata.
calc_chunk_rvs_from_taylor_expansion( spectra )
Inputs:
- spectra: SpectralTimeSeriesCommonWavelengths
Optional Arguments:
- mean: mean spectrum
- deriv: dmeanflux/dlnλ
- equal_weight: For now, spectra are equal weighted. (true)
Output named pair:
- rv: Vector of vector of estimated radial velocities for each chunk
- σ_rv: Vector of vector of uncertainties in rv estimates for each chunk
RvSpectML.calc_d2fluxdlnlambda2!
— Method.Estimate numerical second derivative of fluxes given wavelengths.
RvSpectML.calc_d2fluxdlnlambda2
— Method.Estimate numerical second derivative of fluxes given wavelengths.
RvSpectML.calc_dfluxdlnlambda!
— Method.Estimate numerical derivative of fluxes given wavelengths.
RvSpectML.calc_dfluxdlnlambda
— Method.Estimate numerical derivative of fluxes given wavelengths.
RvSpectML.calc_mean_d2fluxdlnlambda2
— Method.Return mean numerical derivative (d²flux/dlnλ²) based on a common set of wavelengths. Inputs:
- flux (2d)
- var (2d)
- λ (1d)
- chunk_map: Array of ranges specifying how each chunk maps into indexes of output derivative
Output:
- d²flux/dlnλ²: (1d)
RvSpectML.calc_mean_dfluxdlnlambda
— Method.Return mean numerical derivative (dflux/dlnλ) based on a common set of wavelengths. Inputs:
- flux (2d)
- var (2d)
- λ (1d)
- chunk_map: Array of ranges specifying how each chunk maps into indexes of output derivative
Output:
- dflux/dlnλ: (1d)
RvSpectML.calc_mean_spectrum
— Method.Return mean flux (averaging over observations at different times, variance weighted) based on a common set of wavelengths. Inputs: flux & var (2d: pixel, time)
RvSpectML.calc_rvs_from_taylor_expansion
— Method.calc_rvs_from_taylor_expansion( spectra )
Inputs:
- spectra: SpectralTimeSeriesCommonWavelengths
Optional Arguments:
- mean: mean spectrum
- deriv: dmeanflux/dlnλ
- idx: range of pixel indcies to use for calculation
- equal_weight: For now, spectra are equal weighted. (true)
Output named pair:
- rv: Vector of estimated radial velocities
- σ_rv: Vector of uncertainties in rv estimates
calc_rvs_from_taylor_expansion_alt( spectra )
Experimental version of calcrvsfromtaylorexpansion.
repackfluxvectortochunkmatrix(λ, flux, var, chunkmap, λc; alg ) Warning: This doesn't work yet
Radial Velocity Related
Modules = [RvSpectML.DCPCA, RvSpectML.LineFinder ] #, RvSpectML.PPCA ]
Public = false
Order = [ :function ]
Interpolation
Original author: Joe Ninan Converted to Julia and optimized by Christian Gilbertson & Eric Ford Returns a cubit interpolator for windowed sinc Filter curve. noofpoints: number of intepolation points to use in cubic inteprolator
predictgpmeanvar(gp, xpred ; uselogx, use_logy) Inputs:
- gp:
- xpred: Locations to predict GP at
Optional inputs:
- use_logx: If true, apply log transform to xpred before evaluating GP
- use_logy: If true, apply exp transform after evaluating GP
Returns tuple with vector of means and variance of GP posterior at locations in xpred.
Other
Types
General purpose
Radial Velocity Related
Modules = [ RvSpectML.DCPCA, RvSpectML.LineFinder ] #, RvSpectML.PPCA ]
Public = false
Order = [:type ]