AngularConversion

Class to perform angular conversion. As conversion parameters it expects the “historic detector group” DG parameters. See Different Parameter Sets for a more detailed description of the different detector parameters.

class angcal._angcal.AngularConversion

Bases: pybind11_object

__init__(*args, **kwargs)

Overloaded function.

  1. __init__(self: angcal._angcal.AngularConversion, MythenDetector: angcal::MythenDetector) -> None

  2. __init__(self: angcal._angcal.AngularConversion, MythenDetector: angcal::MythenDetector, histogram_bin_width: float, angular_range: tuple[float, float]) -> None

Parameters:
MythenDetector: MythenDetector

storing all mythen specific parameters

histogram_bin_width: float

bin width of fixed angle width histogram [degrees]

angular_range: tuple of float

(min_angle, max_angle) angular range for conversion [degrees]

convert(*args, **kwargs)

Overloaded function.

  1. convert(self: angcal._angcal.AngularConversion, photon_counts: numpy.ndarray[numpy.uint32], detector_angles: numpy.ndarray[numpy.float64], incident_intensities: numpy.ndarray[numpy.uint64], exposure_time: float) -> numpy.ndarray

    convert frames of photon counts to a diffraction pattern. The photon counts are corrected for flatfield, rate, incident intensity and solid angle, redistributed to fixed angle width bins and averaged

Parameters:
photon_counts: numpy.ndarray of uint32, shape (n_frames, n_channels)

photon counts of each frame

detector_angles: numpy.ndarray of float, shape (n_frames,)

detector angle of each frame [degrees]

incident_intensities: numpy.ndarray of uint64, shape (n_frames,)

incident intensity of each frame

exposure_time: float

exposure time for each frame [s]

Returns:
numpy.ndarray (num_fixed_angle_width_bins, 2)

diffraction pattern in the range [min_angle, max_angle], first dimension photon counts redistributed to fixed angle width bins, second dimension respective standard deviation, values of -1.0 denote bins with insufficient coverage or which are denoted by a bad channel

  1. convert(self: angcal._angcal.AngularConversion, photon_counts: numpy.ndarray[numpy.uint32], detector_angle: float, incident_intensity: int, exposure_time: float) -> numpy.ndarray

    convert a frame to a diffraction pattern. The photon counts are corrected for flatfield, rate, incident intensity and solid angle, redistributed to fixed angle width bins and averaged

property angular_range

(-180.0, 180.0)) :returns: (min_angle, max_angle) :rtype: tuple of float

Type:

angular range for conversion [degrees] (default

property bad_channels

numpy.ndarray of bool, shape (n_channels,) Each element is True if the channel is bad, otherwise False.

Type:

bad_channels

property flatfield

numpy.ndarray of float, shape (n_channels, 2) first column normalized flatfield value, second column its standard deviation

Type:

normalized_flatfield

property histogram_bin_width

bin width of fixed angle width histogram [degrees] default: ‘0.0036°’

property num_fixed_angle_width_bins

number of bins in fixed angle width histogram

property scale_factor

scale factor to scale correction to reasonable values