Slit class

class nicos.generic.slit.Slit

Bases: Moveable

A rectangular slit consisting of four blades.

The slit can operate in four “opmodes”, controlled by the opmode parameter:

  • ‘4blades’ – all four blades are controlled separately. Values read from the slit are lists in the order [left, right, bottom, top]; for move() the same list of coordinates has to be supplied.
  • ‘centered’ – only width and height are controlled; the slit is centered at the zero value of the left-right and bottom-top coordinates. Values read and written are in the form [width, height].
  • ‘offcentered’ – the center and width/height are controlled. Values read and written are in the form [centerx, centery, width, height].

Normally, the right and left as well as the bottom and top devices need to share a common coordinate system, i.e. when right.read() == left.read() the slit is closed. A different convention can be selected when setting coordinates to "opposite": in this case, the blades meet at coordinate 0, and both move in positive direction when they open.

All instances have attributes controlling single dimensions that can be used as devices, for example in scans. These attributes are:

  • left, right, bottom, top – controlling the blades individually, independent of the opmode
  • centerx, centery, width, height – controlling “logical” coordinates of the slit, independent of the opmode

Example usage:

>>> move(slit.centerx, 5)      # move slit center
>>> scan(slit.width, 0, 1, 6)  # scan over slit width from 0 to 5 mm

Attached devices

bottom

Bottom blade. Type: HasPrecision.

left

Left blade. Type: HasPrecision.

right

Right blade. Type: HasPrecision.

top

Top blade. Type: HasPrecision.

Parameters

coordinates (one of 'equal', 'opposite')

Coordinate convention for left/right and top/bottom blades. Default value: 'equal'.

opmode (one of '4blades', 'centered', 'offcentered', settable at runtime)

Mode of operation for the slit. Default value: '4blades'.

Parameters inherited from the base classes: description, fixed, fmtstr, loglevel, lowlevel, maxage, pollinterval, target, unit

Previous topic

Axis class

Next topic

Switcher classes