Functions Exported by RvSpectML

General purpose

RvSpectML.bin_spectra_consecutiveMethod

binspectraconsecutive Bins consecutive spectra from a SpectralTimeSeriesCommonWavelengths object

WARNING: Simply takes consecutive spectra, so some bins may be from spectra that weren't taken close together. TODO: Create version that pays attention to timestamps.

source
RvSpectML.bin_spectra_max_ΔtMethod

binspectramax_Δt Bins spectra from a SpectralTimeSeriesCommonWavelengths object with a maximum spacing between observation times

source
RvSpectML.bin_spectra_nightlyMethod

binspectranightly Bins spectra from a SpectralTimeSeriesCommonWavelengths object with a maximum spacing between observation times

source
RvSpectML.bin_times_consecutiveMethod

bintimesconsecutive( times, n ) Computes mean times from conseuctive bins of n times (to go with binconsecutivespectra). Returns floor(length(times)/n) elements.

WARNING: Simply takes consecutive times, so some bins may be from spectra that weren't taken close together. TODO: Create version that pays attention to timestamps.

source
RvSpectML.calc_depth_and_expected_rv_precissionMethod

calc_depth_and_expected_rv_precission(spectrum, pixels_index, order_index; smooth_factor) Calculate expected RV uncertainty for one portion of spectrum given by pixels and order indicies. Assumes only photon noise with given variances. Returns (depth, exp_σ_rv)

source
RvSpectML.calc_formal_rv_precissionMethod

calc_formal_rv_precission(spectra, chunklist_timeseries; smooth_factor) Calculate expected RV uncertainty for each spectrum in an array of spectra and corresponding chunklist_timeseries, Assumies only photon noise with given variances.

source
RvSpectML.calc_formal_rv_precissionMethod

calc_formal_rv_precission(spectrum, chunklist; smooth_factor) Calculate expected RV uncertainty for one spectrum and corresponding chunklist, Assumes only photon noise with given variances.

source

Interpolation Algorithms

RvSpectML.LinearInterpolation.interp_chunk_to_grid_linear!Method

interp_chunk_to_grid_linear!( flux_out, var_out, chunk_of_spectrum, wavelengths ) Return spectra interpolated onto a grid of points using linear interpolation.

Arguments:

  • flux_out: (results stored into this array)
  • var_out: (results stored into this array)
  • chunkofspectrum
  • wavelengths: AbstractRange or AbstractArray of locations where chunk is to be interpolated to

Optional Arguments:

  • Filter: Vector with pre-allocated workspace (if length>=1)

Returns

  • flux_out
source
RvSpectML.LinearInterpolation.interp_chunk_to_grid_linearMethod

interp_chunk_to_grid_linear( chunk_of_spectrum, wavelengths ) Return spectra interpolated onto a grid of points using linear interpolation.

Arguments:

  • chunkofspectrum
  • wavelengths: AbstractRange or AbstractArray of locations where chunk is to be interpolated to

Returns

  • flux_out
source
RvSpectML.LinearInterpolation.interp_chunk_to_shifted_grid_linear!Method

interp_chunk_to_grid_linear!( flux_out, var_out, chunk_of_spectrum, wavelengths ) Return spectra interpolated onto a grid of points using linear interpolation.

Arguments:

  • flux_out: (results stored into this array)
  • var_out: (results stored into this array)
  • chunkofspectrum
  • wavelengths: AbstractRange or AbstractArray of locations where chunk is to be interpolated to
  • boostfactor: divide wavelengths by boostfactor

Optional Arguments:

  • Filter: Vector with pre-allocated workspace (if length>=1)

Returns

  • flux_out
source
RvSpectML.LinearInterpolation.interp_chunk_to_shifted_grid_linearMethod

