mxcubecore.HardwareObjects.Gphl.GphlMessages#

Abstract beamline interface message classes

License:

This file is part of MXCuBE.

MXCuBE is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

MXCuBE is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with MXCuBE. If not, see <https://www.gnu.org/licenses/>.

Classes

AnomalousScatterer(element, edge)

BcsDetectorSetting(resolution[, id_, orgxy])

Detector position setting with additional (beamline-side) resolution and orgxy

BeamSetting(wavelength[, id_])

Beam setting

BeamlineAbort()

Abort workflow from beamline

BeamstopSetting([id_])

Beamstop position setting

CentringDone(status, timestamp, ...)

Centering-done message

ChooseLattice(indexingSolutions[, ...])

Choose lattice instruction

CollectionDone(proposalId, status[, ...])

Collection Done message

CollectionProposal(relativeImageDir, ...[, id_])

Collection proposal

ConfigurationData(location)

Configuration Data message

DetectorSetting([id_])

Detector position setting

GeometricStrategy(isUserModifiable, ...[, ...])

Geometric strategy

GoniostatRotation([id_])

Goniostat Rotation setting

GoniostatSweepSetting(scanAxis[, id_])

Goniostat Sweep setting

GoniostatTranslation([rotation, ...])

Goniostat Translation setting

IdentifiedElement([id_])

Object with persistent uuid

IndexingSolution(bravaisLattice, cell[, ...])

Indexing solution data

Issue(...)

MessageData()

Topmost superclass for all message data objects

ObtainPriorInformation()

Prior information request

ParsedMessage(message_type, payload, ...)

Payload()

Payload - top level message object

PhasingWavelength(wavelength[, role, id_])

Phasing Wavelength

PositionerSetting([id_])

Positioner Setting object.

PrepareForCentring()

Prior information request

PriorInformation(data_model, image_root)

Prior information to workflow calculation

ReadyForCentring()

Prior information request

RequestCentring(currentSettingNo, ...)

Request for centering

RequestConfiguration()

Configuration request message

SampleCentred(data_model)

Scan(width, exposure, imageStartNum, start, ...)

Collection strategy Scan

ScanExposure(time, transmission[, id_])

Scan Exposure

ScanWidth(imageWidth, numImages[, id_])

Scan Width

SelectedLattice(data_model, solution)

Lattice selected message

SubprocessStarted(name)

Subprocess Started message

SubprocessStopped()

Subprocess Stopped request message

Sweep(goniostatSweepSetting, ...[, ...])

Geometric strategy Sweep

UnitCell(a, b, c, alpha, beta, gamma)

Unit cell data type

UserProvidedInfo(data_model)

User-provided information

WorkflowAborted([issues])

WorkflowCompleted([issues])

WorkflowDone([issues])

End-of-workflow message

WorkflowFailed([reason, issues])

class mxcubecore.HardwareObjects.Gphl.GphlMessages.AnomalousScatterer(element, edge)[source]#

Bases: MessageData

class mxcubecore.HardwareObjects.Gphl.GphlMessages.BcsDetectorSetting(resolution, id_=None, orgxy=(), **axisSettings)[source]#

Bases: DetectorSetting

Detector position setting with additional (beamline-side) resolution and orgxy

property orgxy#

Tuple, empty or of two floats; beam centre on detector

property resolution#

Resolution (in A) matching detector distance

class mxcubecore.HardwareObjects.Gphl.GphlMessages.BeamSetting(wavelength, id_=None)[source]#

Bases: IdentifiedElement

Beam setting

property wavelength#

Wavelength setting for beam

class mxcubecore.HardwareObjects.Gphl.GphlMessages.BeamlineAbort[source]#

Bases: Payload

Abort workflow from beamline

class mxcubecore.HardwareObjects.Gphl.GphlMessages.BeamstopSetting(id_=None, **axisSettings)[source]#

Bases: PositionerSetting

Beamstop position setting

class mxcubecore.HardwareObjects.Gphl.GphlMessages.CentringDone(status, timestamp, goniostatTranslation)[source]#

Bases: Payload

Centering-done message

property timestamp#

Time in seconds since the epoch (Jan 1, 1970), as returned by time.time()

class mxcubecore.HardwareObjects.Gphl.GphlMessages.ChooseLattice(indexingSolutions, indexingFormat='IDXREF', indexingHeader=None, priorCrystalClasses=(), priorSpaceGroup=None, priorSpaceGroupString=None, userProvidedCell=None)[source]#

Bases: Payload

Choose lattice instruction

property indexingFormat#

Indexing format

property indexingHeader#

Indexing header

property indexingSolutions#

List of IndexingSolution

property priorCrystalClasses#

tuple of crystal class names

property priorSpaceGroup#

space group number

property priorSpaceGroupString#

space group name

property userProvidedCell#

User provided unit cell

