Generic device classes using hardware-specific attached devices.
NICOS axis classes.
Bases: nicos.abstract.Axis
Bases: Axis
Axis implemented in Python, with NICOS devices for motor and coders.
Attached devices
Parameters
Amount of position jitter allowed. Default value: 0.0. Unit: same as device value.
Motor speed. Default value: 0.0. Unit: main/s.
Parameters inherited from the base classes: abslimits, backlash, description, dragerror, fixed, fmtstr, loglevel, loopdelay, lowlevel, maxage, maxtries, offset, pollinterval, precision, target, unit, userlimits
Cache reader/writer devices.
Bases: nicos.core.device.Readable
Bases: Readable
A readable device that gets values exclusively via cache.
This is useful for devices that cannot be usefully integrated into NICOS, but that can be coerced to write their current value into the NICOS cache. NICOS will then rely on the cache to supply current values for the device; if there is no such value in the cache, a CommunicationError will be raised. The status is likewise read from the cache; if none is present, status.UNKNOWN is returned.
Devices must write into the cache under the keys nicos/devname/value and nicos/devname/status, where devname is the NICOS device name configured in the setup.
Parameters inherited from the base classes: description, fmtstr, loglevel, lowlevel, maxage, pollinterval, unit
Bases: nicos.core.device.HasLimits, nicos.core.device.Moveable
A moveable device that writes values via the cache.
This is the equivalent to CacheReader for moveable devices. The device is expected to itself subscribe to cache updates relating to its subkeys, and deliver value updates via the cache as well.
This class will write setpoint changes into the cache under the key nicos/devname/setkey, where devname is the NICOS device name, and setkey is given by the device parameter.
Parameters
Sleep time when waiting. Default value: 1.0. Unit: s.
Subkey to use to set the device value. Default value: 'setpoint'.
Timeout for checking stabilization. Default value: 900.0. Unit: s.
Size of the stabilization window. Default value: 1.0. Unit: same as device value.
Time window for checking stabilization (zero for no stabilization check). Default value: 0.0. Unit: s.
Parameters inherited from the base classes: abslimits, description, fixed, fmtstr, loglevel, lowlevel, maxage, pollinterval, target, unit, userlimits
“Manual” moveable devices, to keep track of manual instrument changes.
Bases: nicos.core.device.HasLimits, nicos.core.device.Moveable
A representation of a manually moveable continuous device.
This device does nothing but record the latest position you moved to. This is useful for instrument parameters that have to be changed manually, but you still want to record them in data files, status monitor etc.
Parameters
Default value when freshly initialized. Default value: 0.0.
Parameters inherited from the base classes: abslimits, description, fixed, fmtstr, loglevel, lowlevel, maxage, pollinterval, target, unit, userlimits
Bases: nicos.core.device.Moveable
Bases: Moveable
A representation of a manually changeable device.
This is akin to the ManualMove device, but for instrument parameters that take only discrete values.
If the states parameter is not empty, it represents a list of all allowed values of the device. If it is empty, all values are allowed.
Parameters
List of allowed states.
Parameters inherited from the base classes: description, fixed, fmtstr, loglevel, lowlevel, maxage, pollinterval, target, unit
NICOS slit device.
Bases: nicos.generic.slit.SlitAxis
Bases: SlitAxis
Attached devices
Parameters inherited from the base classes: description, fixed, fmtstr, loglevel, lowlevel, maxage, pollinterval, target, unit
Bases: nicos.generic.slit.SlitAxis
Bases: SlitAxis
Attached devices
Parameters inherited from the base classes: description, fixed, fmtstr, loglevel, lowlevel, maxage, pollinterval, target, unit
Bases: nicos.generic.slit.SlitAxis
Bases: SlitAxis
Attached devices
Parameters inherited from the base classes: description, fixed, fmtstr, loglevel, lowlevel, maxage, pollinterval, target, unit
Bases: nicos.core.device.Moveable
Bases: Moveable
A rectangular slit consisting of four blades.
The slit can operate in four “opmodes”, controlled by the opmode parameter:
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:
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 blade. Type: HasPrecision.
Left blade. Type: HasPrecision.
Right blade. Type: HasPrecision.
Top blade. Type: HasPrecision.
Parameters
Coordinate convention for left/right and top/bottom blades. Default value: 'equal'.
Mode of operation for the slit. Default value: '4blades'.
Parameters inherited from the base classes: description, fixed, fmtstr, loglevel, lowlevel, maxage, pollinterval, target, unit
Bases: nicos.core.device.Moveable, nicos.core.device.AutoDevice
Bases: Moveable, AutoDevice
“Partial” devices for slit axes, useful for e.g. scanning over the device slit.centerx.
Attached devices
Parameters inherited from the base classes: description, fixed, fmtstr, loglevel, lowlevel, maxage, pollinterval, target, unit
Bases: nicos.generic.slit.SlitAxis
Bases: SlitAxis
Attached devices
Parameters inherited from the base classes: description, fixed, fmtstr, loglevel, lowlevel, maxage, pollinterval, target, unit
NICOS “switcher” device.
Bases: nicos.core.device.Readable
Bases: Readable
Same as the Switcher, but for read-only underlying devices.
Attached devices
Parameters
Precision for comparison. Default value: 0.
List of state names.
List of values to move to.
Parameters inherited from the base classes: description, fmtstr, loglevel, lowlevel, maxage, pollinterval, unit
Bases: nicos.core.device.Moveable
Bases: Moveable
The switcher is a device that maps switch states onto discrete values of a continuously moveable device.
This is useful if you have for example a motor that only every moves to certain discrete positions, e.g. a monochromator changer. Then you can control it using
move(changer_switch, 'up')
move(changer_switch, 'down')
instead of moving the axis to positions hard to understand:
move(changer, 14.55)
move(changer, 51.3)
and still have the underlying continuously moveable device available for debugging purposes.
Attached devices
Parameters
Precision for comparison.
List of state names.
List of values to move to.
Parameters inherited from the base classes: description, fixed, fmtstr, loglevel, lowlevel, maxage, pollinterval, target, unit
System-related device classes for NICOS.
Bases: nicos.core.device.Readable
Bases: Readable
This is a readable device that returns the free space on a filesystem.
It is useful to record this in the cache, for example to enable warnings about low free space before data files cannot be saved anymore.
The device status is OK until free space is below the value set by the minfree parameter.
Parameters
Minimum free space for “ok” status. Default value: 5. Unit: GiB.
The path to the filesystem mount point (or None to check the experiment data directory. Default value: None.
Parameters inherited from the base classes: description, fmtstr, loglevel, lowlevel, maxage, pollinterval, unit
Virtual devices for testing.
Bases: nicos.abstract.Coder, nicos.core.device.HasOffset
A virtual coder that just returns the value of a motor, with offset.
Attached devices
Parameters inherited from the base classes: description, fmtstr, loglevel, lowlevel, maxage, offset, pollinterval, precision, unit
Bases: nicos.taco.detector.FRMCounterChannel
Bases: FRMCounterChannel
A virtual counter channel for use together with nicos.taco.Detector.
Parameters
The maximum countrate. Default value: 1000.
(not used). Default value: None.
Parameters inherited from the base classes: description, fmtstr, ismaster, loglevel, lowlevel, maxage, mode, pollinterval, preselection, tacodelay, tacotimeout, tacotries, type, unit
Bases: nicos.abstract.Motor, nicos.core.device.HasOffset
A virtual motor that can be set to move in finite time using a thread.
Parameters
Current status. Default value: (100, 'idle').
Current value. Default value: 0.0.
Jitter of the read value. Default value: 0.
Virtual speed of the device. Default value: 0.0.
Parameters inherited from the base classes: abslimits, description, fixed, fmtstr, loglevel, lowlevel, maxage, offset, pollinterval, precision, target, unit, userlimits
Bases: nicos.taco.detector.FRMTimerChannel
Bases: FRMTimerChannel
A virtual timer channel for use together with nicos.taco.Detector.
Parameters
(not used). Default value: None.
Parameters inherited from the base classes: description, fmtstr, ismaster, loglevel, lowlevel, maxage, mode, pollinterval, preselection, tacodelay, tacotimeout, tacotries, unit