ImageD11.parameters module#
- class ImageD11.parameters.AnalysisSchema(filename=None)#
Bases:
objectClass to handle more complicated data analysis parameters.
- add_phase_from_dict(phase_name, phase_dict)#
Add phase from pars dict
- add_phase_from_pars_file(phase_name, phase_path)#
Add phase from ImageD11 pars file
- add_phase_from_pars_obj(phase_name, phase_pars_obj, phase_path=None)#
Add phase from ImageD11 pars object
- add_phase_from_unitcell(phase_name, unitcell)#
Add phase from unitcell object
phase_name: the name of the phase unitcell: the unitcell object
- classmethod from_default(detector='eiger')#
Load default detector parameters from disk for either ‘eiger’ or ‘frelon’ detecor
- classmethod from_geom_and_phase_dict(geom_dict, phase_dict, phase_name)#
Create a new AnalysisSchema object from a geometry dict and a phase dict
- classmethod from_json(filename)#
- classmethod from_old_pars_dict(pars_dict, phase_name=None)#
Create a new AnalysisSchema object from an old parameters dict, with optional phase_name (‘phase’ if not provided)
- classmethod from_old_pars_file(filename, phase_name=None)#
Create a new AnalysisSchema object from an old parameters file
- classmethod from_old_pars_object(pars_obj, phase_name=None)#
Create a new AnalysisSchema object from an old parameters object
- get_any_phase_pars_obj()#
Returns any parameters object from self.phase_pars_obj_dict
- get_xfab_pars_dict(phase_name=None)#
Produce an old-style parameters dict
- load_json(json_path)#
Load json from json_path
- save(json_path=None)#
Save current state - both to json and to individual .par files.
- static split_parameters_dicts(pars_dict)#
Split pars dict parameters into (geometry, phase) dicts
- static split_parameters_objs(pars_obj)#
Split pars object into (geometry, phase) objects
- to_old_pars_dict(phase_name=None)#
Produce an old-style ImageD11 parameters dict
- to_old_pars_file(filename, phase_name=None)#
Write an old-style ImageD11 .par file
- to_old_pars_object(phase_name=None)#
Produce an old-style ImageD11 parameters object
- class ImageD11.parameters.par(name, value, helpstring=None, vary=False, can_vary=False, stepsize=None)#
Bases:
objectRepresents a thing which can vary
- fromstringlist(sl)#
to send to Java
- tostringlist()#
to catch from Java
- class ImageD11.parameters.parameters(**kwds)#
Bases:
objectClass to hold a set of named parameters
- addpar(par)#
add a parameter object
- dumbtypecheck()#
Eventually parameter types (and units and fixed/varied to be specifieable For now it just tries to coerce to float, then does nothing
- classmethod from_dict(pars_dict)#
- classmethod from_file(filename, phase_name=None)#
- get(name)#
- get_parameters()#
Returns a dictionary of parameters
- get_variable_list()#
- get_variable_stepsizes()#
stepsizes for optimisers
- get_variable_values()#
values of the parameters
- loadparameters(filename, phase_name=None)#
Load parameters from a file
- saveparameters(filename)#
Write parameters to a file
- set(name, value)#
- set_parameters(d)#
Updates the values of parameters
- set_variable_values(values)#
set values of the parameters
- set_varylist(vl)#
- update_other(other)#
Synchronise an object with the values in this object
- update_yourself(other)#
Sychronise this parameter objects list of values with another object
- ImageD11.parameters.read_par_file(filename, phase_name=None)#
- ImageD11.parameters.rel_to_absolute(relative_filename, json_path)#
Get absolute path from (could be relative) filename