endas.localization.StateSpacePartitioning¶
-
class
endas.localization.StateSpacePartitioning¶ Bases:
objectAbstract base class for state space partitioning schemes.
Implementations of this abstract base define how to partition the state space into local domains for localized analysis.
-
num_domains¶ Returns the number of local domains in the state space partitioning.
-
get_local_observations(domain_id, z_coords, taper_fn)¶ Locates observations to be used for local analysis of the given domain.
Parameters: - domain_id – Index of the domain for which observations should be retrieved. Domain indexes start at 0.
- z_coords – Abstract description of the locations of observations in the observation vector.
- taper_fn – Tapering function that defines the localization radius.
Returns: Tuple
(z_local, d)wherezis a flat array of indices into the observation vector anddare the distances of each selected observation from the domain.The interpretation of
z_coordsis entirely up to the implementing class to decide andTypeErrorshould be raised if an unsupported type is passed. Please see the documentation of implementing classes for information on what types of objects can be passed viaz_coords.
-
get_local_state_size(domain_id)¶ Returns the state vector size for the given domain. :param domain_id: Index of the domain whose state size should be returned. Domain indexes start at 0.
-
get_local_state(domain_id, xg)¶ Returns local state vector (or ensemble of state vectors) for the given domain.
Parameters: - domain_id – Index of the domain whose local state vector be returned. Domain indexes start at 0.
- xg – Global state vector or ensemble (ensemble members stored in columns).
-
put_local_state(domain_id, xl, xg)¶ Writes local state vector (or ensemble of state vectors) for the given domain back to the global state vector.
Parameters: - domain_id – Index of the domain whose local state vector be stored. Domain indexes start at 0.
- xl – Local state vector or ensemble
- xg – Global state vector or ensemble to copy the local data to
-