`interpchunktoshiftedgridlinear( chunkofspectrum, wavelengths, boostfactor ) Return spectra interpolated onto a grid of points using linear interpolation.

Arguments:

  • chunkofspectrum
  • wavelengths: AbstractRange or AbstractArray of locations where chunk is to be interpolated to
  • boostfactor: divide wavelengths by boostfactor

Optional Arguments:

  • Filter: Vector with pre-allocated workspace (if length>=1)

Returns

  • flux_out
source
RvSpectML.SincInterpolation.interp_chunk_to_grid_sinc!Method

interp_chunk_to_grid_sinc!( flux_out, var_out, chunk_of_spectrum, wavelengths ) Return spectra interpolated onto a grid of points using sinc interpolation.

Arguments:

  • flux_out: (results stored into this array)
  • var_out: (results stored into this array)
  • chunkofspectrum
  • wavelengths: AbstractRange or AbstractArray of locations where chunk is to be interpolated to

Optional Arguments:

  • Filter: Vector with pre-allocated workspace (if length>=1)

Returns

  • flux_out
source
RvSpectML.SincInterpolation.interp_chunk_to_grid_sincMethod

interp_chunk_to_grid_sinc( chunk_of_spectrum, wavelengths ) Return spectra interpolated onto a grid of points using sinc interpolation.

Arguments:

  • chunkofspectrum
  • wavelengths: AbstractRange or AbstractArray of locations where chunk is to be interpolated to

Returns

  • flux_out
source
RvSpectML.SincInterpolation.interp_chunk_to_shifted_grid_sinc!Method

interp_chunk_to_shifted_grid_sinc!( flux_out, var_out, chunk_of_spectrum, wavelengths, boost_factor ) Return spectra interpolated onto a grid of points using sinc interpolation.

Arguments:

  • flux_out: (results stored into this array)
  • var_out: (results stored into this array)
  • chunkofspectrum
  • wavelengths: AbstractRange or AbstractArray of locations where chunk is to be interpolated to
  • boostfactor: divide wavelengths by boostfactor

Optional Arguments:

  • Filter: Vector with pre-allocated workspace (if length>=1)

Returns

  • flux_out
source
RvSpectML.SincInterpolation.interp_chunk_to_shifted_grid_sincMethod

interp_chunk_to_shifted_grid_sinc( chunk_of_spectrum, wavelengths, boost_factor ) Return spectra interpolated onto a grid of points using sinc interpolation.

Arguments:

  • chunkofspectrum
  • wavelengths: AbstractRange or AbstractArray of locations where chunk is to be interpolated to
  • boostfactor: divide wavelengths by boostfactor

Optional Arguments:

  • Filter: Vector with pre-allocated workspace (if length>=1)

Returns

  • flux_out
source
RvSpectML.SincInterpolation.spectra_interpolateMethod

Original author: Joe Ninan Converted to Julia and optimized by Christian Gilbertson Further adapted/optimized by Eric Ford Additional optimizations possible by preallocating arrasy for minargs, Nminargs, minvalues, FilterValues and OldYCoords.

source
RvSpectML.TemporalGPInterpolation.construct_gp_posteriorMethod

construct_gp_posterior(xobs, yobs; sigmasq_obs, use_logx, use_logy, smooth_factor, boost_factor ) Inputs:

  • xobs: x locations where data is provided
  • yobs: y values of data to condition on

Optional Inputs:

  • sigmasq_obs: variances for y values being conditioned on
  • use_logx: If true, take log's of x values before fitting GP
  • use_logy: If true, perform log transform on y's
  • smooth_factor: scales GP hyperparameters so as to result in smoother GP posterior (1)
  • boostfactor: scales xobs by 1/boostfactor (1)

Returns:

  • Posterior GP at locations xpred given training data
source
RvSpectML.TemporalGPInterpolation.construct_gp_priorMethod

construct_gp_prior() Returns a GP prior using a Matern 5/2 kernel and specified parameters Optional Inputs:

  • smoothfactorσ²: Multiplies variance for GP kernel (1)
  • smoothfactorl: Multiplies length scale for GP kernel (1)
  • σ²: Variance for GP kernel (0.5)
  • l: length scale for GP kernel (5.8e-5)
source
RvSpectML.TemporalGPInterpolation.interp_chunk_to_grid_gp_temporalMethod

interp_chunk_to_grid_gp_temporal( chunk_of_spectrum, wavelengths ) Return spectra interpolated onto a grid of points using linear interpolation.

Arguments:

  • chunkofspectrum
  • wavelengths: AbstractRange or AbstractArray of locations where chunk is to be interpolated to

Returns

  • flux_out
source
RvSpectML.TemporalGPInterpolation.interp_chunk_to_shifted_grid_gp_temporal!Method

interp_chunk_to_grid_gp_temporal!( flux_out, var_out, chunk_of_spectrum, wavelengths ) Return spectra interpolated onto a grid of points using linear interpolation.

Arguments:

  • flux_out: (results stored into this array)
  • var_out: (results stored into this array)
  • chunkofspectrum
  • wavelengths: AbstractRange or AbstractArray of locations where chunk is to be interpolated to
  • boostfactor: divide wavelengths by boostfactor

Optional Arguments:

  • Filter: Vector with pre-allocated workspace (if length>=1)

Returns

  • flux_out
source
RvSpectML.TemporalGPInterpolation.interp_chunk_to_shifted_grid_gp_temporalMethod

`interpchunktoshiftedgridgptemporal( chunkofspectrum, wavelengths, boost_factor ) Return spectra interpolated onto a grid of points using linear interpolation.

Arguments:

  • chunkofspectrum
  • wavelengths: AbstractRange or AbstractArray of locations where chunk is to be interpolated to
  • boostfactor: divide wavelengths by boostfactor

Optional Arguments:

  • Filter: Vector with pre-allocated workspace (if length>=1)

Returns

  • flux_out
source
RvSpectML.TemporalGPInterpolation.predict_meanMethod

predictgpmean(gp, xpred ; uselogx, uselogy) Inputs:

  • gp:
  • xpred: Locations to predict GP at

Optional inputs:

  • use_logx: If true, apply log transform to xpred before evaluating GP

Returns vector of means of GP posterior at locations in xpred.

source

Other

RvSpectML.Pipeline.prepare_line_listMethod

preparelinelist( linelistfn, allspectra, pipeline; recalc, convertairtovacuum, orderstouse, Δvtoavoidtellurics, vcentertoavoidtellurics ) linelistfn is the full path to the line list file linelistfn is loaded as a VALD mask if it contains substring "VALD", and linelistfn is loaded as an ESPRESSO mask if it contains the substring "espresso.mas". convertairtovacuum is a boolean (defualt value true) that determines whether to convert to vaccum wavelengths when loading VALD and ESPRESSO masks.

source