pysecs.KalmanSECS.fit#

KalmanSECS.fit(obs_loc: ndarray, obs_B: ndarray, times: ndarray, obs_std: ndarray | None = None, *, J_loc: ndarray | None = None, obs_J: ndarray | None = None, J_std: ndarray | None = None) → KalmanSECS#

Run the filter (and smoother) over a time series of observations.

Parameters:
  • obs_loc (ndarray (nobs, 3 [lat, lon, r])) – Observation locations, fixed over the time series.

  • obs_B (ndarray (ntimes, nobs, 3 [Bx, By, Bz])) – Observed magnetic fields. Non-finite values are treated as missing data at that time step.

  • times (ndarray (ntimes,)) – Strictly increasing observation times, either as floats (in the same units as tau) or as np.datetime64 (tau in seconds).

  • obs_std (ndarray (ntimes, nobs, 3), optional) – 1-sigma standard errors of the observations. Infinite values eliminate an observation at that time step, e.g. for station dropouts. Default: ones (equal weights).

  • J_loc (ndarray, optional) – Current density observations to fit jointly with the magnetic field, as in SECS.fit(). Non-finite values of obs_J are treated as missing data.

  • obs_J (ndarray, optional) – Current density observations to fit jointly with the magnetic field, as in SECS.fit(). Non-finite values of obs_J are treated as missing data.

  • J_std (ndarray, optional) – Current density observations to fit jointly with the magnetic field, as in SECS.fit(). Non-finite values of obs_J are treated as missing data.

Returns:

This estimator, with the amplitudes stored in sec_amps.

Return type:

KalmanSECS