dxtbx.serialize

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_or_none(filename)[source]
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.experiment_list(infile, check_format=True)[source]

Load an experiment list from a serialized format.

dxtbx.serialize.load.imageset(filename)[source]

Load the given JSON file.

Params:

infile The input filename

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.

XDS_INP(space_group_number=None, real_space_a=None, real_space_b=None, real_space_c=None, job_card='XYCORR INIT COLSPOT IDXREF DEFPIX INTEGRATE CORRECT')[source]
__init__(sequence)[source]
get_beam()[source]
get_detector()[source]
get_goniometer()[source]
get_scan()[source]
get_template()[source]
xparm_xds(real_space_a, real_space_b, real_space_c, space_group)[source]
dxtbx.serialize.xds.xds_detector_name(dxtbx_name)[source]

Translate from a xia2 name from the detector library to an XDS detector name.