MythenDetector¶
MythenDetector contains all detector specific parameters, such as the number of modules, internal detector parameters like the strip width, as well as the module parameters and methods to calculate the diffraction angle of each strip.
- class angcal._angcal.MythenDetector¶
Bases:
pybind11_object- Variables:
pitch (double) – Read-only static. Strip/channel width of Mythen detector [mm] (0.05 mm)
strip_transverse_width (double) – Read-only static. Transverse width of a Mythen strip [mm] (8.0 mm)
strips_per_module (int) – Read-only static. Strips per module for Mythen detector (1280)
- __init__(*args, **kwargs)¶
Overloaded function.
__init__(self: angcal._angcal.MythenDetector, dgparameters: angcal::DGParameters) -> None
Constructor for MythenDetector class Parameters ———- dgparameters : DGParameters or numpy.ndarray of float, shape (num_modules, 3)
Each row corresponds to a module, columns are (center, conversion, offset)
__init__(self: angcal._angcal.MythenDetector, bcparameters: angcal::BCParameters) -> None
Constructor for MythenDetector class Parameters ———- bcparameters : BCParameters or numpy.ndarray of float, shape (num_modules, 3)
Each row corresponds to a module, columns are (angle_center_module_normal, module_center_sample_distances, angle_center_beam)
__init__(self: angcal._angcal.MythenDetector, dgparameters: numpy.ndarray[numpy.float64]) -> None
__init__(self: angcal._angcal.MythenDetector, bcparameters: numpy.ndarray[numpy.float64]) -> None
- angular_strip_width_from_BC_parameters(self: angcal._angcal.MythenDetector, module_index: int, local_strip_index: int) float¶
Calculated the strip width expressed as angle from BC module parameters
- Parameters:
module_index (int) – Index of the module.
local_strip_index (int) – Local strip index of module e.g. 0-1279
- Returns:
Strip width in angles [degrees]
- Return type:
float
- angular_strip_width_from_DG_parameters(self: angcal._angcal.MythenDetector, module_index: int, local_strip_index: int) float¶
Calculated the strip width expressed as angle from DG module parameters
- Parameters:
module_index (int) – Index of the module.
local_strip_index (int) – Local strip index of module e.g. 0-1279
- Returns:
Strip width in angles [degrees]
- Return type:
float
- angular_strip_width_from_EE_parameters(self: angcal._angcal.MythenDetector, module_center_distance: float, normal_distance: float, angle: float, local_strip_index: int) float¶
Calculated the strip width expressed as angle from EE module parameters
- Parameters:
module_center_distance (float) – Center distance of the module.
normal_distance (float) – Normal distance of the module.
angle (float) – Angle of the module.
local_strip_index (int) – Local strip index of module e.g. 0-1279
- Returns:
Strip width in angles [degrees]
- Return type:
float
- diffraction_angle_from_BC_parameters(self: angcal._angcal.MythenDetector, module_index: int, detector_angle: float, strip_index: int, distance_to_strip: float = 0.0) float¶
Calculates the diffraction angle of a strip from BC parameters :param module_index: Index of the module. :type module_index: int :param detector_angle: Detector position, measured as the offset of the first strip from the default detector position [degrees] :type detector_angle: float :param strip_index: Local strip index of module e.g. 0-1279 :type strip_index: int :param distance_to_strip: Distance to strip [given in strips]. Default is 0.0. :type distance_to_strip: float, optional
- Returns:
Diffraction angle of strip calculated from BC parameters [degrees]
- Return type:
float
- diffraction_angle_from_DG_parameters(self: angcal._angcal.MythenDetector, module_index: int, detector_angle: float, strip_index: int, distance_to_strip: float = 0.0) float¶
Calculates the diffraction angle of a strip from DG parameters :param module_index: Index of the module. :type module_index: int :param detector_angle: Detector position, measured as the offset of the first strip from the default detector position [degrees] :type detector_angle: float :param strip_index: Local strip index of module e.g. 0-1279 :type strip_index: int :param distance_to_strip: Distance to strip [given in strips]. Default is 0.0. :type distance_to_strip: float, optional
- Returns:
Diffraction angle of strip calculated from DG parameters [degrees]
- Return type:
float
- diffraction_angle_from_EE_parameters(self: angcal._angcal.MythenDetector, module_center_distance: float, normal_distance: float, angle: float, detector_angle: float, strip_index: int, distance_to_strip: float = 0.0) float¶
Calculates the diffraction angle of a strip from EE parameters :param module_center_distance: Center distance of the module. :type module_center_distance: float :param normal_distance: Normal distance of the module. :type normal_distance: float :param angle: Angle of the module. :type angle: float :param detector_angle: Detector position, measured as the offset of the first strip from the default detector position [degrees] :type detector_angle: float :param strip_index: Local strip index of module e.g. 0-1279 :type strip_index: int :param distance_to_strip: Distance to strip [given in strips]. Default is 0.0. :type distance_to_strip: float, optional
- Returns:
Diffraction angle of strip calculated from EE parameters [degrees]
- Return type:
float
- elastic_correction(self: angcal._angcal.MythenDetector, detector_angle: float) float¶
Calculates the elastic correction factor for given detector angle based on torsional compliance correction model
- Parameters:
detector_angle (float) – Detector axis motor position [degrees]
- Returns:
Elastic correction factor for given detector angle [degrees]
- Return type:
float
- set_DGparameters(self: angcal._angcal.MythenDetector, dgparameters: angcal::DGParameters) None¶
Set the historical DG parameters
- Parameters:
dgparameters (DGParameters or numpy.ndarray of float, shape (num_modules, 3)) – Each row corresponds to a module, columns are (center, conversion, offset)
- solid_angle(self: angcal._angcal.MythenDetector, module_index: int, strip_index: int) float¶
Calculates the solid angle of a strip
- Parameters:
module_index (int) – Index of the module.
strip_index (int) – Local strip index of module e.g. 0-1279
- Returns:
Solid angle of strip [sr]
- Return type:
float
- transverse_width(self: angcal._angcal.MythenDetector, module_index: int, strip_index: int, from_BC_parameters: bool) float¶
Calculates the transverse width of the strip projected onto a plane
- Parameters:
module_index (int) – Index of the module.
strip_index (int) – Local strip index of module e.g. 0-1279
from_BC_parameters (bool) – Whether to use BC parameters (true) or DG parameters (false)
- Returns:
Transverse width of strip projected onto a plane [mm]
- Return type:
float
- property DGparameters¶
Get or set the historical DG parameters. Accepts a DGParameters object or a numpy.ndarray of float with shape (num_modules, 3)
- property average_distance_sample_pixel¶
2500.0 / pi mm)
- Type:
Average euclidean distance between sample and pixel [mm] (default
- property dead_time¶
76.08e-9 s)
- Type:
Measured dead-time [s] (default
- property detector_vertical_axis_offset¶
0.0°)
- Type:
Offset of detector to vertical axis (used for elastic correction) [degrees] (default
- property elastic_correction_factor¶
0.0
- Type:
Elastic correction factor for torsional compliance correction model) (default
- property num_strips¶
Total number of strips in Mythen detector
- property offset¶
0.0°)
- Type:
Additional offset to sample detector offset (can change in experimental setup) [degrees] (default
- property sample_detector_offset¶
1.4715°)
- Type:
Offset between sample horizontal plane and detector [degrees] (default
- property sample_x_displacement¶
0.0 mm)
- Type:
Displacement of sample in x direction of horizontal sample plane [mm] (default
- property sample_y_displacement¶
0.0 mm)
- Type:
Displacement of sample in y direction of horizontal sample plane [mm] (default