|
""" |
|
`measure_rv_from_ccf(vels, ccf, [ccf_var]; alg )` |
|
Return estimated RV based on the CCF using specified algorithm object. |
|
Inputs: |
|
* `vels`: Array of velocites where CCF was evaluated. |
|
* `ccf`: Array of values of CCF |
|
Optional Arguements: |
|
* `alg`: Functor specifying how to measure the RV and it's uncertainty from the CCF. Options include: |
|
MeasureRvFromCCFGaussian (default), MeasureRvFromCCFQuadratic, MeasureRvFromCCFCentroid, and MeasureRvFromMinCCF. |
|
""" |
|
function measure_rv_from_ccf end |
|
|
|
function measure_rv_from_ccf(vels::A1, ccf::A2, ; alg::AlgT=MeasureRvFromCCFGaussian() ) where { |
|
T1<:Real, A1<:AbstractArray{T1,1}, T2<:Real, A2<:AbstractArray{T2,1}, AlgT<:AbstractMeasureRvFromCCF } |
|
return alg(vels,ccf) |
|
end |
|
|
|
function measure_rv_from_ccf(vels::A1, ccf::A2, ccf_var::A3 ; alg::AlgT=MeasureRvFromCCFGaussian() ) where { |
|
T1<:Real, A1<:AbstractArray{T1,1}, T2<:Real, A2<:AbstractArray{T2,1}, T3<:Real, A3<:AbstractArray{T3,1}, AlgT<:AbstractMeasureRvFromCCF } |
|
return alg(vels,ccf,ccf_var) |
|
end |
|
|
|
function measure_rv_from_ccf(vels::A1, ccf::A2, ccf_var::A3 ; alg::AlgT=MeasureRvFromCCFGaussian() ) where { |
|
T1<:Real, A1<:AbstractArray{T1,1}, T2<:Real, A2<:AbstractArray{T2,1}, T3<:Real, A3<:AbstractArray{T3,2}, AlgT<:AbstractMeasureRvFromCCF } |
|
return alg(vels,ccf,ccf_var) |
|
end |
|
|
|
function measure_rv_from_ccf(vels::A1, ccf::A2, ccf_var::A3, covar_base::A4 ; alg::AlgT=MeasureRvFromCCFGaussian() ) where { |
|
T1<:Real, A1<:AbstractArray{T1,1}, T2<:Real, A2<:AbstractArray{T2,1}, T3<:Real, A3<:AbstractArray{T3,1}, T4<:Real, A4<:AbstractArray{T4,2}, AlgT<:AbstractMeasureRvFromCCF } |
|
return alg(vels,ccf,ccf_var,covar_base) |
|
end |