The nicos package contains all standard NICOS commands and devices.
Bases: object
Data handling classes for NICOS.
Bases: nicos.data.DatafileSink
Bases: DatafileSink
A data sink that writes to a plain ASCII data file.
The lastfilenumber and lastpoint parameters are managed automatically.
The current file counter is normally stored in a file called “counter” in the data directory. If the globalcounter parameter is nonempty, it gives the name of a global counter file instead, which is always used regardless of data path.
Parameters
Comment character. Default value: '#'.
File name for a global file counter instead of one per datapath. Default value: ''.
The number of the last written data file. Default value: 0.
The number of the last point in the data file. Default value: 0.
Whether to add a semicolon between X and Y values. Default value: True.
Parameters inherited from the base classes: datapath, description, loglevel, lowlevel, scantypes
Bases: nicos.data.DataSink
Bases: DataSink
A DataSink that prints scan data onto the console.
Parameters inherited from the base classes: description, loglevel, lowlevel, scantypes
Bases: nicos.data.DataSink
Bases: DataSink
A DataSink that sends datasets to connected GUI clients for live plotting. Only active for daemon sessions.
Parameters inherited from the base classes: description, loglevel, lowlevel, scantypes
Bases: nicos.core.device.Device
Bases: Device
Base class for all data sinks.
A DataSink is a configurable object that receives scan data. All data handling is done by sinks; e.g. displaying it on the console or saving to a data file.
Parameters
Scan types for which the sink is active. Default value: [].
Parameters inherited from the base classes: description, loglevel, lowlevel
Bases: nicos.data.DataSink, nicos.data.NeedsDatapath
Bases: DataSink, NeedsDatapath
Parameters inherited from the base classes: datapath, description, loglevel, lowlevel, scantypes
Bases: object
Bases: nicos.data.DataSink
Bases: DataSink
A DataSink that plots datasets in the Gnuplot plotting program.
Needs the Gnuplot module. Only active for console sessions.
Parameters
Name of active counter to plot. Default value: None.
Parameters inherited from the base classes: description, loglevel, lowlevel, scantypes
Bases: nicos.data.DataSink
Bases: DataSink
A DataSink that plots datasets in the Grace plotting program.
Needs the GracePlot module. Only active for console sessions.
Parameters
Name of active counter to plot. Default value: None.
Parameters inherited from the base classes: description, loglevel, lowlevel, scantypes
Bases: object
A mixin interface that specifies that a device needs the current datapath.
Parameters
Do not set this, set the datapath on the experiment device. Default value: ['.'].
NICOS Experiment devices.
Bases: nicos.core.device.Device
Bases: Device
A special singleton device to represent the experiment.
This class is normally subclassed for specific instruments to e.g. select the data paths according to instrument standards.
Several parameters configure special behavior:
The experiment singleton is available at runtime as nicos.session.experiment.
User methods
Called by FinishExperiment. Does nothing by default.
Called by NewExperiment.
Attached devices
Parameters
List of paths where data files should be stored. Default value: [''].
Root data path under which all proposal specific paths are created.
List of default detector device names. Default value: [].
True if the electronig logbook should be enabled. Default value: True.
List of default environment device names to read at every scan point. Default value: [].
Local contact for current experiment. Default value: ''.
Current proposal number or proposal string. Default value: ''.
Directory for proposal specific files. Default value: ''.
Current remark about experiment configuration. Default value: ''.
List of messages to remember for next experiment start. Default value: [].
Standard script directory. Default value: ''.
Currently executed scripts. Default value: [].
Experiment title. Default value: ''.
User names and affiliations for the proposal. Default value: [].
Parameters inherited from the base classes: description, loglevel, lowlevel
Bases: nicos.core.device.Device
Bases: Device
A special device to represent a sample.
An instance of this class is used as the sample attached device of the Experiment object. It can be subclassed to add special sample properties, such as lattice and orientation calculations, or more parameters describing the sample.
Parameters
Sample name. Default value: ''.
Parameters inherited from the base classes: description, loglevel, lowlevel
NICOS Instrument device.
Bases: nicos.core.device.Device
Bases: Device
A special singleton device to represent the instrument.
This class can be subclassed for specific instruments to e.g. provide the notion of moving “the instrument” in HKL space, such as in TAS.
The instrument singleton is available at runtime as nicos.session.instrument.
Parameters
Loop delay in checking for counting finished. Default value: 0.025000000000000001.
Instrument name. Default value: ''.
Instrument responsible name and email. Default value: ''.
Parameters inherited from the base classes: description, loglevel, lowlevel
IPC (Institut für Physikalische Chemie, Göttingen) hardware classes.
Bases: nicos.abstract.Coder
Bases: Coder
This class supports both IPC absolute and incremental coder cards.
It can be used with the nicos.generic.Axis class.
Attached devices
Parameters
Bus address of the coder.
Wrap-around value for circular coders, if negative use it as +/-, else as 0..value, None disables this. Default value: None.
Configuration byte of the coder. Default value: 0.
Firmware version. Default value: 0.
Coder slope. Default value: 1.0. Unit: steps/main.
Current coder position in steps. Default value: 0.
Coder steps for physical zero. Default value: 0.0. Unit: steps.
Parameters inherited from the base classes: description, fmtstr, loglevel, lowlevel, maxage, pollinterval, precision, unit
Bases: nicos.core.device.Readable
Bases: Readable
Makes the inhibit of an IPC single stepper card available as an input.
Returns ‘on’ if inhibit is active, ‘off’ otherwise.
Attached devices
Parameters inherited from the base classes: description, fmtstr, loglevel, lowlevel, maxage, pollinterval, unit
Bases: nicos.core.device.Device
Bases: Device
Abstract class for IPC protocol communication over RS-485.
A device of this type is needed as the bus parameter of the other IPC devices.
Concrete implementations are IPCModBusTaco, IPCModBusTCP, IPCModBusSerial.
Parameters inherited from the base classes: description, loglevel, lowlevel
Bases: nicos.ipc.IPCModBusTacoless
Bases: IPCModBusTacoless
IPC protocol communication directly over serial line.
Parameters
Device file name of the serial port to use.
Parameters inherited from the base classes: commtries, description, loglevel, lowlevel, roundtime
Bases: nicos.ipc.IPCModBusTacoless
Bases: IPCModBusTacoless
IPC protocol communication bus over network to serial adapter using TCP connection.
Parameters
Hostname (or IP) of network2serial converter.
TCP Port on network2serial converter. Default value: 4001.
Parameters inherited from the base classes: commtries, description, loglevel, lowlevel, roundtime
Bases: nicos.taco.core.TacoDevice, nicos.ipc.IPCModBus
Bases: TacoDevice, IPCModBus
IPC protocol communication over TACO RS-485 server.
Parameters
Number of tries for sending and receiving. Default value: 3.
Parameters inherited from the base classes: description, loglevel, lowlevel, tacodelay, tacodevice, tacotimeout, tacotries
Bases: nicos.ipc.IPCModBus
Bases: IPCModBus
Base class for IPC connections not using the RS485 TACO server.
This is an abstract class; use one of IPCModBusTCP or IPCModBusSerial.
Parameters
Number of tries for sending and receiving. Default value: 5.
Maximum time to wait for an answer, set this high to slow down everything. Default value: 0.10000000000000001. Unit: s.
Parameters inherited from the base classes: description, loglevel, lowlevel
Bases: nicos.core.device.Moveable
Bases: Moveable
Makes the relay of an IPC single stepper card available as switch.
Attached devices
Parameters inherited from the base classes: description, fixed, fmtstr, loglevel, lowlevel, maxage, pollinterval, target, unit
Bases: nicos.core.device.Readable
Bases: Readable
IPC I/O card digital input class.
Attached devices
Parameters
Bus address of the card.
First bit to read.
Last bit to read.
Parameters inherited from the base classes: description, fmtstr, loglevel, lowlevel, maxage, pollinterval, unit
Bases: nicos.core.errors.ProgrammingError
Bases: ProgrammingError
Error raised for “invalid command” response of IPC cards.
Bases: nicos.abstract.Motor
Bases: Motor
This class supports IPC 6-fold, 3-fold and single motor cards.
It can be used with the nicos.generic.Axis class.
Attached devices
Parameters
Motor acceleration (0..255). Default value: 0.
Bus address of the motor.
Configuration byte. Default value: 0.
Speed divider. Default value: 0.
Firmware version. Default value: 0.
Inhibit input. Default value: 'off'.
Upper motorlimit. Default value: 0. Unit: steps.
Microstepping mode. Default value: 1. Unit: steps.
Lower motorlimit. Default value: 0. Unit: steps.
Internal power stage switch. Default value: 'on'.
Ramp type. Default value: 1.
Relay switch. Default value: 'off'.
Motor slope. Default value: 1.0. Unit: steps/main.
Motor speed (0..255). Default value: 0.
Start delay. Default value: 0.0. Unit: s.
Last position in steps. Default value: 0.
Stop delay. Default value: 0.0. Unit: s.
Waiting timeout. Default value: 360. Unit: s.
Motor unit. Default value: 'steps'.
Motor steps for physical zero. Default value: 0.0. Unit: steps.
Parameters inherited from the base classes: abslimits, description, fixed, fmtstr, loglevel, lowlevel, maxage, pollinterval, precision, target, userlimits
Bases: nicos.ipc.Input, nicos.core.device.Moveable
IPC I/O card digital output class.
Shares parameters and doInit with Input.
Attached devices
Parameters inherited from the base classes: addr, description, first, fixed, fmtstr, last, loglevel, lowlevel, maxage, pollinterval, target, unit
Bases: nicos.abstract.Motor
Bases: Motor
Class for one axis of a IPC 4-wing slit.
Use this together with nicos.generic.Axis and nicos.generic.Slit to create a 4-wing slit device.
Attached devices
Parameters
Bus address of the slit.
Value to move to for reset. Unit: same as device value.
Side of axis.
Motor slope. Default value: 1.0. Unit: steps/mm.
Waiting timeout. Default value: 40. Unit: s.
Axis unit. Default value: 'mm'.
Motor steps for physical zero. Default value: 0. Unit: steps.
Parameters inherited from the base classes: abslimits, description, fixed, fmtstr, loglevel, lowlevel, maxage, pollinterval, precision, speed, target, userlimits
Iseg high voltage power supply device classes.
Bases: nicos.taco.core.TacoDevice, nicos.core.device.HasLimits, nicos.core.device.Moveable
Bases: TacoDevice, HasLimits, Moveable
Device object for an iseg HVPS. The channel parameter must be 1 for a HVS with only one output.
Parameters
Channel of the Iseg HV (1 = A, 2 = B).
Voltage ramp. Default value: 1. Unit: main/s.
Parameters inherited from the base classes: abslimits, description, fixed, fmtstr, loglevel, lowlevel, maxage, pollinterval, tacodelay, tacodevice, tacotimeout, tacotries, target, unit, userlimits
NICOS notification classes.
Bases: nicos.notify.Notifier
Bases: Notifier
Notifier to send Jabber notifications.
Needs the xmpp module.
Parameters
Jabber JID of the notifier.
Password for the given JID.
List of receiver JIDs. Default value: [].
Parameters inherited from the base classes: description, loglevel, lowlevel, minruntime
Bases: nicos.notify.Notifier
Bases: Notifier
E-Mail notification handling.
If a Mailer is configured as a notifier, the receiver addresses (not copies) can be set by SetMailReceivers.
Parameters
Mail copy addresses. Default value: [].
Mail receiver addresses. Default value: [].
Mail sender address.
Subject prefix. Default value: 'NICOS'.
Parameters inherited from the base classes: description, loglevel, lowlevel, minruntime
Bases: nicos.core.device.Device
Bases: Device
Base class for all notification systems.
User methods
Send a notification.
Send a notification if the given runtime is large enough.
Parameters
Minimum runtime of a command before a failure is sent over the notifier. Default value: 300. Unit: s.
Parameters inherited from the base classes: description, loglevel, lowlevel
Bases: nicos.notify.Notifier
Bases: Notifier
SMS notifications via smslink client program.
If a SMSer is configured as a notifier, the receiver addresses (not copies) can be set by SetSMSReceivers.
Parameters
SMS receiver phone numbers. Default value: [].
Name of SMS server.
Body prefix. Default value: 'NICOS'.
Parameters inherited from the base classes: description, loglevel, lowlevel, minruntime
Contains a process that polls devices automatically.
Bases: nicos.core.device.Device
Bases: Device
Parameters
Setups whose devices should always be polled.
True if all master setups should always be polled. Default value: True.
Devices that should never be polled. Default value: [].
Setups that should never be polled, even if in master setup. Default value: [].
Setups that should be polled if in master setup (only used if autosetup is false). Default value: [].
Parameters inherited from the base classes: description, loglevel, lowlevel
Scan classes for NICOS.
Bases: nicos.scan.Scan
Bases: Scan
Special scan class for scans with one axis moving continuously (used for peak search).
Bases: nicos.core.device.Readable
Bases: Readable
Parameters inherited from the base classes: description, fmtstr, loglevel, lowlevel, maxage, pollinterval, unit
Bases: nicos.scan.Scan
Bases: Scan
Special scan class for “manual” scans.
Bases: nicos.scan.Scan
Bases: Scan
Special scan class for scans with a triple axis instrument in Q/E space.
Bases: object
Represents a general scan over some devices with a specified detector.
Handle an error occurring during positioning or readout for a point.
This method can do several things:
Move to where, which is a list of (dev, position) tuples. On errors, call handleError, which decides when the scan may continue.
Move scan devices to position, a list of positions.
Bases: exceptions.Exception
Bases: Exception
Custom exception class to skip a scan point.
Bases: exceptions.Exception
Bases: Exception
Custom exception class to stop the rest of the scan.
Bases: nicos.scan.Scan
Bases: Scan
Special scan class for time scans with elapsed time counter.
Bases: nicos.scan.Scan
Bases: Scan
Special scan class for two-dimensional scans.
NICOS TACO stub implementation, to support running on systems without installed TACO libraries.
If this module is imported, it is assumed that the TACO client libraries already haven’t been found.
Bases: object
Toni-protocol device classes.
Bases: nicos.core.device.Moveable
Bases: Moveable
Toni TOFTOF-type programmable delay box.
Attached devices
Parameters
Bus address of the supply controller.
Parameters inherited from the base classes: description, fixed, fmtstr, loglevel, lowlevel, maxage, pollinterval, target, unit
Bases: nicos.core.device.Moveable
Bases: Moveable
Toni TOFTOF-type low-voltage power supplies.
Attached devices
Parameters
Bus address of the supply controller.
Parameters inherited from the base classes: description, fixed, fmtstr, loglevel, lowlevel, maxage, pollinterval, target, unit
Bases: nicos.core.device.Readable
Bases: Readable
Attached devices
Parameters
Bus address of monitor.
Parameters inherited from the base classes: description, fmtstr, loglevel, lowlevel, maxage, pollinterval, unit
Bases: nicos.taco.core.TacoDevice, nicos.core.device.Device
Bases: TacoDevice, Device
Parameters
Maximum tries before raising. Default value: 5.
Source address of host. Default value: 0.
Parameters inherited from the base classes: description, loglevel, lowlevel, tacodelay, tacodevice, tacotimeout, tacotries
Bases: nicos.core.device.Readable
Bases: Readable
Toni ratemeter inside a “crate”.
Attached devices
Parameters
Bus address of crate.
Parameters inherited from the base classes: description, fmtstr, loglevel, lowlevel, maxage, pollinterval, unit
Bases: nicos.core.device.Readable
Bases: Readable
Toni vacuum gauge ITR90 read out system.
Attached devices
Parameters
Bus address of the valve control.
Channel of the vacuum gauge.
True if the readout is switched on. Default value: 0.
Parameters inherited from the base classes: description, fmtstr, loglevel, lowlevel, maxage, pollinterval, unit
Bases: nicos.core.device.Moveable
Bases: Moveable
Attached devices
Parameters
Bus address of the valve control.
Channel of the valve.
Names for the closed/open states. Default value: ['off', 'on'].
Time to wait after switching. Default value: 4. Unit: s.
Parameters inherited from the base classes: description, fixed, fmtstr, loglevel, lowlevel, maxage, pollinterval, target, unit