mxcubecore.queuelib.models¶
Pydantic models for the queue client wire format.
See JSON_FORMAT.md in this package for the full JSON format documentation
Functions
|
|
|
|
|
Validate <data> against <model_cls>, tolerating unknown fields. |
|
Validate a path without requiring it to exist. |
|
|
|
|
|
|
|
Classes
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Parameters of tasks defined by a queue entry DATA_MODEL, for instance the SSX collections. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- class mxcubecore.queuelib.models.CharacterisationNodeModel(*, type: str = '', queueID: int = -1, checked: bool = False, state: int = 0, label: str = '', sampleID: str, sampleQueueID: int | None = None, taskIndex: int | None = None, diffractionPlan: list[DataCollectionNodeModel] | None = None, diffractionPlanID: int | None = None, isDiffractionPlan: bool = False, name: str | None = None, parameters: CharacterisationParameters)[source]¶
Bases:
TaskNodeModel- Parameters:
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid'}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class mxcubecore.queuelib.models.CharacterisationParameters(*, shape: str | int = '', directory: str = '', process_directory: str = '', xds_dir: str = '', base_prefix: str = '', mad_prefix: str = '', reference_image_prefix: str = '', wedge_prefix: str = '', run_number: int = 0, suffix: str = '', precision: int = 0, start_num: int = 0, num_files: int = 0, compression: bool = False, path: str = '', prefix: str = '', fileName: str | None = '', fullPath: str | None = '', subdir: str = '', first_image: int = 0, num_images: int = 0, osc_start: float = 0, osc_range: float = 0, osc_total_range: float = 0, offset: float = 0, kappa: float | None = 0, kappa_phi: float | None = 0, exp_time: float = 0, num_lines: int = 1, energy: float = 0, resolution: float = 0, detector_distance: float = 0, transmission: float = 100, shutterless: bool = True, take_snapshots: int = 0, detector_binning_mode: str | None = None, detector_roi_mode: int = 0, mesh_range: dict[str, float] = {}, num_triggers: int = 0, num_images_per_trigger: int = 0, cell_counting: str | None = None, mesh_center: str | None = None, cell_spacing: tuple[float, float] | None = None, sub_wedge_size: int = 10, disable_processing: bool = False, inverse_beam: bool = False, space_group: str = '', cellA: float = 0, cellB: float = 0, cellC: float = 0, cellAlpha: float = 0, cellBeta: float = 0, cellGamma: float = 0, helical: bool = False, mesh: bool = False, taskIndexList: list[int] | None = None, wedges: list[DataCollectionNodeModel] = [], swNumImages: int = 0, experiment_type: int | str = '', use_aimed_resolution: float = 0, use_aimed_multiplicity: float = 0, aimed_multiplicity: float = 0, aimed_i_sigma: float = 0, aimed_completness: float = 0, strategy_complexity: str = '', strategy_program: str = '', induce_burn: bool = False, use_permitted_rotation: bool = False, permitted_phi_start: float = 0, permitted_phi_end: float = 0, low_res_pass_strat: bool = False, max_crystal_vdim: float = 0, min_crystal_vdim: float = 0, max_crystal_vphi: float = 0, min_crystal_vphi: float = 0, use_min_dose: float = 0, use_min_time: float = 0, min_dose: float = 0, min_time: float = 0, account_rad_damage: bool = False, auto_res: bool = False, opt_sad: bool = False, sad_res: float = 0, determine_rad_params: bool = False, burn_osc_start: float = 0, burn_osc_interval: float = 0, rad_suscept: float = 0, beta: float = 0, gamma: float = 0)[source]¶
Bases:
DataCollectionParameters- Parameters:
directory (str)
process_directory (str)
xds_dir (str)
base_prefix (str)
mad_prefix (str)
reference_image_prefix (str)
wedge_prefix (str)
run_number (int)
suffix (str)
precision (int)
start_num (int)
num_files (int)
compression (bool)
path (str)
prefix (str)
fileName (str | None)
fullPath (str | None)
subdir (str)
first_image (int)
num_images (int)
osc_start (float)
osc_range (float)
osc_total_range (float)
offset (float)
kappa (float | None)
kappa_phi (float | None)
exp_time (float)
num_lines (int)
energy (float)
resolution (float)
detector_distance (float)
transmission (float)
shutterless (bool)
take_snapshots (int)
detector_binning_mode (str | None)
detector_roi_mode (int)
num_triggers (int)
num_images_per_trigger (int)
cell_counting (str | None)
mesh_center (str | None)
sub_wedge_size (int)
disable_processing (bool)
inverse_beam (bool)
space_group (str)
cellA (float)
cellB (float)
cellC (float)
cellAlpha (float)
cellBeta (float)
cellGamma (float)
helical (bool)
mesh (bool)
wedges (list[DataCollectionNodeModel])
swNumImages (int)
use_aimed_resolution (float)
use_aimed_multiplicity (float)
aimed_multiplicity (float)
aimed_i_sigma (float)
aimed_completness (float)
strategy_complexity (str)
strategy_program (str)
induce_burn (bool)
use_permitted_rotation (bool)
permitted_phi_start (float)
permitted_phi_end (float)
low_res_pass_strat (bool)
max_crystal_vdim (float)
min_crystal_vdim (float)
max_crystal_vphi (float)
min_crystal_vphi (float)
use_min_dose (float)
use_min_time (float)
min_dose (float)
min_time (float)
account_rad_damage (bool)
auto_res (bool)
opt_sad (bool)
sad_res (float)
determine_rad_params (bool)
burn_osc_start (float)
burn_osc_interval (float)
rad_suscept (float)
beta (float)
gamma (float)
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'str_strip_whitespace': True, 'use_enum_values': True, 'validate_assignment': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class mxcubecore.queuelib.models.DataCollectionNodeModel(*, type: str = '', queueID: int = -1, checked: bool = False, state: int = 0, label: str = '', sampleID: str, sampleQueueID: int | None = None, taskIndex: int | None = None, diffractionPlan: list[DataCollectionNodeModel] | None = None, diffractionPlanID: int | None = None, isDiffractionPlan: bool = False, name: str | None = None, parameters: DataCollectionParameters)[source]¶
Bases:
TaskNodeModel- Parameters:
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid'}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class mxcubecore.queuelib.models.DataCollectionParameters(*, shape: str | int = '', directory: str = '', process_directory: str = '', xds_dir: str = '', base_prefix: str = '', mad_prefix: str = '', reference_image_prefix: str = '', wedge_prefix: str = '', run_number: int = 0, suffix: str = '', precision: int = 0, start_num: int = 0, num_files: int = 0, compression: bool = False, path: str = '', prefix: str = '', fileName: str | None = '', fullPath: str | None = '', subdir: str = '', first_image: int = 0, num_images: int = 0, osc_start: float = 0, osc_range: float = 0, osc_total_range: float = 0, offset: float = 0, kappa: float | None = 0, kappa_phi: float | None = 0, exp_time: float = 0, num_lines: int = 1, energy: float = 0, resolution: float = 0, detector_distance: float = 0, transmission: float = 100, shutterless: bool = True, take_snapshots: int = 0, detector_binning_mode: str | None = None, detector_roi_mode: int = 0, mesh_range: dict[str, float] = {}, num_triggers: int = 0, num_images_per_trigger: int = 0, cell_counting: str | None = None, mesh_center: str | None = None, cell_spacing: tuple[float, float] | None = None, sub_wedge_size: int = 10, disable_processing: bool = False, inverse_beam: bool = False, space_group: str = '', cellA: float = 0, cellB: float = 0, cellC: float = 0, cellAlpha: float = 0, cellBeta: float = 0, cellGamma: float = 0, helical: bool = False, mesh: bool = False, taskIndexList: list[int] | None = None, wedges: list[DataCollectionNodeModel] = [], swNumImages: int = 0)[source]¶
Bases:
TaskDataPathModel- Parameters:
directory (str)
process_directory (str)
xds_dir (str)
base_prefix (str)
mad_prefix (str)
reference_image_prefix (str)
wedge_prefix (str)
run_number (int)
suffix (str)
precision (int)
start_num (int)
num_files (int)
compression (bool)
path (str)
prefix (str)
fileName (str | None)
fullPath (str | None)
subdir (str)
first_image (int)
num_images (int)
osc_start (float)
osc_range (float)
osc_total_range (float)
offset (float)
kappa (float | None)
kappa_phi (float | None)
exp_time (float)
num_lines (int)
energy (float)
resolution (float)
detector_distance (float)
transmission (float)
shutterless (bool)
take_snapshots (int)
detector_binning_mode (str | None)
detector_roi_mode (int)
num_triggers (int)
num_images_per_trigger (int)
cell_counting (str | None)
mesh_center (str | None)
sub_wedge_size (int)
disable_processing (bool)
inverse_beam (bool)
space_group (str)
cellA (float)
cellB (float)
cellC (float)
cellAlpha (float)
cellBeta (float)
cellGamma (float)
helical (bool)
mesh (bool)
wedges (list[DataCollectionNodeModel])
swNumImages (int)
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'str_strip_whitespace': True, 'use_enum_values': True, 'validate_assignment': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class mxcubecore.queuelib.models.EnergyScanNodeModel(*, type: str = '', queueID: int = -1, checked: bool = False, state: int = 0, label: str = '', sampleID: str, sampleQueueID: int | None = None, taskIndex: int | None = None, diffractionPlan: list[DataCollectionNodeModel] | None = None, diffractionPlanID: int | None = None, isDiffractionPlan: bool = False, name: str | None = None, parameters: EnergyScanParameters)[source]¶
Bases:
TaskNodeModel- Parameters:
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid'}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class mxcubecore.queuelib.models.EnergyScanParameters(*, shape: str | int = '', directory: str = '', process_directory: str = '', xds_dir: str = '', base_prefix: str = '', mad_prefix: str = '', reference_image_prefix: str = '', wedge_prefix: str = '', run_number: int = 0, suffix: str = '', precision: int = 0, start_num: int = 0, num_files: int = 0, compression: bool = False, path: str = '', prefix: str = '', fileName: str | None = '', fullPath: str | None = '', subdir: str = '', element: str = '', edge: str = '')[source]¶
Bases:
TaskDataPathModel- Parameters:
directory (str)
process_directory (str)
xds_dir (str)
base_prefix (str)
mad_prefix (str)
reference_image_prefix (str)
wedge_prefix (str)
run_number (int)
suffix (str)
precision (int)
start_num (int)
num_files (int)
compression (bool)
path (str)
prefix (str)
fileName (str | None)
fullPath (str | None)
subdir (str)
element (str)
edge (str)
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'str_strip_whitespace': True, 'use_enum_values': True, 'validate_assignment': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class mxcubecore.queuelib.models.GenericTaskNodeModel(*, type: str = '', queueID: int = -1, checked: bool = False, state: int = 0, label: str = '', sampleID: str, sampleQueueID: int | None = None, taskIndex: int | None = None, diffractionPlan: list[DataCollectionNodeModel] | None = None, diffractionPlanID: int | None = None, isDiffractionPlan: bool = False, name: str | None = None, parameters: GenericTaskParameters)[source]¶
Bases:
TaskNodeModel- Parameters:
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid'}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class mxcubecore.queuelib.models.GenericTaskParameters(*, shape: str | int = '', directory: str = '', process_directory: str = '', xds_dir: str = '', base_prefix: str = '', mad_prefix: str = '', reference_image_prefix: str = '', wedge_prefix: str = '', run_number: int = 0, suffix: str = '', precision: int = 0, start_num: int = 0, num_files: int = 0, compression: bool = False, path: str = '', prefix: str = '', fileName: str | None = '', fullPath: str | None = '', subdir: str = '', first_image: int = 0, num_images: int = 0, osc_start: float = 0, osc_range: float = 0, osc_total_range: float = 0, offset: float = 0, kappa: float | None = 0, kappa_phi: float | None = 0, exp_time: float = 0, num_lines: int = 1, energy: float = 0, resolution: float = 0, detector_distance: float = 0, transmission: float = 100, shutterless: bool = True, take_snapshots: int = 0, detector_binning_mode: str | None = None, detector_roi_mode: int = 0, mesh_range: dict[str, float] = {}, num_triggers: int = 0, num_images_per_trigger: int = 0, cell_counting: str | None = None, mesh_center: str | None = None, cell_spacing: tuple[float, float] | None = None, sub_wedge_size: int = 10, disable_processing: bool = False, inverse_beam: bool = False, space_group: str = '', cellA: float = 0, cellB: float = 0, cellC: float = 0, cellAlpha: float = 0, cellBeta: float = 0, cellGamma: float = 0, helical: bool = False, mesh: bool = False, taskIndexList: list[int] | None = None, wedges: list[DataCollectionNodeModel] = [], swNumImages: int = 0, **extra_data: Any)[source]¶
Bases:
DataCollectionParametersParameters of tasks defined by a queue entry DATA_MODEL, for instance the SSX collections. The fields that are not defined here are kept, they are validated by the DATA_MODEL of the queue entry.
- Parameters:
directory (str)
process_directory (str)
xds_dir (str)
base_prefix (str)
mad_prefix (str)
reference_image_prefix (str)
wedge_prefix (str)
run_number (int)
suffix (str)
precision (int)
start_num (int)
num_files (int)
compression (bool)
path (str)
prefix (str)
fileName (str | None)
fullPath (str | None)
subdir (str)
first_image (int)
num_images (int)
osc_start (float)
osc_range (float)
osc_total_range (float)
offset (float)
kappa (float | None)
kappa_phi (float | None)
exp_time (float)
num_lines (int)
energy (float)
resolution (float)
detector_distance (float)
transmission (float)
shutterless (bool)
take_snapshots (int)
detector_binning_mode (str | None)
detector_roi_mode (int)
num_triggers (int)
num_images_per_trigger (int)
cell_counting (str | None)
mesh_center (str | None)
sub_wedge_size (int)
disable_processing (bool)
inverse_beam (bool)
space_group (str)
cellA (float)
cellB (float)
cellC (float)
cellAlpha (float)
cellBeta (float)
cellGamma (float)
helical (bool)
mesh (bool)
wedges (list[DataCollectionNodeModel])
swNumImages (int)
extra_data (Any)
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'str_strip_whitespace': True, 'use_enum_values': True, 'validate_assignment': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class mxcubecore.queuelib.models.QueueNodeModel(*, type: str = '', queueID: int = -1, checked: bool = False, state: int = 0)[source]¶
Bases:
BaseModel- model_config: ClassVar[ConfigDict] = {'extra': 'forbid'}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class mxcubecore.queuelib.models.SampleNode(*, type: str = '', queueID: int = -1, checked: bool = False, state: int | None = None, sampleID: str, limsID: int | None = None, code: str | None = None, location: str, cell_no: int = 0, puck_no: int = 1, sampleName: str, proteinAcronym: str | None = '', defaultPrefix: str | None = '', defaultSubDir: str | None = '', tasks: list[DataCollectionNodeModel | CharacterisationNodeModel | XRFNodeModel | EnergyScanNodeModel | WorkflowNodeModel | GenericTaskNodeModel], crystalUUID: str | None = None, image_url: str = '', image_x: str | None = None, image_y: str | None = None, loadable: bool = True, puck_barcode: str | None = None, puck_type: str | None = None, sample_barcode: str = '', sc_state: str = '', containerCode: str | None = None, crystalSpaceGroup: str | None = None, cellA: float | None = None, cellB: float | None = None, cellC: float | None = None, cellAlpha: float | None = None, cellBeta: float | None = None, cellGamma: float | None = None)[source]¶
Bases:
QueueNodeModel- Parameters:
type (str)
queueID (int)
checked (bool)
state (int | None)
sampleID (str)
limsID (int | None)
code (str | None)
location (str)
cell_no (int)
puck_no (int)
sampleName (str)
proteinAcronym (str | None)
defaultPrefix (str | None)
defaultSubDir (str | None)
tasks (list[DataCollectionNodeModel | CharacterisationNodeModel | XRFNodeModel | EnergyScanNodeModel | WorkflowNodeModel | GenericTaskNodeModel])
crystalUUID (str | None)
image_url (str)
image_x (str | None)
image_y (str | None)
loadable (bool)
puck_barcode (str | None)
puck_type (str | None)
sample_barcode (str)
sc_state (str)
containerCode (str | None)
crystalSpaceGroup (str | None)
cellA (float | None)
cellB (float | None)
cellC (float | None)
cellAlpha (float | None)
cellBeta (float | None)
cellGamma (float | None)
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid'}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class mxcubecore.queuelib.models.TaskDataPathModel(*, shape: str | int = '', directory: str = '', process_directory: str = '', xds_dir: str = '', base_prefix: str = '', mad_prefix: str = '', reference_image_prefix: str = '', wedge_prefix: str = '', run_number: int = 0, suffix: str = '', precision: int = 0, start_num: int = 0, num_files: int = 0, compression: bool = False, path: str = '', prefix: str = '', fileName: str | None = '', fullPath: str | None = '', subdir: str = '')[source]¶
Bases:
BaseModel- Parameters:
directory (str)
process_directory (str)
xds_dir (str)
base_prefix (str)
mad_prefix (str)
reference_image_prefix (str)
wedge_prefix (str)
run_number (int)
suffix (str)
precision (int)
start_num (int)
num_files (int)
compression (bool)
path (str)
prefix (str)
fileName (str | None)
fullPath (str | None)
subdir (str)
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'str_strip_whitespace': True, 'use_enum_values': True, 'validate_assignment': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class mxcubecore.queuelib.models.TaskNodeModel(*, type: str = '', queueID: int = -1, checked: bool = False, state: int = 0, label: str = '', sampleID: str, sampleQueueID: int | None = None, taskIndex: int | None = None, diffractionPlan: list[DataCollectionNodeModel] | None = None, diffractionPlanID: int | None = None, isDiffractionPlan: bool = False, name: str | None = None)[source]¶
Bases:
QueueNodeModel- Parameters:
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid'}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class mxcubecore.queuelib.models.WorkflowNodeModel(*, type: str = '', queueID: int = -1, checked: bool = False, state: int = 0, label: str = '', sampleID: str, sampleQueueID: int | None = None, taskIndex: int | None = None, diffractionPlan: list[DataCollectionNodeModel] | None = None, diffractionPlanID: int | None = None, isDiffractionPlan: bool = False, name: str | None = None, parameters: WorkflowParameters)[source]¶
Bases:
TaskNodeModel- Parameters:
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid'}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class mxcubecore.queuelib.models.WorkflowParameters(*, shape: str | int = '', directory: str = '', process_directory: str = '', xds_dir: str = '', base_prefix: str = '', mad_prefix: str = '', reference_image_prefix: str = '', wedge_prefix: str = '', run_number: int = 0, suffix: str = '', precision: int = 0, start_num: int = 0, num_files: int = 0, compression: bool = False, path: str = '', prefix: str = '', fileName: str | None = '', fullPath: str | None = '', subdir: str = '', beam_size: str | None = None, cell_count: int | None = None, doc: str = '', label: str = '', name: str | None = None, numCols: int = 0, numRows: int = 0, requires: list[str] = [], type: str = '', wfname: str = '', wfpath: str = '')[source]¶
Bases:
TaskDataPathModel- Parameters:
directory (str)
process_directory (str)
xds_dir (str)
base_prefix (str)
mad_prefix (str)
reference_image_prefix (str)
wedge_prefix (str)
run_number (int)
suffix (str)
precision (int)
start_num (int)
num_files (int)
compression (bool)
path (str)
prefix (str)
fileName (str | None)
fullPath (str | None)
subdir (str)
beam_size (str | None)
cell_count (int | None)
doc (str)
label (str)
name (str | None)
numCols (int)
numRows (int)
type (str)
wfname (str)
wfpath (str)
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'str_strip_whitespace': True, 'use_enum_values': True, 'validate_assignment': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class mxcubecore.queuelib.models.XRFNodeModel(*, type: str = '', queueID: int = -1, checked: bool = False, state: int = 0, label: str = '', sampleID: str, sampleQueueID: int | None = None, taskIndex: int | None = None, diffractionPlan: list[DataCollectionNodeModel] | None = None, diffractionPlanID: int | None = None, isDiffractionPlan: bool = False, name: str | None = None, parameters: XRFParameters)[source]¶
Bases:
TaskNodeModel- Parameters:
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid'}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class mxcubecore.queuelib.models.XRFParameters(*, shape: str | int = '', directory: str = '', process_directory: str = '', xds_dir: str = '', base_prefix: str = '', mad_prefix: str = '', reference_image_prefix: str = '', wedge_prefix: str = '', run_number: int = 0, suffix: str = '', precision: int = 0, start_num: int = 0, num_files: int = 0, compression: bool = False, path: str = '', prefix: str = '', fileName: str | None = '', fullPath: str | None = '', subdir: str = '', countTime: float = 0, exp_time: float = 0)[source]¶
Bases:
TaskDataPathModel- Parameters:
directory (str)
process_directory (str)
xds_dir (str)
base_prefix (str)
mad_prefix (str)
reference_image_prefix (str)
wedge_prefix (str)
run_number (int)
suffix (str)
precision (int)
start_num (int)
num_files (int)
compression (bool)
path (str)
prefix (str)
fileName (str | None)
fullPath (str | None)
subdir (str)
countTime (float)
exp_time (float)
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'str_strip_whitespace': True, 'use_enum_values': True, 'validate_assignment': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- mxcubecore.queuelib.models.validate_model_tolerant(model_cls, data)[source]¶
Validate <data> against <model_cls>, tolerating unknown fields.
Unknown/extra fields (model_config extra=”forbid”) are logged as a warning and dropped rather than failing the request; any other validation error (missing or invalid field) is re-raised as-is.