class mxcubecore.HardwareObjects.Gphl.GphlMessages.CollectionDone(proposalId, status, procWithLatticeParams=False, imageRoot=None, scanIdMap=None, centrings=None)[source]#

Bases: MessageData

Collection Done message

property centrings#

set(GoniostatTranslation)

New GoniostatTranslations acquired during acquisition

property imageRoot#

Url for directory containing images. Generally an absolute file path.

property procWithLatticeParams#

Boolean, whether lattice parameters should be used for processing

property proposalId#

uuid of collection proposal that has been executed.

property scanIdMap#

GoniostatTranslation.id_

Type:

Dict[str,str] scan.id_

property status#

Integer status code for collection result

class mxcubecore.HardwareObjects.Gphl.GphlMessages.CollectionProposal(relativeImageDir, strategy, scans, id_=None)[source]#

Bases: IdentifiedElement, Payload

Collection proposal

class mxcubecore.HardwareObjects.Gphl.GphlMessages.ConfigurationData(location)[source]#

Bases: Payload

Configuration Data message

property location#

Url for directory containing configuration data. Generally an absolute file path.

class mxcubecore.HardwareObjects.Gphl.GphlMessages.DetectorSetting(id_=None, **axisSettings)[source]#

Bases: PositionerSetting

Detector position setting

class mxcubecore.HardwareObjects.Gphl.GphlMessages.GeometricStrategy(isUserModifiable, defaultDetectorSetting, defaultBeamSetting, allowedWidths=(), sweepOffset=None, sweepRepeat=None, defaultWidthIdx=None, sweeps=(), id_=None)[source]#

Bases: IdentifiedElement, Payload

Geometric strategy

get_ordered_sweeps()[source]#

Get sweeps in acquisition order.

Acquisition order is determined by the sweepGroup - to get results deterministic we use a secondary sort on angles, in alphabetical name order as a backup, (in pracite, ‘kappa’, ‘kappa_phi’, ‘phi’) which should match what the workflow does internally. Anyway, it is the sweep

class mxcubecore.HardwareObjects.Gphl.GphlMessages.GoniostatRotation(id_=None, **axisSettings)[source]#

Bases: PositionerSetting

Goniostat Rotation setting

get_motor_settings()[source]#

Get dictionary of rotation and translation motor setting

property translation#

GoniostatTranslation corresponding to self

NB This link can be set only by GoniostatTranslation.__init__

class mxcubecore.HardwareObjects.Gphl.GphlMessages.GoniostatSweepSetting(scanAxis, id_=None, **axisSettings)[source]#

Bases: GoniostatRotation

Goniostat Sweep setting

property scanAxis#

Scanning axis

class mxcubecore.HardwareObjects.Gphl.GphlMessages.GoniostatTranslation(rotation=None, requestedRotationId=None, id_=None, **axisSettings)[source]#

Bases: PositionerSetting

Goniostat Translation setting

NB the reverse GoniostatRotation.translation link is set from here. For this reason the constructor parameters are different from the object attributes. rotation is taken to be newRotation, except that:

