pyrtid.inverse.Observable#
- class pyrtid.inverse.Observable(state_variable: StateVariable, node_indices: Union[int, ndarray[Any, dtype[int64]], Sequence[int]], times: ndarray[Any, dtype[float64]], values: ndarray[Any, dtype[float64]], uncertainties: Optional[Union[float, ndarray[Any, dtype[float64]]]] = None, mean_type: Optional[MeanType] = None, sp: Optional[int] = None)[source]#
Bases:
objectClass representing observations data within time at a defined location.
Note
It is fine if the times are not sorted in increasing order.
- Attributes
state_variable (StateVariable) – Name of the state variable or the parameter being observed.
node_indices (NDArrayInt) – Node indices to locate of the observation in the grid.
times (NDArrayFloat) – Times matching the values.
values (NDArrayFloat) – Observed values.
uncertainties (NDArrayFloat) – Absolute uncertainties associated with the observed values.
mean_type (MeanType) – Type of mean used to averaged the simulated values when the observations are performed over several grid cells.
perturbations (NDArrayFloat) – Perturbations to add to the values when performing the inversion. This is only useful for the ensemble method when the observed values are perturbed with samples from N(0, R).
sp (Optional[int]) – Index of the concentration being observed. Must be provided if a concentration or a grade is observed.
- __init__(state_variable: StateVariable, node_indices: Union[int, ndarray[Any, dtype[int64]], Sequence[int]], times: ndarray[Any, dtype[float64]], values: ndarray[Any, dtype[float64]], uncertainties: Optional[Union[float, ndarray[Any, dtype[float64]]]] = None, mean_type: Optional[MeanType] = None, sp: Optional[int] = None) None[source]#
Initiate the instance.
Warning
For the control parameters such as porosity or permeability which are constant in time, we consider that all observations are done at time 0, no matter what is set by the user.
- Parameters
state_variable (StateVariable) – Name of the state variable or the parameter being observed.
node_indices (Int) – Location of the observation in the grid (indices from 0 to nx * ny - 1).
times (NDArrayFloat) – Timesteps matching the values.
values (NDArrayFloat) – Observed values.
uncertainties (Optional[Union[float, NDArrayFloat]]) – Absolute uncertainties associated with the observed values.
mean_type (Optional[MeanType] = None) – Type of mean used to averaged the simulated values when the observations are performed over several grid cells. If None, an harmonic mean is used for diffusion and hydraulic conductivity coefficients, otherwise, an arithmetic mean is used. The default is None.
Methods definition
- set_perturbations(pvals: ndarray[Any, dtype[float64]]) None[source]#
Set the values perturbations (see ensemble smoothers).