AngleCalibration¶
Class to calibrate the mythen detector parameters. For the calibration the “Best computing” parameters are used. However, as initial parameters it expects the “historic detector group” parameters. See for a more detail description of the different detector parameters.
- class angcal._angcal.AngleCalibration¶
Bases:
pybind11_object- Variables:
histogram_bin_width (double) – bin width of fixed angle width histogram [degree] (default: 0.0036 deg)
base_peak_angle (double) – angle of center of base peak [degree]
number_of_bins (int) – Read-only. number of bins for new fixed angle width histogram
- __init__(self: angcal._angcal.AngleCalibration, MythenDetectorSpecifications: angcal::MythenDetectorSpecifications, FlatField: angcal::FlatField, MythenFileReader: Optional[angcal::MythenFileReader] = None, file_interface: Optional[SimpleFileInterface] = None) None¶
- Parameters:
MythenDetectorSpecifications (MythenDetectorSpecifications) – storing all mythen specific parameters
FlatField (FlatField) – class storing inverse normalized flatfield
MythenFileReader (optional[MythenFileReader], default None) – pass if you use custom acquisition files - default: reads hdf5 files
file_interafce (optional[SimpleFileInterface], default None) – custom_file_ptr optional, pass if you use custom files to store initial angle parameters - default: initial angle parameters supports following format module [module_index] center [center] +- [error] conversion [conversion] +- [error] offset [offset] +- [error]
- base_peak_is_in_module(self: angcal._angcal.AngleCalibration, module_index: int, detector_angle: float) bool¶
check if base peak ROI is contained within module region
- Parameters:
module_index (int) – Index of the module.
detector_angle (double) – Detector position, measured as the offset of the first strip from the default detector position [degrees].
- Returns:
True if the base peak ROI lies inside the module region, False otherwise.
- Return type:
bool
- calibrate(*args, **kwargs)¶
Overloaded function.
calibrate(self: angcal._angcal.AngleCalibration, file_list: list[str], base_peak_angle: float, module_index: int) -> None
calibrates BC parameters for respective module
- file_list: list
list of paths to acquisition files
- base_peak_angle: double
angle of base peak center [degree]
- module_index: int
index of module
calibrate(self: angcal._angcal.AngleCalibration, file_list: list[str], base_peak_angle: float) -> None
calibrates BC parameters for all modules
- file_list: list
list of paths to acquisition files
- base_peak_angle: double
angle of base peak center [degree]
- module_is_disconnected(self: angcal._angcal.AngleCalibration, arg0: int) bool¶
- read_initial_calibration_from_file(self: angcal._angcal.AngleCalibration, arg0: str) None¶
- reads the historical Detector Group (DG) parameters from file and
transforms them to Best Computing parameters
- redistribute_photon_counts_to_fixed_angle_width_bins(*args, **kwargs)¶
Overloaded function.
redistribute_photon_counts_to_fixed_angle_width_bins(self: angcal._angcal.AngleCalibration, arg0: angcal::MythenFrame, arg1: int) -> numpy.ndarray
redistribute photon counts of respective module fixed angle width bins
- numpy.ndarray (,new_number_of_bins)
to fixed angle width redistributed, flatfield corrected and variance scaled photon counts of respective module
redistribute_photon_counts_to_fixed_angle_width_bins(self: angcal._angcal.AngleCalibration, arg0: angcal::MythenFrame) -> numpy.ndarray
redistribute photon counts of given frame to fixed angle width bins
- numpy.ndarray (,new_number_of_bins)
to fixed angle width redistributed, flatfield corrected and variance scaled photon counts
- redistributed_photon_counts_in_base_peak_ROI(self: angcal._angcal.AngleCalibration, arg0: angcal::MythenFrame, arg1: int) numpy.ndarray¶
redistribute photon counts to fixed angle width bins which are within base peak region
- Returns:
to fixed angle width redistributed, flatfield corrected and variance scaled photon counts of respective module within base peak ROI
- Return type:
numpy.ndarray (,number_of_bins_in_base_peak_ROI)