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

Base.getindexMethod

Provide direct access to data, an AbstractArray of ChunkOfSpectrum's via [] operator

source
Base.getindexMethod

Allow direct access to data, an AbstractArray of ChunkOfSpectrum's via [] operator

source
Base.setindex!Method

Provide direct access to data, an AbstractArray of ChunkOfSpectrum's via [] operator

source
Base.setindex!Method

Allow direct access to data, an AbstractArray of ChunkOfSpectrum's via [] operator

source
RvSpectMLBase.calc_line_bisector_at_frac_depthMethod

calclinebisectoratfracdepth(λ, flux; fracdepth, lineminwindowfraction ) Returns the line average of wavelengths (units of λ) at specified fractional line depth. Assumes continuum is the maximum flux provided. Assumes the line's minimum flux occurs within lineminwindowfraction, a central fraction of the total λ window. Returns NaN if target flux cannot be found on either side of the line

source
RvSpectMLBase.calc_line_widthMethod

calclinewidth(λ, flux; fracdepth, lineminwindowfraction ) Returns the line width (units of λ) for specified fractional line depth (default of 0.5). Assumes continuum is the maximum flux provided. Assumes the line's minimum flux occurs within lineminwindow_fraction, a central fraction of the total λ window. Returns NaN if target flux cannot be found on either side of the line

source
RvSpectMLBase.calc_snrFunction

calc_snr(flux, var) calc_snr(spectrum, pixels, order_idx)

Calculate total SNR in (region of) spectra.

source
RvSpectMLBase.check_if_line_matchMethod

check_if_line_match ( λ, list ; threshold ) Return true if list contains a wavelength differing from λ by no more than threshold (in units of Δλ/λ)

source
RvSpectMLBase.find_which_line_fits_in_line_listMethod

findwhichlinefitsinlinelist( fitlist, linelist; threshold ) Return list of Bools indicatin which line(s) from fitlist match a line in linelist to within threshold (in units of Δλ/λ) Warning: Untested

source
RvSpectMLBase.findargminmaxMethod

findargminmax(a) Return (argmin, min, argmax, max) Adapapted from https://github.com/JuliaLang/julia/blob/697e782ab86bfcdd7fd15550241fe162c51d9f98/base/array.jl#L2191

source
RvSpectMLBase.interp_linearMethod

`interp_linear(;x1,x2,y1,y2,xpred) Return result of simple linear interpolant at xpred. Does not test that xpred is between x1 and x2.

source
RvSpectMLBase.multiple_append!Method

A generalized version of the built in append!() function By Christian Gilbertson?

TODO: Ask Christian what the purpose of this is relative to std append

source
RvSpectMLBase.searchsortednearestFunction

searchsortednearest(a<:AbstractVector, x::Real; assume_sorted = false ) searchsortednearest(a<:AbstractVector, x<:AbstractVector; assume_sorted = false )

Find the index of vector a where the value of a is closest to x. All vectors are assumed to already be sorted. To turn off assertions, set assume_sorted to true.

Credit: traktofon @ https://discourse.julialang.org/t/findnearest-function/4143/4 Vector Vector version by Christian Gilbertson? issorted assertion and optional assume_sorted added by Eric Ford

source

Interpolation

Modules = [RvSpectMLBase.LinearInterpolation ]
Public = false
Order = [ :function]

Instrument specific

Other

Types

General purpose

Interpolation

Modules = [RvSpectMLBase.LinearInterpolation ]  
Public = false
Order = [:type ]

Instrument specific

Other