rxmc.elastic_diffxs_model.ElasticDifferentialXSModel#
- class rxmc.elastic_diffxs_model.ElasticDifferentialXSModel(quantity: str, interaction_central: Callable[[...], ndarray], interaction_spin_orbit: Callable[[...], ndarray] | None, calculate_interaction_from_params: Callable[[DifferentialWorkspace, tuple], tuple], params: list = [], model_name: str = None, interaction_coulomb: Callable[[...], ndarray] | None = None, transform=None)[source]#
Bases:
PhysicalModelA model that predicts the elastic differential xs for a given reaction.
- __init__(quantity: str, interaction_central: Callable[[...], ndarray], interaction_spin_orbit: Callable[[...], ndarray] | None, calculate_interaction_from_params: Callable[[DifferentialWorkspace, tuple], tuple], params: list = [], model_name: str = None, interaction_coulomb: Callable[[...], ndarray] | None = None, transform=None)[source]#
- Parameters:
quantity (str) – Observable to compute:
"dXS/dA","dXS/dRuth", or"Ay".interaction_central (callable) –
f(r, *args) -> np.ndarrayreturning the central interaction potential on the radial gridr(fm), in MeV.interaction_spin_orbit (callable or None) –
f(r, *args) -> np.ndarrayreturning the spin-orbit potential onr.Nonefor a spin-orbit-free model.calculate_interaction_from_params (callable) –
f(workspace, *params) -> (central_args, spin_orbit_args)or-> (central_args, spin_orbit_args, coulomb_args)mapping model parameters to the argument tuples expected by the interaction callables.params (list of Parameter, optional) – Parameters of the model. Defaults to
[].model_name (str, optional) – Human-readable model name. Defaults to
"ElasticDifferentialXSModel".interaction_coulomb (callable, optional) –
f(r, *args) -> np.ndarrayreturning the Coulomb potential onr. WhenNonethe Coulomb interaction inside the channel radius must be folded intointeraction_central.transform (Transform or callable, optional) – Parametric model-side transform applied to the prediction; see
PhysicalModel.
Methods
__init__(quantity, interaction_central, ...)apply_transform(observation, y[, ...])Apply the model-side transform to a physical-space prediction.
evaluate(observation, *params)Evaluate the model on the constraint angular grid.
split_params(params)Split a full parameter tuple into
(base_params, transform_values).visualizable_model_prediction(observation, ...)Evaluate the model on the visualisation angular grid.
- evaluate(observation: ElasticDifferentialXSObservation, *params: tuple) ndarray[source]#
Evaluate the model on the constraint angular grid.
- Parameters:
observation (ElasticDifferentialXSObservation) – Observation containing the reaction data and pre-built workspace.
*params (float) – Physical-model parameter values.
- Returns:
np.ndarray – Predicted observable on
observation.constraint_workspace.angles.
- visualizable_model_prediction(observation: ElasticDifferentialXSObservation, *params: tuple) ndarray[source]#
Evaluate the model on the visualisation angular grid.
- Parameters:
observation (ElasticDifferentialXSObservation) – Observation containing the reaction data and pre-built workspace.
*params (float) – Full model parameter values (physical parameters followed by any transform parameters).
- Returns:
np.ndarray – Predicted observable on
observation.visualization_workspace.angles.