rxmc.elastic_diffxs_model.ElasticDifferentialXSModel#
- class rxmc.elastic_diffxs_model.ElasticDifferentialXSModel(quantity: str, interaction_central: Callable[[float, tuple], complex], interaction_spin_orbit: Callable[[float, tuple], complex], calculate_interaction_from_params: Callable[[DifferentialWorkspace, tuple], tuple], params: list = [], model_name: str = None)[source]#
Bases:
PhysicalModelA model that predicts the elastic differential xs for a given reaction.
- __init__(quantity: str, interaction_central: Callable[[float, tuple], complex], interaction_spin_orbit: Callable[[float, tuple], complex], calculate_interaction_from_params: Callable[[DifferentialWorkspace, tuple], tuple], params: list = [], model_name: str = None)[source]#
- Parameters:
quantity (str) – Observable to compute:
"dXS/dA","dXS/dRuth", or"Ay".interaction_central (callable) –
f(r, args) -> complexreturning the central interaction potential.interaction_spin_orbit (callable) –
f(r, args) -> complexreturning the spin-orbit potential.calculate_interaction_from_params (callable) –
f(workspace, *params) -> (central_args, spin_orbit_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".
Methods
__init__(quantity, interaction_central, ...)evaluate(observation, *params)Evaluate the model on the constraint angular grid.
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) – Physical-model parameter values.
- Returns:
np.ndarray – Predicted observable on
observation.visualization_workspace.angles.