tof.Chopper#

class tof.Chopper(*, frequency, distance, name, phase=None, open=None, close=None, centers=None, widths=None, direction=Direction.CLOCKWISE)[source]#

A chopper is a rotating device with cutouts that blocks the beam at certain times.

Parameters:
  • frequency (Variable) – The frequency of the chopper. Must be positive.

  • distance (Variable) – The distance from the source to the chopper.

  • name (str) – The name of the chopper.

  • phase (Optional[Variable], default: None) – The phase of the chopper. Because the phase offset implemented as a time delay on real beamline choppers, it is applied in the opposite direction to the chopper rotation direction. For example, if the chopper rotates clockwise, a phase of 10 degrees will shift all window angles by 10 degrees in the anticlockwise direction, which will result in the windows opening later.

  • open (Optional[Variable], default: None) – The opening angles of the chopper cutouts.

  • close (Optional[Variable], default: None) – The closing angles of the chopper cutouts.

  • centers (Optional[Variable], default: None) – The centers of the chopper cutouts.

  • widths (Optional[Variable], default: None) – The widths of the chopper cutouts.

Notes

Either open and close or centers and widths must be provided, but not both.

__init__(*, frequency, distance, name, phase=None, open=None, close=None, centers=None, widths=None, direction=Direction.CLOCKWISE)[source]#

Methods

__init__(*, frequency, distance, name[, ...])

as_dict()

open_close_times([time_limit, unit])

The times at which the chopper opens and closes.

Attributes

omega

The angular velocity of the chopper.

property omega: Variable#

The angular velocity of the chopper.

open_close_times(time_limit=None, unit=None)[source]#

The times at which the chopper opens and closes.

Parameters:
  • time_limit (Optional[Variable], default: None) – Determines how many rotations the chopper needs to perform to reach the time limit. If not specified, the chopper will perform a single rotation.

  • unit (Optional[str], default: None) – The unit of the returned times. If not specified, the unit of time_limit is used.

Return type:

tuple[Variable, Variable]