rxmc.physical_model.Polynomial#
- class rxmc.physical_model.Polynomial(order: int)[source]#
Bases:
PhysicalModelPolynomial model of fixed order.
Predicts observable values as
\[y_{\mathrm{model}}(x;\,a_0,\dots,a_n) = \sum_{i=0}^{n} a_i\, x^i\]- Parameters:
order (int) – Polynomial order $n$. The model has $n+1$ free coefficients.
Methods
- evaluate(observation: Observation, *params) ndarray[source]#
Evaluate the polynomial at the observation grid.
- Parameters:
observation (Observation) – Observation whose
xattribute provides the evaluation grid.*params (float) – Polynomial coefficients
a0, a1, ..., an(lowest order first).
- Returns:
np.ndarray – Polynomial values at
observation.x.- Raises:
ValueError – If the number of supplied coefficients does not match
self.order + 1.