kipe.parameters module
Estimated parameters: selection, initial estimate and reparameterization.
kipe estimates the reparameterized parameters \(\theta\), the forward solver receives the
physical values \(\phi\). Parameterization maps between the two.
- class kipe.parameters.EstimatedParameter(name: str, reparameterization: Reparameterization, initial: float, stddev_theta: float)[source]
Bases:
objectOne estimated parameter: its reparameterization and initial estimate.
- Raises:
ValueError – if the initial estimate is not admissible for the reparameterization
- name: str
Name of the parameter, as the forward solver knows it.
- reparameterization: Reparameterization
- initial: float
Initial estimate \(\phi_0\), physical value.
- stddev_theta: float
Initial standard deviation of \(\theta\).
- class kipe.parameters.Parameterization(parameters: list[EstimatedParameter])[source]
Bases:
objectThe estimated parameters as one vector \(\theta\), in the order of the study file.
Converts \(\theta\) to the physical values passed to the forward solver (
to_physical()), each entry by its parameter’s reparameterization. The initial estimates that the reparameterizations refer to stay fixed during one pass of the filter over the measurements; outer iterations move them to the estimate (recenter()).- parameters: list[EstimatedParameter]
The estimated parameters, in the order of the entries of \(\theta\).
- property names: list[str]
Names of the estimated parameters.
- stddev_theta() NDArray_f64[source]
Return the initial standard deviations of \(\theta\).
- Returns:
initial standard deviations of \(\theta\)
- initial_theta() NDArray_f64[source]
Return the initial \(\theta\), which maps to the initial estimates.
- Returns:
initial \(\theta\)
- to_physical(theta: NDArray_f64) Parameters[source]
Map \(\theta\) to physical values, as passed to the forward solver.
- Parameters:
theta – reparameterized parameters, in the order of
parameters- Returns:
parameter name -> physical value
- recenter(theta: NDArray_f64) Self[source]
Return the parameterization with the initial estimates moved to
theta.Used between outer iterations: the next pass starts from the estimate, with the initial standard deviations of \(\theta\).
- Parameters:
theta – estimated parameters, in the order of
parameters- Returns:
new parameterization, whose initial estimates are the physical values of
theta
- one_sigma_range() list[tuple[float, float]][source]
Return the physical values at the initial \(\theta_0 \pm \sigma_\theta\).
Shows what the uncertainty means in physical terms. Asymmetric around the initial estimate for
log.- Returns:
(lower, upper) physical value per parameter
- physical_range(theta: NDArray_f64, stddev_theta: NDArray_f64) list[tuple[float, float]][source]
Return the physical values at \(\theta \pm \sigma_\theta\).
- Parameters:
theta – estimated parameters, in the order of
parametersstddev_theta – their standard deviations
- Returns:
(lower, upper) physical value per parameter
- kipe.parameters.build_parameterization(options: ParametersOptions, nominal: Parameters) Parameterization[source]
Check the selected parameters against the solver’s and build the parameterization.
- Parameters:
options –
parameterssection of the study filenominal – the forward solver’s parameters and their nominal values
- Returns:
the parameterization, with the parameters in the order of
options.select- Raises:
StudyFileError – if a selected parameter is unknown to the solver, or an initial estimate is not admissible for its reparameterization