dxtbx.model.experiment_list

class dxtbx.model.ExperimentList

Bases: Boost.Python.instance

all_stills()

Check if all the experiments are stills

all_sweeps()

Check if all the experiments are from sweeps

append((ExperimentList)arg1, (Experiment)arg2) → None :
C++ signature :
void append(dxtbx::model::ExperimentList {lvalue},dxtbx::model::Experiment)
beams()

Get a list of the unique beams (includes None).

clear((ExperimentList)arg1) → None :
C++ signature :
void clear(dxtbx::model::ExperimentList {lvalue})
crystals()

Get a list of the unique crystals (includes None).

detectors()

Get a list of the unique detectors (includes None).

empty((ExperimentList)arg1) → bool :
C++ signature :
bool empty(dxtbx::model::ExperimentList {lvalue})
extend((ExperimentList)arg1, (ExperimentList)arg2) → None :
C++ signature :
void extend(dxtbx::model::ExperimentList {lvalue},dxtbx::model::ExperimentList)
find((ExperimentList)arg1, (str)arg2) → int :
C++ signature :
int find(dxtbx::model::ExperimentList {lvalue},std::string)
goniometers()

Get a list of the unique goniometers (includes None).

identifiers((ExperimentList)arg1) → std_string :
C++ signature :
scitbx::af::shared<std::string> identifiers(dxtbx::model::ExperimentList {lvalue})
imagesets()

Get a list of the unique imagesets.

indices((ExperimentList)arg1, (BeamBase)arg2) → size_t :
C++ signature :
scitbx::af::shared<unsigned long> indices(dxtbx::model::ExperimentList {lvalue},boost::shared_ptr<dxtbx::model::BeamBase>)

indices( (ExperimentList)arg1, (Detector)arg2) -> size_t :

C++ signature :
scitbx::af::shared<unsigned long> indices(dxtbx::model::ExperimentList {lvalue},boost::shared_ptr<dxtbx::model::Detector>)

indices( (ExperimentList)arg1, (Goniometer)arg2) -> size_t :

C++ signature :
scitbx::af::shared<unsigned long> indices(dxtbx::model::ExperimentList {lvalue},boost::shared_ptr<dxtbx::model::Goniometer>)

indices( (ExperimentList)arg1, (Scan)arg2) -> size_t :

C++ signature :
scitbx::af::shared<unsigned long> indices(dxtbx::model::ExperimentList {lvalue},boost::shared_ptr<dxtbx::model::Scan>)

indices( (ExperimentList)arg1, (CrystalBase)arg2) -> size_t :

C++ signature :
scitbx::af::shared<unsigned long> indices(dxtbx::model::ExperimentList {lvalue},boost::shared_ptr<dxtbx::model::CrystalBase>)

indices( (ExperimentList)arg1, (object)arg2) -> size_t :

C++ signature :
scitbx::af::shared<unsigned long> indices(dxtbx::model::ExperimentList {lvalue},boost::python::api::object)
is_consistent((ExperimentList)arg1) → bool :
C++ signature :
bool is_consistent(dxtbx::model::ExperimentList {lvalue})
nullify_all_single_file_reader_format_instances()

Parallel reading of HDF5 from the same handle is not allowed. Python multiprocessing is a bit messed up and used fork on linux so need to close and reopen file.

profiles()

Get a list of the unique profile models (includes None).

remove_on_experiment_identifiers((ExperimentList)arg1, (list)arg2) → None :
C++ signature :
void remove_on_experiment_identifiers(dxtbx::model::ExperimentList {lvalue},boost::python::list)
replace((ExperimentList)arg1, (BeamBase)arg2, (BeamBase)arg3) → None :
C++ signature :
void replace(dxtbx::model::ExperimentList {lvalue},boost::shared_ptr<dxtbx::model::BeamBase>,boost::shared_ptr<dxtbx::model::BeamBase>)

replace( (ExperimentList)arg1, (Detector)arg2, (Detector)arg3) -> None :

C++ signature :
void replace(dxtbx::model::ExperimentList {lvalue},boost::shared_ptr<dxtbx::model::Detector>,boost::shared_ptr<dxtbx::model::Detector>)

replace( (ExperimentList)arg1, (Goniometer)arg2, (Goniometer)arg3) -> None :

C++ signature :
void replace(dxtbx::model::ExperimentList {lvalue},boost::shared_ptr<dxtbx::model::Goniometer>,boost::shared_ptr<dxtbx::model::Goniometer>)

replace( (ExperimentList)arg1, (Scan)arg2, (Scan)arg3) -> None :

