pysecs.SECS.fit#
- SECS.fit(obs_loc: ndarray, obs_B: ndarray, obs_std: ndarray | None = None, epsilon: float = 0.05) SECS #
Fits the SECS to the given observations.
Given a number of observation locations and measurements, this function fits the SEC system to them. It uses singular value decomposition (SVD) to fit the SEC amplitudes with the epsilon parameter used to regularize the solution.
- Parameters:
obs_locs (ndarray (nobs, 3 [lat, lon, r])) – Contains latitude, longitude, and radius of the observation locations (place where the measurements are made)
obs_B (ndarray (ntimes, nobs, 3 [Bx, By, Bz])) – An array containing the measured/observed B-fields.
obs_std (ndarray (ntimes, nobs, 3 [varX, varY, varZ]), optional) – Standard error of vector components at each observation location. This can be used to weight different observations more/less heavily. An infinite value eliminates the observation from the fit. Default: ones(nobs, 3) equal weights
epsilon (float) – Value used to regularize/smooth the SECS amplitudes. Multiplied by the largest singular value obtained from SVD. Default: 0.05