hexrd.fitting.calibration package

Submodules

Module contents

class hexrd.fitting.calibration.CompositeCalibration(instr, processed_picks, img_dict)[source]

Bases: object

reduced_params()[source]
residual(reduced_params, pick_data_list)[source]
class hexrd.fitting.calibration.InstrumentCalibrator(*args)[source]

Bases: object

property calibration_data
property calibrators
extract_points(fit_tth_tol, int_cutoff=0.0001)[source]
property flags
property full_params
property instr
property reduced_params
residual(x0)[source]
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
model(reduced_params, data_dict)[source]
property npe
property npi
property params
property plane_data
residual(reduced_params, data_dict)[source]
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
model(reduced_params, calibration_data=None)[source]
property npe
property npi
property params
property pktype
property plane_data
residual(reduced_params, calibration_data=None)[source]
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: object

this 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

add_instr_params(parms_list)[source]
add_tth_parameters(parms_list)[source]
calc_residual(params)[source]
property data
property engineering_constraints
property engineering_params
property instr
make_lmfit_params()[source]
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
run_calibration(method='least_squares', odict=None)[source]

odict is the options dictionary

set_minimizer()[source]
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

hexrd.fitting.calibration.generate_parameter_names(instr, grain_params)[source]