Full Index
GRASS
The objects documented on the Public Functions page are omitted here to avoid duplicating their docstrings; everything else defined by GRASS is listed below.
GRASS.Planet — Method
units: - mass: mass in solar masses - radius: planet radius as fraction of stellar radius - period: period in years - semimajoraxis: semi major axis in AU - eccentricty - inclination - longitudeascendingnode - longitudeperiapsis - meanlongitude
GRASS.calc_bisector_slope — Method
calc_bisector_bottom(bis, int, rv)Compute the bisector bottom relative to a reference radial velocity. Following Dall et al. 2006.
Arguments
bis::AbstractArray{<:Real,1}: bisector values as a function of intensity.int::AbstractArray{<:Real,1}: normalized intensities corresponding tobis.rv::Real: reference radial velocity to subtract.
GRASS.est_full_width — Method
est_full_width(vels, ccf; measure_width_at_frac_depth=0.5)Estimate the full width of a CCF at a given fraction of its depth.
Returns NaN when the CCF contains NaN, which makes every depth comparison false. A finite CCF always yields a width, a flat one the full span of vels.
GRASS.find_idx_at_and_around_minimum — Method
find_idx_at_and_around_minimum(vels, ccf; frac_of_width_to_fit=0.5,
measure_width_at_frac_depth=0.5)Locate the CCF minimum and the index range spanning frac_of_width_to_fit of the CCF width on either side of it.
Returns (NaN, 1:length(vels)) when the width cannot be estimated; callers detect this with isnan on the first element.
GRASS.measure_rv_from_ccf_gaussian — Method
measure_rv_from_ccf_gaussian(vels, ccf, ccf_var, mrv)Fit a Gaussian to the core of a CCF, weighting by the inverse CCF variance, and return (rv=..., σ_rv=...). Falls back to a variance-weighted quadratic fit when the Gaussian fit does not converge.
ccf and ccf_var must be on a common absolute scale, as returned together by calc_ccf(λs, flux, var, ...); normalizing one without the other changes σrv. mrv supplies `fracofwidthtofit,measurewidthatfracdepth, andinitguessccfσ`, so it must be a Gaussian measurement type.
Weighting by 1 ./ ccf_var treats the velocity lags as independent, which they are not, so σrv scales with the CCF grid spacing and understates the true velocity scatter. See the `calcrvsfromccf(vgrid, ccf, ccfvar)` docstring before relying on it as an error bar.
GRASS.patch_velocity_los — Method
patch_velocity_los(x, y; rstar, pole)Compute line of sight velocity of a patch of stellar surface given by x,y (assumed in [-1,1]). Return value is in (Rsol/day)/speed of light (i.e., dimensionless like z = v/c)
Arguments
rstar::Float64=1.0: in R_sol (affects return velocity, but not x,y)pole = (0,1,0): unit vector for stellar rotation axis (default is equator-on)
GRASS.rotation_period — Method
rotation_period(sin_lat; A=14.713, B=2.396, C=1.787)Calculate stellar rotation period in days at given sine of latitude.
Arguments
sin_lat::Float64: Sine of stellar latitude.A::Float64=14.713: Coefficient from Snodgrass & Ulrich (1990)B::Float64=2.396: Coefficient from Snodgrass & Ulrich (1990)C::Float64=1.787: Coefficient from Snodgrass & Ulrich (1990)
GRASS.synthesize_spectra_resolved — Method
synthesize_spectra(spec, disk; seed_rng=false, verbose=true, top=NaN)Synthesize spectra given parameters in spec and disk instances.
Arguments
spec::SpecParams: SpecParams instancedisk::DiskParams: DiskParams instance
GRASS.Eclipse
GRASS.Eclipse.DiskParamsEclipse — Method
DiskParamsEclipse(; N=197, Nt, Nsubgrid=40, radius=sun_radius,
A=14.713, B=-2.396, C=-1.787)Construct a DiskParamsEclipse instance describing the solar disk grid used for eclipse spectral synthesis. The grid is built in heliographic latitude/longitude; the observer geometry (and therefore which cells are occulted by the Moon) is computed per epoch from SPICE ephemerides at synthesis time, rather than being fixed at construction. This is the eclipse counterpart to DiskParams.
Keyword Arguments
N=197: number of stellar latitude grid elements. Should be set to 197 for physical validity; other values emit a warning.Nt: number of time steps (epochs) to synthesize. Required — defaults to aNaNsentinel that trips an assertion if not supplied. Must equallength(time_stamps)passed tosynthesize_spectra_eclipse.Nsubgrid=40: subgrid resolution used to refine partially-occulted cells near the lunar limb. Must be greater than 1.radius=sun_radius: stellar radius in km (defaults to the SPICE solar radius).A=14.713: differential rotation coefficient (deg/day).B=-2.396: differential rotation coefficient (deg/day).C=-1.787: differential rotation coefficient (deg/day).
GRASS.Eclipse.calc_rms — Method
calc_rms(A)Calculate the RMS of given data about the observed mean.
Arguments
A::AbstractArray{Float64,1}: 1D array containing data for RMS calculation
GRASS.Eclipse.patch_velocity_los — Method
patch_velocity_los(x, y; rstar, pole)Compute line of sight velocity of a patch of stellar surface given by x,y (assumed in [-1,1]). Return value is in (Rsol/day)/speed of light (i.e., dimensionless like z = v/c)
Arguments
rstar::Float64=1.0: in R_sol (affects return velocity, but not x,y)pole = (0,1,0): unit vector for stellar rotation axis (default is equator-on)
GRASS.Eclipse.rotation_period — Method
rotation_period(sin_lat; A=14.713, B=2.396, C=1.787)Calculate stellar rotation period in days at given sine of latitude.
Arguments
sin_lat::Float64: Sine of stellar latitude.A::Float64=14.713: Coefficient from Snodgrass & Ulrich (1990)B::Float64=2.396: Coefficient from Snodgrass & Ulrich (1990)C::Float64=1.787: Coefficient from Snodgrass & Ulrich (1990)
GRASS.Eclipse.synthesize_spectra_eclipse — Method
synthesize_spectra_eclipse(
spec,
disk,
wavelength,
LD_type,
obs_long,
obs_lat,
alt,
time_stamps,
ext_coeff;
ext_toggle=false,
seed_rng=false,
verbose=true,
use_gpu=false,
precision=Float64,
skip_times=falses(disk.Nt),
)Synthesize a time series of solar spectra as seen from a ground-based observer during a solar eclipse. For each epoch in time_stamps, the Sun–Moon–observer geometry is computed from SPICE ephemerides, the lunar disk is projected onto the solar grid to mask occulted cells, and the remaining surface is integrated to produce a spectrum. Returns a tuple (λs, flux) where λs::Vector is the wavelength grid (spec.lambdas) and flux::Matrix has size (length(λs), disk.Nt), one column per epoch.
Required SPICE kernels are fetched and furnished on the first call.
Arguments
spec::SpecParams: spectral synthesis parameters (line list, templates, wavelength grid).disk::DiskParamsEclipse: eclipse disk parameters; seeDiskParamsEclipse.wavelength::Vector{Float64}: line-center wavelength(s) used to look up limb-darkening coefficients.LD_type::String: limb-darkening law. One of"SSD_quadratic","SSD_4parameter","300_quadratic","300_4parameter","HD_quadratic","HD_4parameter"(datasetSSD/300/HD× quadratic or 4-parameter law).obs_long::T,obs_lat::T: observer geodetic longitude and latitude (degrees).alt::T: observer altitude (km).time_stamps::Vector{String}: UTC timestamp strings (SPICE-parseable), one per epoch. Length must equaldisk.Nt.ext_coeff: atmospheric extinction coefficient (used only whenext_toggle=true).
Keyword Arguments
ext_toggle::Bool=false: include airmass-dependent atmospheric extinction.seed_rng::Bool=false: re-seed the RNG with a fixed seed per template for reproducible granulation.verbose::Bool=true: print progress messages for template loading and simulation.use_gpu::Bool=false: run the GPU implementation (requires a functional CUDA device).precision::DataType=Float64: GPU precision (Float32orFloat64); see Caveats.skip_times::BitVector=falses(disk.Nt): epochs to skip in the simulation loop.