Skip to content

Detector motors

extra.components.AGIPD1MQuadrantMotors ¤

AGIPD1MQuadrantMotors(dc, detector_id=None)

Bases: DetectorMotors

Interface to AGIPD quadrant motors.

Example usage in a Jupyter notebook:

        -----------------------------------------------------------
In [1]: |motors = AGIPD1MQuadrantMotors(run)                      |
        |motors                                                   |
        -----------------------------------------------------------
Out[1]: <AGIPD1MQuadrantMotors(4, 2) for SPB_IRU_AGIPD1M at
        2023-04-04T17:44:46.844869000>

Parameters:

Name Type Description Default
dc DataCollection

The data

required
detector_id str

The detector ID, e.g. SPB_IRU_AGIPD1M or MID_EXP_AGIPD1M

None

Raises:

Type Description
ValueError

If motors are not found or multiple motor groups are found

positions ¤

positions(labelled=True, compressed=False)

Returns the motor positions for all trains.

Parameters:

Name Type Description Default
labelled bool

If True, returns the xarray with labelled dimensions, overwise returns numpy.ndarray

True
compressed bool

If True, returns positions only when they change, overwise positions in all recorded trains

False

Returns:

Name Type Description
positions tuple of two numpy.ndarray or xarray.DataArray

The motor positions

positions_at ¤

positions_at(tid)

Returns motor positions at a given train.

Parameters:

Name Type Description Default
tid int

Train ID

required

Returns:

Name Type Description
postions ndarray

The motor positions

Raises:

Type Description
ValueError

If train is not found

most_frequent_positions ¤

most_frequent_positions()

Returns most frequent motor positions.

extra.components.JF4MHalfMotors ¤

JF4MHalfMotors(dc, detector_id=None)

Bases: DetectorMotors

Interface to Jungfrau 4M half motors.

Example usage in a Jupyter notebook:

        -----------------------------------------------------------
In [1]: |motors = JF4MHalfMotors(run)                             |
        |motors                                                   |
        -----------------------------------------------------------
Out[1]: <JF4MHalfMotors(2, 1)for SPB_IRDA_JF4M at
        2024-08-21T19:38:47.690044000>

Parameters:

Name Type Description Default
dc DataCollection

The data

required
detector_id str

The detector ID, e.g. SPB_IRDA_JF4M

None

Raises:

Type Description
ValueError

If motors are not found or multiple motor groups are found

positions ¤

positions(labelled=True, compressed=False)

Returns the motor positions for all trains.

Parameters:

Name Type Description Default
labelled bool

If True, returns the xarray with labelled dimensions, overwise returns numpy.ndarray

True
compressed bool

If True, returns positions only when they change, overwise positions in all recorded trains

False

Returns:

Name Type Description
positions tuple of two numpy.ndarray or xarray.DataArray

The motor positions

positions_at ¤

positions_at(tid)

Returns motor positions at a given train.

Parameters:

Name Type Description Default
tid int

Train ID

required

Returns:

Name Type Description
postions ndarray

The motor positions

Raises:

Type Description
ValueError

If train is not found

most_frequent_positions ¤

most_frequent_positions()

Returns most frequent motor positions.