Add neutron coherent and incoherent cross sections
Adds a function that to dynasor/post_processing.py
that weights dynamical structure factors S_q_w_A_B
and intermiediate scattering functions F_q_t_A_B
by the corresponding neutron scattering lengths as outlined on page 44-45 in the MDANSE documentation. Specifically, the function computes
F^{weighted}_{A,B}(\mathbf{Q}, t) = b_A b_B F_{A,B}(\mathbf{Q}, t)
S^{weighted}_{A,B}(\mathbf{Q}, \omega) = b_A b_B S_{A,B}(\mathbf{Q}, \omega)
and the total sum, stored in the key S_q_w
:
S(\mathbf{Q}, \omega) = \sum_{A}^{N_{species}} \sum_{B>A}^{N_{species}} b_A b_B S_{A,B}(\mathbf{Q}, \omega)
The scattering lengths are supplied by the user through the dict
scattering_lengths
, on the form
scattering_lengths = {
'A': 1.0,
'B': 75.0,
...
}
Note that the function does not weight the corresponding factors by the number of particles of each species as of yet, since that information is not made available. Ideally, this should be in included in the sample: QpointsSample
imo.
Edited by Paul Erhart