pyspinw.experiment#
Define experiment-level coordination between samples, instruments, and data.
This module is not fully implemented yet.
Classes
|
Represent a neutron scattering experiment. |
- class pyspinw.experiment.Experiment(sample: Sample, instrument: Instrument | None = None)#
Bases:
SPWSerialisableRepresent a neutron scattering experiment.
An experiment combines a physical sample with an optional instrument model. The sample provides the magnetic model to evaluate, while the instrument provides resolution information for the simulated measurement.
- calculate(input_q: list[ndarray], n_q: int, field: None = None) ndarray#
Calculate simulated energies for requested momentum inputs.
- Parameters:
input_q (list[np.ndarray]) – Momentum-space inputs passed to the sample for q-point generation.
n_q (int) – Number of q-points to generate from the requested momentum inputs.
field (None, optional) – External field passed through to the sample q-point generator.
- Returns:
Energies and intensities calculated from the generated q-points.
- Return type:
np.ndarray
- serialisation_name = 'experiment'#