if ( rotation is not None and

(requestedRotationId is None or requestedRotationId == rotation.id_):

self.requestedRotationId = rotation.id_ self.newRotation = None

class mxcubecore.HardwareObjects.Gphl.GphlMessages.IdentifiedElement(id_=None)[source]#

Bases: MessageData

Object with persistent uuid

property id_#

Unique identifier (UUID) for IdentifiedElement. Defaults to new, time-based uuid

class mxcubecore.HardwareObjects.Gphl.GphlMessages.IndexingSolution(bravaisLattice, cell, isConsistent=None, latticeCharacter=None, qualityOfFit=None)[source]#

Bases: MessageData

Indexing solution data

property bravaisLattice#

One of the 14 Bravais lattices (‘aP’ etc.)

property cell#

Unit ce;;

property isConsistent#

Is solution consistent with know symmetry?

property latticeCharacter#

Integer 1-44

class mxcubecore.HardwareObjects.Gphl.GphlMessages.Issue(status information returned with WorkflowDone messages)[source]#

Bases: IdentifiedElement

property code#

Part of unique identifier of issue definition

property component#

Part of unique identifier of issue definition

property message#

Text providing specific details about this issue

class mxcubecore.HardwareObjects.Gphl.GphlMessages.MessageData[source]#

Bases: object

Topmost superclass for all message data objects

Later to add e.g. stringification

class mxcubecore.HardwareObjects.Gphl.GphlMessages.ObtainPriorInformation[source]#

Bases: Payload

Prior information request

class mxcubecore.HardwareObjects.Gphl.GphlMessages.ParsedMessage(message_type, payload, enactment_id, correlation_id)#

Bases: tuple

correlation_id#

Alias for field number 3

enactment_id#

Alias for field number 2

message_type#

Alias for field number 0

payload#

Alias for field number 1

class mxcubecore.HardwareObjects.Gphl.GphlMessages.Payload[source]#

Bases: MessageData

Payload - top level message object

property intent#

Message intent - class-level property

class mxcubecore.HardwareObjects.Gphl.GphlMessages.PhasingWavelength(wavelength, role=None, id_=None)[source]#

Bases: IdentifiedElement

Phasing Wavelength

property role#

Wavelength role

property wavelength#

Wavelength setting for beam

class mxcubecore.HardwareObjects.Gphl.GphlMessages.PositionerSetting(id_=None, **axisSettings)[source]#

Bases: IdentifiedElement

Positioner Setting object.

Has a uuid and a settings dictionary of axisName:value

property axisSettings#

value settings dictionary. NB the returned value is a copy; modifying it does not modify the object internals.

Type:

axisName

class mxcubecore.HardwareObjects.Gphl.GphlMessages.PrepareForCentring[source]#

Bases: Payload

Prior information request

class mxcubecore.HardwareObjects.Gphl.GphlMessages.PriorInformation(data_model, image_root)[source]#

Bases: Payload

Prior information to workflow calculation

class mxcubecore.HardwareObjects.Gphl.GphlMessages.ReadyForCentring[source]#

Bases: Payload

Prior information request

class mxcubecore.HardwareObjects.Gphl.GphlMessages.RequestCentring(currentSettingNo, totalRotations, goniostatRotation)[source]#

Bases: Payload

Request for centering

class mxcubecore.HardwareObjects.Gphl.GphlMessages.RequestConfiguration[source]#

Bases: Payload

Configuration request message

class mxcubecore.HardwareObjects.Gphl.GphlMessages.SampleCentred(data_model)[source]#

Bases: Payload

class mxcubecore.HardwareObjects.Gphl.GphlMessages.Scan(width, exposure, imageStartNum, start, sweep, filenameParams, id_=None)[source]#

Bases: IdentifiedElement

Collection strategy Scan

class mxcubecore.HardwareObjects.Gphl.GphlMessages.ScanExposure(time, transmission, id_=None)[source]#

Bases: IdentifiedElement

Scan Exposure

property time#

Scan exposure transmission

property transmission#

Scan exposure transmission

class mxcubecore.HardwareObjects.Gphl.GphlMessages.ScanWidth(imageWidth, numImages, id_=None)[source]#

Bases: IdentifiedElement

Scan Width

property imageWidth#

Scan image width

property numImages#

Number of images

class mxcubecore.HardwareObjects.Gphl.GphlMessages.SelectedLattice(data_model, solution)[source]#

Bases: MessageData

Lattice selected message

property solution#

Proposed solution

property strategyControl#

JSON string of command line options (without prefix) to use for stratcal wrapper call

property strategyDetectorSetting#

Detector setting to use for strategy calculation and acquisition

property strategyWavelength#

Wavelength to use for strategy calculation adn acquisition

property userCrystalClasses#

Crystal classes given by user

property userSpaceGroup#

Space group (int) given by user

class mxcubecore.HardwareObjects.Gphl.GphlMessages.SubprocessStarted(name)[source]#

Bases: Payload

Subprocess Started message

property name#

name of subprocess

class mxcubecore.HardwareObjects.Gphl.GphlMessages.SubprocessStopped[source]#

Bases: Payload

Subprocess Stopped request message

class mxcubecore.HardwareObjects.Gphl.GphlMessages.Sweep(goniostatSweepSetting, detectorSetting, beamSetting, start, width, beamstopSetting=None, sweepGroup=None, id_=None)[source]#

Bases: IdentifiedElement

Geometric strategy Sweep

get_initial_settings()[source]#

Get dictionary of rotation and translation motor settings for start of sweep

property scans#

Scans that belong to sweeps.

NB this is a two-way link. It is populated when the Scan objects are created

class mxcubecore.HardwareObjects.Gphl.GphlMessages.UnitCell(a, b, c, alpha, beta, gamma)[source]#

Bases: MessageData

Unit cell data type

class mxcubecore.HardwareObjects.Gphl.GphlMessages.UserProvidedInfo(data_model)[source]#

Bases: MessageData

User-provided information

class mxcubecore.HardwareObjects.Gphl.GphlMessages.WorkflowAborted(issues=None)[source]#

Bases: WorkflowDone

class mxcubecore.HardwareObjects.Gphl.GphlMessages.WorkflowCompleted(issues=None)[source]#

Bases: WorkflowDone

class mxcubecore.HardwareObjects.Gphl.GphlMessages.WorkflowDone(issues=None)[source]#

Bases: Payload

End-of-workflow message

class mxcubecore.HardwareObjects.Gphl.GphlMessages.WorkflowFailed(reason=None, issues=None)[source]#

Bases: WorkflowDone