skbeam.core.calibration.estimate_d_blind¶
-
skbeam.core.calibration.
estimate_d_blind
(name, wavelength, bin_centers, ring_average, window_size, max_peak_count, thresh)¶ Estimate the sample-detector distance
Given a radially integrated calibration image return an estimate for the sample-detector distance. This function does not require a rough estimate of what d should be.
For the peaks found the detector-sample distance is estimated via
\[D = \frac{r}{\tan 2\theta}\]where \(r\) is the distance in mm from the calibrated center to the ring on the detector and \(D\) is the distance from the sample to the detector.
- Parameters
- namestr
The name of the calibration standard. Used to look up the expected peak location
Valid options: [‘Al2O3’, ‘CeO2’, ‘LaB6’, ‘Ni’, ‘Si’]
- wavelengthfloat
The wavelength of scattered x-ray in nm
- bin_centersarray
The distance from the calibrated center to the center of the ring’s annulus in mm
- ring_averagearray
The average intensity in the given ring of a azimuthally integrated powder pattern. In counts [arb]
- window_sizeint
The number of elements on either side of a local maximum to use for locating and refining peaks. Candidates are identified as a relative maximum in a window sized (2*window_size + 1) and the same window is used for fitting the peaks to refine the location.
- max_peak_countint
Use at most this many peaks
- threshfloat
Fraction of maximum peak height
- Returns
- dist_samplefloat
The detector-sample distance in mm. This is the mean of the estimate from all of the peaks used.
- std_dist_samplefloat
The standard deviation of d computed from the peaks used.