SAXS.Simulator#
# This module contains the SAXS simulator class.
- class SaxsInfo(electron_density, ft_image, detector_info)#
Bases:
object
Class to represent the SAXS information.
Initialize the SAXS information.
- Parameters:
electron_density (np.ndarray) – The electron density information.
ft_image (np.ndarray) – The Fourier transform image.
detector_info (np.ndarray) – The detector information.
- get_curve()#
Get the SAXS scattering curve from the detector information.
- compute_saxs(rho, q=None, dmax=None, use_denss=False, debug=True)#
Compute SAXS data from a given electron density map.
- Parameters:
rho (np.ndarray) – The 3D electron density map.
q (np.ndarray, optional) – The q values at which to compute the SAXS intensity. If None, a default range will be used.
dmax (float, optional) – The maximum dimension of the particle in Angstroms. If None, it will be estimated from the electron density map.
use_denss (bool, optional) – If True, use DENSS-like approach for computation.
debug (bool, optional) – If True, enable debug mode with additional output.
- Returns:
An instance of the SaxsInfo class containing the computed SAXS data.
- Return type:
- draw_saxs(saxs_info)#
Draw a shape in the electron density space.
- Parameters:
shape_condition (np.ndarray) – A boolean array representing the shape to be drawn.
- Returns:
fig – The figure containing the drawn shape.
- Return type: