Click here to go to the corresponding page for the latest version of DIALS
dxtbx.serialize¶
-
dxtbx.serialize.dump.
compact_simple_list
(match)[source]¶ Callback function. Given a simple list match, compact it and ensure that it wraps around by 80 characters.
- Params:
- match The regular expression match
Returns: The string to replace the expression with
-
dxtbx.serialize.dump.
compact_simple_lists
(string)[source]¶ Find simple lists in the string and compact.
- Params:
- string The input JSON string
Returns: The output JSON string
-
dxtbx.serialize.dump.
imageset
(obj, outfile, compact=False)[source]¶ Dump the given object to file.
- Params:
- obj The imageset to dump outfile The output file name or file object compact Write in compact representation
-
dxtbx.serialize.dump.
imageset_to_string
(obj, compact=False)[source]¶ Dump the given object to string.
- Params:
- obj The imageset compact Write in compact representation
Returns: The JSON string
-
dxtbx.serialize.imageset.
basic_imageset_from_dict
(d, directory=None)[source]¶ Construct an ImageSet class from the dictionary.
-
dxtbx.serialize.imageset.
basic_imageset_to_dict
(imageset)[source]¶ Convert an imageset to a dictionary
- Params:
- imageset The imageset
Returns: A dictionary of the parameters
-
dxtbx.serialize.imageset.
filename_to_absolute
(filename)[source]¶ Convert filenames to absolute form.
-
dxtbx.serialize.imageset.
imagesequence_from_dict
(d, check_format=True, directory=None)[source]¶ Construct and image sequence from the dictionary.
-
dxtbx.serialize.imageset.
imagesequence_to_dict
(sequence)[source]¶ Convert a sequence to a dictionary
- Params:
- sequence The sequence
Returns: A dictionary of the parameters
-
dxtbx.serialize.imageset.
imageset_from_dict
(d, check_format=True, directory=None)[source]¶ Convert the dictionary to a sequence
- Params:
- d The dictionary of parameters
Returns: The sequence
-
dxtbx.serialize.imageset.
imageset_to_dict
(imageset)[source]¶ Convert the imageset to a dictionary
- Params:
- imageset The imageset
Returns: A dictionary of the parameters
-
dxtbx.serialize.load.
crystal
(infile)[source]¶ Load the given JSON file.
- Params:
- infile The input filename or file object
Returns: The models
-
dxtbx.serialize.load.
datablock
(filename, check_format=True)[source]¶ Load a given JSON or pickle file.
- Params:
- filename The input filename
Returns: The datablock
-
dxtbx.serialize.load.
experiment_list
(infile, check_format=True)[source]¶ Load an experiment list from a serialzied format.
-
dxtbx.serialize.load.
imageset
(filename)[source]¶ Load the given JSON file.
- Params:
- infile The input filename
Returns: The models
-
dxtbx.serialize.load.
imageset_from_string
(string, directory=None)[source]¶ Load the string and return the models.
- Params:
- string The JSON string to load
Returns: The models
-
dxtbx.serialize.xds.
to_crystal
(filename)[source]¶ Get the crystal model from the xparm file
- Params:
- filename The xparm/or integrate filename
Returns: The crystal model
-
dxtbx.serialize.xds.
to_imageset
(input_filename, extra_filename=None)[source]¶ Get an image set from the xds input filename plus an extra filename
- Params:
- input_filename The XDS.INP file extra_filename A (G)XPARM.XDS, INTGRATE.HKL or XDS_ASCII.HKL file
Returns: The imageset
-
class
dxtbx.serialize.xds.
to_xds
(sequence)[source]¶ Bases:
object
A class to export contents of a Sequence as XDS.INP or XPARM.XDS.