C++ signature :
void replace(dxtbx::model::ExperimentList {lvalue},boost::shared_ptr<dxtbx::model::Scan>,boost::shared_ptr<dxtbx::model::Scan>)

replace( (ExperimentList)arg1, (CrystalBase)arg2, (CrystalBase)arg3) -> None :

C++ signature :
void replace(dxtbx::model::ExperimentList {lvalue},boost::shared_ptr<dxtbx::model::CrystalBase>,boost::shared_ptr<dxtbx::model::CrystalBase>)

replace( (ExperimentList)arg1, (object)arg2, (object)arg3) -> None :

C++ signature :
void replace(dxtbx::model::ExperimentList {lvalue},boost::python::api::object,boost::python::api::object)
scaling_models()

Get a list of the unique scaling models (includes None).

scans()

Get a list of the unique scans (includes None).

select_on_experiment_identifiers((ExperimentList)arg1, (list)arg2) → None :
C++ signature :
void select_on_experiment_identifiers(dxtbx::model::ExperimentList {lvalue},boost::python::list)
to_datablocks()

Return the experiment list as a datablock list. This assumes that the experiment contains 1 datablock.

to_dict()

Serialize the experiment list to dictionary.

where((ExperimentList)arg1[, (BeamBase)beam=None[, (Detector)detector=None[, (Goniometer)goniometer=None[, (Scan)scan=None[, (CrystalBase)crystal=None[, (object)profile=None[, (object)imageset=None[, (object)scaling_model=None]]]]]]]]) → size_t :
C++ signature :
scitbx::af::shared<unsigned long> where(dxtbx::model::ExperimentList {lvalue} [,boost::shared_ptr<dxtbx::model::BeamBase>=None [,boost::shared_ptr<dxtbx::model::Detector>=None [,boost::shared_ptr<dxtbx::model::Goniometer>=None [,boost::shared_ptr<dxtbx::model::Scan>=None [,boost::shared_ptr<dxtbx::model::CrystalBase>=None [,boost::python::api::object=None [,boost::python::api::object=None [,boost::python::api::object=None]]]]]]]])
class dxtbx.model.experiment_list.ExperimentListDict(obj, check_format=True, directory=None)[source]

Bases: object

A helper class for serializing the experiment list to dictionary (needed to save the experiment list to JSON format.

decode()[source]

Decode the dictionary into a list of experiments.

static model_or_none(mlist, eobj, name)[source]

Get a model or None.

class dxtbx.model.experiment_list.ExperimentListDumper(experiment_list)[source]

Bases: object

A class to help writing JSON files.

as_file(filename, **kwargs)[source]

Dump experiment list as file.

as_json(filename=None, compact=False, split=False)[source]

Dump experiment list as json

as_pickle(filename=None, **kwargs)[source]

Dump experiment list as pickle.

class dxtbx.model.experiment_list.ExperimentListFactory[source]

Bases: object

A class to help instantiate experiment lists.

static from_args(args, verbose=False, unhandled=None)[source]

Try to load experiment from any recognised format.

static from_datablock_and_crystal(datablock, crystal, load_models=True)[source]

Load an experiment list from a datablock.

static from_dict(obj, check_format=True, directory=None)[source]

Load an experiment list from a dictionary.

static from_filenames(filenames, verbose=False, unhandled=None, compare_beam=None, compare_detector=None, compare_goniometer=None, scan_tolerance=None, format_kwargs=None, load_models=True)[source]

Create a list of data blocks from a list of directory or file names.

static from_imageset_and_crystal(imageset, crystal, load_models=True)[source]

Load an experiment list from an imageset and crystal.

static from_json(text, check_format=True, directory=None)[source]

Load an experiment list from JSON.

static from_json_file(filename, check_format=True)[source]

Load an experiment list from a json file.

static from_pickle_file(filename)[source]

Decode an experiment list from a pickle file.

static from_serialized_format(filename, check_format=True)[source]

Try to load the experiment list from a serialized format.

static from_stills_and_crystal(imageset, crystal, load_models=True)[source]

Create an experiment list from stills and crystal.

static from_sweep_and_crystal(imageset, crystal, load_models=True)[source]

Create an experiment list from sweep and crystal.

static from_xds(xds_inp, xds_other)[source]

Generate an experiment list from XDS files.

class dxtbx.model.experiment_list.ExperimentListTemplateImporter(templates, verbose=False, **kwargs)[source]

Bases: object

A class to import an experiment list from a template.

exception dxtbx.model.experiment_list.InvalidExperimentListError[source]

Bases: exceptions.RuntimeError

Indicates an error whilst validating the experiment list.

This means that there is some structural problem that prevents the given data from representing a well-formed experiment list. This doesn’t indicate e.g. some problem with the data or model consistency.