hexrd.fitting.calibration package
Submodules
Module contents
- class hexrd.fitting.calibration.CompositeCalibration(instr, processed_picks, img_dict)[source]
Bases:
object
- class hexrd.fitting.calibration.InstrumentCalibrator(*args)[source]
Bases:
object- property calibration_data
- property calibrators
- property flags
- property full_params
- property instr
- property reduced_params
- run_calibration(fit_tth_tol=None, int_cutoff=0.0001, conv_tol=0.0001, max_iter=5, use_robust_optimization=False)[source]
Parameters
- fit_tth_tolTYPE, optional
DESCRIPTION. The default is None.
- int_cutoffTYPE, optional
DESCRIPTION. The default is 1e-4.
- conv_tolTYPE, optional
DESCRIPTION. The default is 1e-4.
- max_iterTYPE, optional
DESCRIPTION. The default is 5.
- use_robust_optimizationTYPE, optional
DESCRIPTION. The default is False.
Returns
- x1TYPE
DESCRIPTION.
- class hexrd.fitting.calibration.LaueCalibrator(instr, plane_data, grain_params, flags, min_energy=5.0, max_energy=25.0)[source]
Bases:
object- calibrator_type = 'laue'
- property energy_cutoffs
- property flags
- property full_params
- property instr
- property npe
- property npi
- property params
- property plane_data
- class hexrd.fitting.calibration.PowderCalibrator(instr, plane_data, img_dict, flags, tth_tol=None, eta_tol=0.25, fwhm_estimate=None, min_pk_sep=0.001, min_ampl=0.0, pktype='pvoigt', bgtype='linear', tth_distortion=None)[source]
Bases:
object- property bgtype
- property calibration_data
- property eta_tol
- property flags
- property full_params
- property fwhm_estimate
- property img_dict
- property instr
- property min_ampl
- property min_pk_sep
- property npe
- property npi
- property params
- property pktype
- property plane_data
- property spectrum_kwargs
- property tth_distortion
- property tth_tol
- hexrd.fitting.calibration.StructureLessCalibrator
alias of
StructurelessCalibrator
- class hexrd.fitting.calibration.StructurelessCalibrator(instr, data, tth_distortion=None, engineering_constraints=None)[source]
Bases:
objectthis class implements the equivalent of the powder calibrator but without constraining the optimization to a structure. in this implementation, the location of the constant two theta line that a set of points lie on is also an optimization parameter.
unlike the previous implementations, this routine is based on the lmfit module to implement the more complicated constraints for the TARDIS box
if TARDIS_constraints are set to True, then the following additional linear constraint is added to the calibration
22.83 mm <= |IMAGE-PLATE-2 tvec[1]| + |IMAGE-PLATE-2 tvec[1]| <= 23.43 mm
- property data
- property engineering_constraints
- property engineering_params
- property instr
- property meas_angles
this property will return a dictionary of angles based on current instrument parameters.
- property nrings
return dictionary over panels with number of DS rings on each panel
- property residual
- property tth_correction
- property tth_distortion
- hexrd.fitting.calibration.calibrate_instrument_from_sx(instr, grain_params, bmat, xyo_det, hkls_idx, param_flags=None, grain_flags=None, ome_period=None, xtol=1.4901161193847656e-08, ftol=1.4901161193847656e-08, factor=10.0, sim_only=False, use_robust_lsq=False)[source]
arguments xyo_det, hkls_idx are DICTs over panels