Initialization and model selection

The total SSOF model is most commonly held in a StellarSpectraObservationFitting.OrderModelWobble struct.

A good start for a SSOF model for a given dataset can be obtained with

StellarSpectraObservationFitting.calculate_initial_modelFunction
calculate_initial_model(data; kwargs...)

Find a SSOF model for a given dataset, data. Defaults to returning the AIC-minimum model

Optional arguments

  • instrument::String="None": The name of the instrument(s) the data was taken from. For bookkeeping
  • desired_order::Int=0: What order (if any) the data was taken from. For bookkeeping
  • star::String="None": The name of the star the data was taken from. For bookkeeping
  • times::AbstractVector=1:size(data.flux, 2): The list of times (in days). Used to calculate intra-night RMS
  • μ_min::Real=0: Set the minimum flux value for the output of make_template()
  • μ_max::Real=Inf: Set the maximum flux value for the output of make_template()
  • use_mean::Bool=true: Whether to use the mean or median for make_template()
  • stop_early::Bool=false: Whether to stop the model search the first time adding a component increases the AIC
  • remove_reciprocal_continuum::Bool=false: Whether you should attempt to remove places where the telluric template and stellar template are opposing each other (i.e. where continuum goes up in one and down in the other)
  • return_full_path::Bool=false: Whether to return all of the searched models and metrics
  • max_n_tel::Int=5: The maximum amount of telluric feature vectors to look for
  • max_n_star::Int=5: The maximum amount of stellar feature vectors to look for
  • use_all_comps::Bool=false: Whether to use all feature vectors, regardless of AIC
  • careful_first_step::Bool=true: Whether to shrink the learning rates until the loss improves on the first iteration
  • speed_up::Bool=false: Whether to inflate the learning rates until the loss is no longer improving throughout the optimization
  • log_λ_gp_star::Real=1/SOAP_gp_params.λ: The log λ lengthscale of the stellar regularization GP
  • log_λ_gp_tel::Real=1/LSF_gp_params.λ: The log λ lengthscale of the telluric regularization GP
  • kwargs...: kwargs passed to OrderModel constructor
source

which builds up the SSOF model component by component using noise-weighted expectation maximization PCA and find the AIC-minimum SSOF model for a given maximum amount of feature vectors.