slv.inversion.covariances.build_mdm_error#
- slv.inversion.covariances.build_mdm_error(name, obs_index, std, correlated=True, scale=None, interday=False, time_dim='obs_time', site_config=None, obs_sites=None, **kwargs)[source]#
Unified builder for Model-Data Mismatch covariance components.
Returns a covariance model, to build on the observations’ space (whose labels must be
obs_index, in that order: a per-observationstdis read in that order).- Parameters:
name (str) – Component name (used in error messages)
obs_index (pd.MultiIndex) – Observation index with ‘obs_location’ and ‘obs_time’ levels
std (float or dict) – Absolute standard deviation in ppm. If dict with nested dicts: std[site][season] structure (site/season-specific) If dict with scalar values: std[organization] structure (organization-specific)
correlated (bool) – Whether errors are correlated
scale (str, optional) – Time scale for correlation decay
interday (bool) – Whether correlations extend across midnight
time_dim (str) – Name of the time dimension
site_config (pd.DataFrame, optional) – Site configuration with ‘organization’ column, required for organization-based std
obs_sites (sequence of str, optional) – The site of each observation, aligned with
obs_index, for site- or organization-keyedstd. Defaults to theobs_locationlevel, which is the site for a tower but a PYSTILT location_id for a mobile receptor.**kwargs – Additional unused parameters (for compatibility)
- Return type:
CovarianceModel