get_azimuthal_integral1d#
- Diffraction2D.get_azimuthal_integral1d(npt, mask=None, radial_range=None, azimuth_range=None, inplace=False, method='splitpixel_pyxem', sum=False, **kwargs)[source]#
Creates a polar reprojection using pyFAI’s azimuthal integrate 2d. This method is designed with 2 cases in mind. (1) the signal has pyxem style units, if a wavelength is not provided no account is made for the curvature of the Ewald sphere. (2) the signal has pyFAI style units, in which case the detector kwarg must be provided.
- Parameters:
npt (int) – The number of radial points to calculate
mask (boolean array or BaseSignal) – A boolean mask to apply to the data to exclude some points. If mask is a BaseSignal then it is iterated over as well.
radial_range (None or (float, float)) – The radial range over which to perform the integration. Default is the full frame
azimuth_range (None or (float, float)) – The azimuthal range over which to perform the integration. Default is from -pi to pi
inplace (bool) – If the signal is overwritten or copied to a new signal
method (str) – Can be “numpy”, “cython”, “BBox” or “splitpixel”, “lut”, “csr”, “nosplit_csr”, “full_csr”, “lut_ocl” and “csr_ocl” if you want to go on GPU. To Specify the device: “csr_ocl_1,2”
sum (bool) – If true returns the pixel split sum rather than the azimuthal integration which gives the mean.
- Other Parameters:
dummy (float) – Value for dead/masked pixels
delta_dummy (float) – Precision value for dead/masked pixels
correctSolidAngle (bool) – Correct for the solid angle of each pixel if True
dark (ndarray) – The dark noise image
flat (ndarray) – The flat field correction image
safe (bool) – Do some extra checks to ensure LUT/CSR is still valid. False is faster.
- Returns:
integration – A 1D diffraction signal
- Return type:
Examples
Basic case using “2th_deg” units (no wavelength needed)
>>> ds.unit = "2th_deg" >>> ds.get_azimuthal_integral1d(npt=100)
Basic case using a curved Ewald Sphere approximation and pyXEM units (wavelength needed)
>>> ds.unit = "k_nm^-1" # setting units >>> ds.set_ai(wavelength=2.5e-12) # creating an AzimuthalIntegrator Object >>> ds.get_azimuthal_integral1d(npt=100)