core subpackge¶
Scientific Algorithms¶
  | 
Run reconstruction with difference map algorithm.  | 
  | 
Wraps generator implementation of multi-tau  | 
  | 
Reconstruct the final phase image.  | 
  | 
Wraps lazy_dpc  | 
  | 
This will compute the hkl values for all pixels in a shape specified by detector_size.  | 
Helper Classes¶
Dictionary-like classes¶
  | 
A class to make dealing with the meta-data scheme for DataExchange easier  | 
A sub-class of dict which raises more verbose errors if a key is not found.  | 
|
A class to make dealing with storing default values easier.  | 
Image warping functions¶
  | 
Convert the 2D image to a list of x y I coordinates where x == x_img - detector_center[0] and y == y_img - detector_center[1]  | 
  | 
Convert a cartesian grid (x,y) to the radius relative to some center  | 
  | 
Make a grid of angular positions.  | 
Peak¶
Peak fitting¶
  | 
Refine candidate locations  | 
  | 
Attempts to refine the peaks by fitting to a quadratic function.  | 
  | 
Attempts to refine the peaks by fitting a quadratic to the log of the y-data.  | 
  | 
Filters the N largest candidate peaks  | 
  | 
Filter to remove candidate that are too small.  | 
Peak finding¶
  | 
Find the pixel-resolution center of a set of concentric rings.  | 
  | 
Finds and estimates the location, width, and height of the largest peak.  | 
Image pre-processing¶
  | 
Function to subtract a series of measured images from background/dark current/reference images.  | 
Histograms and Integration¶
Binning¶
  | 
Bin the values in y based on their x-coordinates  | 
  | 
Implementation of caking.  | 
  | 
Grid irregularly spaced data points onto a regular grid via histogramming  | 
Helper functions¶
  | 
s -> (s0,s1), (s1,s2), (s2, s3), …  | 
  | 
This will provide the geometric series for the integration.  | 
  | 
Standard multiple-tau algorithm for finding the lag times (delay times).  | 
  | 
Generate bin edges.  | 
  | 
Helper function for turning a array of bin edges into an array of bin centers  | 
Generating ROIs¶
  | 
This function will provide data for graphical representation of pixels variation over time for required ROI.  | 
  | 
Circular average of the the image data The circular average is also known as the radial integration  | 
  | 
Compute the mean intensity for each ROI in the image list  | 
  | 
This will provide intensities of the ROI’s of the labeled array according to the pixel list eg: intensities of the rings of the labeled array  | 
  | 
Return the brightest pixel in any ROI in any image in the image set.  | 
  | 
  | 
  | 
Calculate the inner and outer radius of a set of rings.  | 
  | 
Draw annual (ring-shaped) shaped regions of interest.  | 
  | 
This function wil provide the indices array for rectangle region of interests.  | 
Physical relations¶
  | 
Helper function to convert \(d\) to \(q\).  | 
  | 
Helper function to convert \(d\) to \(q\).  | 
  | 
Helper function to convert q to two-theta.  | 
  | 
Helper function to convert two-theta to q  | 
  | 
Converts radius from the calibrated center to scattering angle (2:math:2theta) with known detector to sample distance.  | 
  | 
This module compute the reciprocal space (q) values from known HKL array for each pixel of the detector for all the images  | 
  | 
For a given detector and pyfai calibrated geometry give back the q value for each pixel in the detector.  | 
Boolean Logic¶
  | 
Computes the truth value of NOT (x1 AND x2) element wise.  | 
  | 
Compute truth value of NOT (x1 OR x2)) element wise.  | 
  | 
Compute truth value of x1 AND (NOT (x1 AND x2)) element wise.  | 
Calibration¶
  | 
Estimate the sample-detector distance  | 
  | 
Refines the location of the center of the beam.  |