hexrd.fitting.calibration.lmfit_param_handling module

exception hexrd.fitting.calibration.lmfit_param_handling.LmfitValidationException[source]

Bases: Exception

hexrd.fitting.calibration.lmfit_param_handling.add_engineering_constraints(params, engineering_constraints)[source]
hexrd.fitting.calibration.lmfit_param_handling.add_group_constrained_detector_parameters(instr: HEDMInstrument, euler_convention: dict | tuple | None, parms_list: list[tuple], relative_constraints: RelativeConstraints)[source]
hexrd.fitting.calibration.lmfit_param_handling.add_system_constrained_detector_parameters(instr: HEDMInstrument, euler_convention: dict | tuple | None, parms_list: list[tuple], relative_constraints: RelativeConstraints)[source]
hexrd.fitting.calibration.lmfit_param_handling.add_unconstrained_detector_parameters(instr, euler_convention, parms_list)[source]
hexrd.fitting.calibration.lmfit_param_handling.create_beam_param_names(instr: HEDMInstrument) dict[str, str][source]
hexrd.fitting.calibration.lmfit_param_handling.create_grain_params(base_name, grain, refinements=None)[source]
hexrd.fitting.calibration.lmfit_param_handling.create_instr_params(instr, euler_convention=('zxz', False), relative_constraints=None)[source]
hexrd.fitting.calibration.lmfit_param_handling.create_material_params(material, refinements=None)[source]
hexrd.fitting.calibration.lmfit_param_handling.create_tth_parameters(instr: HEDMInstrument, meas_angles: dict[str, numpy.ndarray]) list[lmfit.parameter.Parameter][source]
hexrd.fitting.calibration.lmfit_param_handling.detector_angles_euler(panel, euler_convention)[source]
hexrd.fitting.calibration.lmfit_param_handling.fix_detector_y(instr: HEDMInstrument, params: Parameters, relative_constraints: RelativeConstraints | None = None)[source]

Fix the y translation for all detectors

hexrd.fitting.calibration.lmfit_param_handling.grain_param_names(base_name)[source]
hexrd.fitting.calibration.lmfit_param_handling.normalize_euler_convention(euler_convention)[source]
hexrd.fitting.calibration.lmfit_param_handling.param_names_euler_convention(base, euler_convention)[source]
hexrd.fitting.calibration.lmfit_param_handling.rename_to_avoid_collision(params, all_params)[source]
hexrd.fitting.calibration.lmfit_param_handling.set_detector_angles_euler(panel, base_name, params, euler_convention)[source]
hexrd.fitting.calibration.lmfit_param_handling.tth_parameter_prefixes(instr: HEDMInstrument) dict[str, str][source]

Generate tth parameter prefixes according to beam names

hexrd.fitting.calibration.lmfit_param_handling.update_group_constrained_detector_parameters(instr: HEDMInstrument, params: dict, euler_convention: dict | tuple | None, relative_constraints: RelativeConstraints)[source]
hexrd.fitting.calibration.lmfit_param_handling.update_instrument_from_params(instr, params, euler_convention=('zxz', False), relative_constraints: RelativeConstraints | None = None)[source]

this function updates the instrument from the lmfit parameter list. we don’t have to keep track of the position numbers as the variables are named variables. this will become the standard in the future since bound constraints can be very easily implemented.

hexrd.fitting.calibration.lmfit_param_handling.update_material_from_params(params, material)[source]
hexrd.fitting.calibration.lmfit_param_handling.update_system_constrained_detector_parameters(instr: HEDMInstrument, params: dict, euler_convention: dict | tuple | None, relative_constraints: RelativeConstraints)[source]
hexrd.fitting.calibration.lmfit_param_handling.update_unconstrained_detector_parameters(instr, params, euler_convention)[source]
hexrd.fitting.calibration.lmfit_param_handling.validate_params_list(params_list)[source]