Introduction
Welcome to NICE!
You are currently using the Standard NICE Client to interact with the NICE server (which actually runs the instrument).
There may be other, 3rd party, clients/tools for accessing the instrument. Ask your instrument scientist.
This is live, auto-generated, document which contains help for the specific commands available at this instrument.
Future versions will be improved. Check back soon...
Important information:
- You can hit <TAB> at the command line to complete commands, arguments, device names, etc. Use it liberally.
- Type "help" to get a list of all commands. Type "help <command>" to bring up specific command help.
- Type "helpDevice <device>" to get help on a specific device and all its nodes.
- Most interaction with the server happens through nodes, which have values which can be read/written.
For example, the position of a motor is represented as a node as is it's zero. Node facts:
- Nodes are organized into logical groups called devices. They will have names such as motorX.softPosition or motorX.zero
- All nodes can be moved/viewed through the Device Panel. This shows live values from the server at all times.
- Nodes can be moved/set/changed using the "move" command. For convenience, moving a device directly will move its primary node. move motorX will really move motorX.softPosition
- Nodes can be read/displayed using the display command (or the slower read command)
-
Software Problems:
-
If you have minor, issues, or feature suggestions, please submit a bug, using the "Submit Bug" button which
is at the top of most windows.
-
For major issues/problems, which are impeding using the instrument, please call or page the NICE team directly.
Please also submit a bug containing relevant information as this may aid in solving the issue more quickly.
If outside normal hours please consult the contact sheet.
-
For help learning/using the NICE client or server , please contact the instrument scientist for assistance.
-
Contacts:
- Stephen Pheiffer: x4569 (cell: 301-520-0039)
- Natasha Shmunis: x8370
- Chirag Parikh: x8851
- Frank Hess: x8928
- Leonid Meyerovich: x2859
Commands:
Control Commands
Stop
(immediate)
Stops the current command's execution and clears the queue.Usage:
stop
Resume
(immediate)
Resumes the current command's execution and allows the queue to continue to run.Usage:
resume
Pause
(immediate)
Pauses the current command's execution and stops any further progress of the queue, until the system is resumed.Usage:
pause
Data Writer Commands
Writer
(queued)
This command starts and stops writers. Example:
writer start nexus icpUsage:
writer <action> writers [writers ...]
Positional Arguments:
action
(required class nice.api.data.StartStopAction)
Action to take (START, STOP, or RESTART).writers...
(required, multiple optional string)
Writers to take the action on.
LsWriters
(immediate)
This command displays the available and active writers.Usage:
lsWriters
Device Commands
HistoricDisplay
(immediate)
Retrieves and displays last cached historical values (or desired values) for specified nodes at a given time in the past. Tab completion for time will enter current time. Tab completion for nodes is based on the entered time parameter.
Examples:
To show all node values at some point in the past:
historicDisplay 2013-02-27T15:00:00
To show specific node values at some point in the past:
historicDisplay 2013-02-27T15:00:00 nodeX nodeYUsage:
historicDisplay <time> [nodes ...] --regexp <string> --all --counter --desiredValue --devices --timeStamps
Positional Arguments:
time
(required string)
The time at which you wish to know the node's value. This must be in ISO8601 format, for example: 2013-03-05T15:31:16 .nodes...
(optional string)
The can be used to simply give a list of devices/nodes which you want to display.
Keyword Arguments:
--regexp
-rAll nodes whose id match the specified regular expression will be read.
Flags:
--all
-aRead every visible node in the device model.--counter
-cRead nodes of main counter device.--desiredValue
-tRead the "desired value" of nodes, rather than their "current value".--devices
-dRead the primary node of every device.--timeStamps
-sIf this flag is present, the output will show the time at which the node's value last changed.
TerminateCount
(immediate)
Terminates the current count (if any) early, however does not stop the current trajectory/queue from prossesing futher commands. Cannot be used during findpeakUsage:
terminateCount
Add
(queued)
Adds one or more devices or device groups to the system. We recommend you do this through the Add/Remove devices panel. The configuration for each device/group is stored in a separate file.
Example:
add lakeshore340Usage:
add deviceConfigNames [deviceConfigNames ...] --sim <boolean>
Positional Arguments:
deviceConfigNames...
(required, multiple optional string)
Name of config file describing environment device to be added.
Keyword Arguments:
--sim
-s'Override the default and adds a simulated/real version of device.
Move
(queued)
This moves/sets/drives one or more devices/nodes to new positions. Moving a device will move its primary node (in the case of motors this will be its position). All movements take place in default units unless those units are explicitly specified. Examples:
move sampleTheta 25
move sampleTheta.zero 10
move slitAperature 10mm
move sampleTheta 25 sampleTwoTheta 50
The system automatically orchestrates multiple related moves so they happen in a logical manner. Example:
move Ei 12.2 H 2 K 3 L 4
Will move motors to achieve the requested HKL position at the given energy.Usage:
move args [args ...] --relative
Positional Arguments:
args...
(required, multiple optional object)
A series of node names and destinations to move to: <nodeID> <value> <nodeID> <value> ...
Flags:
--relative
-rMoves are made relative to the current position.
Read
(immediate)
Reads the value of the specified node/nodes. This will directly poll hardware as necesssary unless the --passive flag is used. Examples:
read detectorAngle
read -r zero (displays all zeros)Usage:
read [nodes ...] --regexp <string> --all --counter --desiredValue --devices --long --passive --timeStamps
Positional Arguments:
nodes...
(optional string)
read A1 A2
Keyword Arguments:
--regexp
-rAll nodes whose id match the specified regular expression will be read.
Flags:
--all
-aRead every visible node in the device model.--counter
-cRead nodes of main counter device.--desiredValue
-tRead the "desired value" of nodes, rather than their "current value".--devices
-dRead the primary node of every device.--long
-lDo not truncate long output lines (such as arrays with a large number of elements).--passive
-pDon't perform new hardware polls to update status values, just read the currently cached value.--timeStamps
-sShow timestamps associated with values.
Ct
(queued)
Performs a count and writes the result to the console. The counter can be set to count against time, monitor, a region of interest on a detectpr OR any combination of these criteria. When using multiple criteria, the count will end when ANY of the criteria is met NOT when all criteria are met. When counting against multiple criteria and/or ROI, the system may over count (you ask for 10000 monitor counts or 20 seconds, but you end with 10027 monitor counts and 18.2 seconds), but it will never undercount and guarantees that electronic gating is used for collected data.
Note:
to use ROI you must set an appropriate ROI mask on the detector you are interested in. The ROI mask represents a per pixel weight across an entire logical detector. This can be set by moving themask directly through a script to an arbitrary configuration (example move("areaDetector.roiMask",[1,1,0.95,...]) OR by using a convenience command at the console to set it to a common shape.
Example:
ct -t 5 -r 20000 -d areaDetector
This will count until 5 seconds pass OR the accumulated region of interest sum across the area detector exceeds 20000.Usage:
ct [timeOrMonitor] --detector <string> --monitor <integer> --roi <double> --time <double> --errorOnRundown
Positional Arguments:
timeOrMonitor
(optional double)
A simple, ICP like, way to specify counting against monitor or time. A positive number counts against monitor, a negative number counts against time.
Keyword Arguments:
--detector
-dThe name of the logical detector whose region of interest should be used (only applicable if using the --roi option)--monitor
-mMonitor count at which counting should terminate.--roi
ROI value at which counting should terminate.--time
-tTime in seconds after which counting should terminate.
Flags:
--errorOnRundown
Watch the monitor channel during count, and abort with a special error if the monitor count rate drops below 1 count per second for a significant period.
MoveI
(immediate)
Special purpose move. This allows you to move motors, in the middle of trajectory, when paused, for the purposes of accessing equipment (refilling helium). Usage:
1. Pause system
2. Read position of motors you wish to move
3. Move motors to allow access to equipment
4. Do necessary work
5. Move motors back
6. Resume
This will NOT attempt to move motors back for you. This MUST be done manually.Usage:
moveI args [args ...] --relative
Positional Arguments:
args...
(required, multiple optional object)
A series of argument pairs. The first argument of each pair is a node ID. The second argument of each pair is the new value for the node.
Flags:
--relative
-rAdd the specified value to the node's current value, instead of replacing the node's current value.
SetNodeProperties
(queued)
Changes the properties of a node (user units, precision, etc).Usage:
setNodeProperties <nodeName> --adminLocked <boolean> --precision <double> --stored <boolean> --units <string> --userLocked <boolean>
Positional Arguments:
nodeName
(required string)
The name of the node whose properties should be changed.
Keyword Arguments:
--adminLocked
-a"Admin locked" nodes behave the same as user locked nodes, but this property can only be set by admin. THIS IS NOT IMPLEMENTED YET!--precision
-pThe precision with which to display the value of the node (in the node's units). This is NOT significant figures, but will affect the number of significant figures displayed.--stored
-s"Stored" nodes are recorded to data files.--units
-uThe units, in which the node is displayed/controlled--userLocked
-l"User locked" nodes will not move when commanded directly or indirectly, inside or outside of a trajectory. However, the operation will otherwise succeed (with a warning) and continue normally.
SetMotorPosition
(queued)
Convenience command to change a motor's softPosition by adjusting the zero.Usage:
setMotorPosition <motorID> <newSoftPosition>
Positional Arguments:
motorID
(required string)
The device ID for the motor whose zero you wish to adjust.newSoftPosition
(required string)
The desired soft position for the motor. The motor's zero will be adjusted to make its current soft position equal to the target soft position.
GetNodeProperties
(immediate)
List various properties associated with one or more nodes.Usage:
getNodeProperties [nodes ...] --regexp <string>
Positional Arguments:
nodes...
(optional string)
The node ids whose properties you wish to obtain.
Keyword Arguments:
--regexp
-rRead properties of all nodes whose id matches the specified regular expression.
Display
(immediate)
An alias for the read command, except it doesn't poll hardware by default (shows cached values). It also defaults to showing all nodes if no options or arguments are provided.
Example:
display xdevice ydeviceUsage:
display [nodes ...] --regexp <string> --all --counter --desiredValue --devices --long --timeStamps
Positional Arguments:
nodes...
(optional string)
The can be used to simply give a list of devices/nodes which you want to display.
Keyword Arguments:
--regexp
-rAll nodes whose id match the specified regular expression will be read.
Flags:
--all
-aRead every visible node in the device model.--counter
-cRead nodes of main counter device.--desiredValue
-tRead the "desired value" of nodes, rather than their "current value".--devices
-dRead the primary node of every device.--long
-lDo not truncate long output lines (such as arrays with a large number of elements).--timeStamps
-sShow timestamps associated with values.
MoveToCurrent
(queued)
Special purpose move. Moves specified nodes to their current value if they are outside tolerance.This ensures that desired and current values are in sync for the special virtual devices where this important.Usage:
moveToCurrent [nodeIDs ...] --autoSync
Positional Arguments:
nodeIDs...
(optional string)
The node ids which should be moved to their current value.
Flags:
--autoSync
-aSelect all nodes whose "writeOnSync" property is"true".
InitMotorPosition
(queued)
Resets the motor's raw position in hardware, without moving the motor.Raw position refers to the lowest level position information available to NICE. This is often "steps", but depending on hardware, may also be in higher level units such as degrees.Usage:
initMotorPosition <deviceName> <rawPositionString>
Positional Arguments:
deviceName
(required string)
The name of the device whose current position has to be set.rawPositionString
(required string)
New current position for the motor
Remove
(queued)
This command removes environment devices from the system.Usage:
remove args [args ...]
Positional Arguments:
args...
(required, multiple optional string)
One or more ID strings specifying the environment devices to be removed.
Find Peak Commands
MoveToFit
(queued)
Moves the device scanned in the last peak scan to the most recently calculated fit position (unless the fit was flagged as bad). Example:
findpeak motorX ...
moveToFit
refit ...
moveToFit
Usage:
moveToFit --ignoreScanDomain --useBadFit
Flags:
--ignoreScanDomain
Forces movement to fit position, even if the fit was bad.--useBadFit
Forces movement to fit position, even if the fit was bad.
FindPeakMulti
(queued)
findPeakMulti is similar to findPeak, however it allows multiple nodes to be moved
simultaneously during the scan. This command performs a peak scan,
reports a fit and can optionally re-zero a scanned motor.
The data from a peak scan can be re-fit using the refit command. The uncertainties reported for fit
parameters do not take into account any systematic fit errors. The uncertainties are solely based
on the variances expected from fitting the given function to Poisson distributed data points.
Examples:
findPeakMulti motorA motorB --center [2, 1.5] --range [10, 5] --numPoints 10 --roi 2000 --detectorName areaDetector --dataOfInterest monitor --fit Quadratic --moveToFit --reZero
-
Will scan "motorA" around the center position 2 with a range of 10, and "motorB" around the
center position 1.5 with a range of 5 for 10 points. At each point it will count until the
areaDetector's region of interest exceeeds 2000, but will fit the monitor counts to a quadratic
function. When finished, it will automatically move "motorA" to the
fitted position and correct the zero for "motorA".
Available fit functions (default is GaussianPlusBackground):
Cosine
Fits a cosine function, with a valley at center and which is entirely positive. It assumes that no more than 4 cycles appear in the scanned range and no less than 1/4 cycle. Functional Form: y = amplitude * cos(2 * pi * (x - center) / wavelength - pi) + amplitude + offsetParams:
- center
- amplitude
- wavelength
- offset
Echo
Echo function. Functional form: y = Av-Amp*exp(-(x-center)^2/(2*width^2))*cos((x-center)/period)Params:
- Av
- Amp
- center
- width
- period
GaussianFindCenter
A gaussian, which fits the 5 points surrounding the highest point. This is specifically designed to accurately find the center of the peak at the expense of properly determining other quanities such as height and dev.
Functional Form: y = height * e ^ ((x - center) ^ 2 ) / (2 * dev ^ 2))Params:
- center
- height
- dev
GaussianPlusBackground
A Gaussian with a constant background.
Functional Form: y = height * e ^ ((x - center) ^ 2 ) / (2 * dev ^ 2)) + backgroundParams:
- center
- height
- dev
- background
GaussianPlusLinear
A Gaussian with a linear background.
Functional Form: y = height * e ^ ((x - center) ^ 2 ) / (2 * dev ^ 2)) + slope * (x - center) + backgroundParams:
- center
- height
- dev
- background
- slope
LineXIntercept
A straight line, with offset parametrized as x-intercept. The "fit position" is taken to be the x-intercept. Functional form: y = slope * (x - xIntercept)Params:
- slope
- xIntercept
Quadratic
A parabola. Functional form: y = a * (x - center) ^ 2 + cParams:
- a
- center
- c
Usage:
findPeakMulti scanNodeIDs [scanNodeIDs ...] --centers <list> --channel <integer> --data <string> --detector <string> --finals <list> --fit <string> --initials <list> --monitor <integer> --numPoints <integer> --prefactor <integer> --ranges <list> --reZeroPosition <string> --roi <double> --stepSizes <list> --time <double> --tolerance <string> --ignoreScanDomain --moveToFit --reZero --useBadFit
Positional Arguments:
scanNodeIDs...
(required, multiple optional string)
The ids of the node(s) to scan. The first node in the list will be used to determine the x-axis for peak fitting. The first node is also the node affected by command options like --reZero and --moveToFit. For some devices (such as power supplies), the current value for the quantity being scanned is read back on a different node (called the "domain node".
Keyword Arguments:
--centers
-cAn array specifying the centers of the peak scan for each of the scanned nodes. A center is an alternate way to specify the initial and/or final position for a scanned node, via the relation "center = (initial + final)/2". If a range is explicitly specified (but not the center, initial, or final) then center is defaulted to the current position. Array elements may be set to NaN, in which case they will be ignored.--channel
If the node specified with the "--data" option is of list type (such as an area detector), this option must be used to specify the index of the list element you are interested in. Defaults to zero.--data
The node id for the data to fit against. It may be a list node (such as an array of count channels) or a single-valued node (like the monitor node). If the node is a list node, you must also use the "--channel" option to specify the index of the list element you are interested in. The default is the last value specified by a run of either the findPeak or rapidScan command.--detector
-dLogical counter name when counting against ROI.--finals
-fAn array specifying the final positions for each of the scanned nodes. If the stepSize is explicitly specified for a scanned node, the final position may be rounded to an achievable position consistent with the stepSize and other parameters. Array elements may be set to NaN, in which case they will be ignored.--fit
The function to fit against. The default is GaussianPlusBackground.--initials
-iAn array specifying the initial positions for each of the scanned nodes. If a stepSize is explicitly specified for a scanned node, then the initial position may be rounded to an achievable position consistent with the stepSize and other parameters. Array elements may be set to NaN, in which case they will be ignored.--monitor
-mHow many monitor counts to count for at each point.--numPoints
-nThe number of points in the scan. Defaults to 11--prefactor
-pNot available yet!--ranges
-rAn array specifying the ranges of the peak scan for each of the scanned nodes. A range gives the total distance to scan a node, defined by the relation "range = end - start". Negative ranges are allowed, and correspond to an end position less than the start position. Array elements may be set to NaN, in which case they will be ignored. --reZeroPosition
-xMotors ONLY! Same as reZero except that the motor’s zero is changed such that "fit position" is redefined to the specified value.--roi
How many ROI counts to count for at each point.--stepSizes
-sAn array specifying the magnitude of the difference in position of each scanned node for successive points in the scan. The step sizes are always positive, even if the scan is moving in the negative direction. Array elements may be set to NaN, in which case they will be ignored.--time
-tThe number of seconds to count for at each point. Defaults to 1.0.if neither monitor or ROI is specified.--tolerance
--tolMotors ONLY! When re-zeroing, do not change the zero if the "fit position" is within tolerance of the specified re-zero position.
Flags:
--ignoreScanDomain
If the move to fit option is used, this flag will remove the safety which prevents the move to fit from going outside the scan domain.--moveToFit
-vCauses the first scanned node to move to the fit position when the scan finishes, rather than back to its original position.--reZero
-zMotors ONLY! When the scan finishes it will produce a "fit position". For example, if the fitFunction is Gaussian, the "fit position" will be the center. If this flag is present, the zero on the first scanned motor will be changed such that the "fit position" is redefined to the center of the scanned region. If the difference between "fit position" and the center of the scanned region is less than tolerance, then no re-zeroing will occur.--useBadFit
If the rezero or move to fit options are used, this flag will cause the check for bad fits to be skipped (a bad fit will otherwise prevent a rezero or move to fit from being performed).
TerminateFindPeak
(immediate)
Causes the current findpeak (if any) to stop once it finishes the current operation. It will then attempt to perform a fit with the available data.Usage:
terminateFindPeak
FindPeak
(queued)
Performs a peak scan, reports a fit and can optionally re-zero a scanned motor.
The data from a peak scan can be re-fit using the refit command. The uncertainties reported for fit
parameters do not take into account any systematic fit errors. The uncertainties are solely based
on the variances expected from fitting the given function to Poisson distributed data points.
For efficiency you can provide a range, step-size and count as positional arguments to perform
a centered scan around the current position. Otherwise, you must use the keyword arguments to specify your scan.
Examples:
findpeak motor --center 2 --range 10 --numPoints 10 --roi 2000 --detectorName areaDetector --dataOfInterest monitor --fit Quadratic --moveToFit --reZero
- Will scan "motor" around the center position 2 with a range of 10 for 10 points. At each point it will count until the areaDetector's
region of interest exceeeds 2000, but will fit the monitor counts to a quadratic function. When finished, it will automatically move to the
fitted position and correct motor's zero.
findpeak sampleAngle 5 1 -1
- Will scan a with a range of 5 and step size of 1 around the current position of sampleAngle, counting for 1 second at each point.
If you need to do a peak scan while against multiple motors simultaneously, use findPeakMulti.
Available fit functions (default is GaussianPlusBackground):
Cosine
Fits a cosine function, with a valley at center and which is entirely positive. It assumes that no more than 4 cycles appear in the scanned range and no less than 1/4 cycle. Functional Form: y = amplitude * cos(2 * pi * (x - center) / wavelength - pi) + amplitude + offsetParams:
- center
- amplitude
- wavelength
- offset
Echo
Echo function. Functional form: y = Av-Amp*exp(-(x-center)^2/(2*width^2))*cos((x-center)/period)Params:
- Av
- Amp
- center
- width
- period
GaussianFindCenter
A gaussian, which fits the 5 points surrounding the highest point. This is specifically designed to accurately find the center of the peak at the expense of properly determining other quanities such as height and dev.
Functional Form: y = height * e ^ ((x - center) ^ 2 ) / (2 * dev ^ 2))Params:
- center
- height
- dev
GaussianPlusBackground
A Gaussian with a constant background.
Functional Form: y = height * e ^ ((x - center) ^ 2 ) / (2 * dev ^ 2)) + backgroundParams:
- center
- height
- dev
- background
GaussianPlusLinear
A Gaussian with a linear background.
Functional Form: y = height * e ^ ((x - center) ^ 2 ) / (2 * dev ^ 2)) + slope * (x - center) + backgroundParams:
- center
- height
- dev
- background
- slope
LineXIntercept
A straight line, with offset parametrized as x-intercept. The "fit position" is taken to be the x-intercept. Functional form: y = slope * (x - xIntercept)Params:
- slope
- xIntercept
Quadratic
A parabola. Functional form: y = a * (x - center) ^ 2 + cParams:
- a
- center
- c
Usage:
findPeak <nodeName> [quickRange] [quickStepSize] [quickCountAgainst] --center <string> --channel <integer> --data <string> --detector <string> --final <string> --fit <string> --initial <string> --monitor <integer> --numPoints <integer> --prefactor <integer> --range <string> --reZeroPosition <string> --roi <double> --stepSize <string> --time <double> --tolerance <string> --ignoreScanDomain --moveToFit --reZero --useBadFit
Positional Arguments:
nodeName
(required string)
The name of the node to scan. For some devices (such as power supplies), the current value for the quantity being scanned is read back on a different node.quickRange
(optional string)
A positional version of the "range" keyword argument, for fast typing.quickStepSize
(optional string)
A positional version of the "stepSize" keyword argument, for fast typing.quickCountAgainst
(optional double)
A positional way to specify what you want to count against.Positive values count against monitor, negative values count against time.
Keyword Arguments:
--center
-cThe center of the peak scan, this is an alternate way to specify initial and/or final, via the relation "center = (initial + final)/2". If a range is explicitly specified (but not the center, initial, or final) then center is defaulted to the current position.--channel
If the node specified with the "--data" option is of list type (such as an area detector), this option must be used to specify the index of the list element you are interested in. Defaults to zero.--data
The node id for the data to fit against. It may be a list node (such as an array of count channels) or a single-valued node (like the monitor node). If the node is a list node, you must also use the "--channel" option to specify the index of the list element you are interested in. The default is the last value specified by a run of either the findPeak or rapidScan command.--detector
-dLogical counter name when counting against ROI.--final
-fSpecifies the final position of the peak scan. If the stepSize is explicitly specified, the final position may be rounded to an achievable position consistent with the stepSize and other parameters.--fit
The function to fit against. The default is GaussianPlusBackground.--initial
-iSpecifies the initial position of the peak scan. If the stepSize is explicitly specified, then the initial position may be rounded to an achievable position consistent with the stepSize and other parameters. --monitor
-mHow many monitor counts to count for at each point.--numPoints
-nThe number of points in the scan. Defaults to 11--prefactor
-pNot available yet!--range
-rThe total distance to scan the device, defined by the relation "range = end - start". Negative ranges are allowed, and correspond to an end position less than the start position.--reZeroPosition
-xMotors ONLY! Same as reZero except that the motor’s zero is changed such that "fit position" is redefined to the specified value.--roi
How many ROI counts to count for at each point.--stepSize
-sSpecifies the magnitude of the difference in position of successive points in the scan. The stepSize is always positive, even if the scan is moving in the negative direction.--time
-tThe number of seconds to count for at each point. Defaults to 1.0.if neither monitor or ROI is specified.--tolerance
--tolMotors ONLY! When re-zeroing, do not change the zero if the "fit position" is within tolerance of the specified re-zero position.
Flags:
--ignoreScanDomain
If the move to fit option is used, this flag will remove the safety which prevents the move to fit from going outside the scan domain.--moveToFit
-vCauses the device to move to the fit position when the scan finishes, rather than back to its original position.--reZero
-zMotors ONLY! When the scan finishes it will produce a "fit position". For example, if the fitFunction is Gaussian, the "fit position" will be the center. If this flag is present, the zero on the scanned motor will be changed such that the "fit position" is redefined to the center of the scanned region. If the difference between "fit position" and the center of the scanned region is less than tolerance, then no re-zeroing will occur.--useBadFit
If the rezero or move to fit options are used, this flag will cause the check for bad fits to be skipped (a bad fit will otherwise prevent a rezero or move to fit from being performed).
RapidScan
(queued)
Moves a motor, while simultaneously counting. The motor's position and the counter's count are rapidly polled to give a crude histogram of count rate at each motor position. This is faster, but less accurate than findPeak, because it does not stop the motor or start/stop the counter for each point (data is not suitible for publication).The motor position is NOT restored to its original location after the scan completes, but rather left where the scan ended.Usage:
rapidScan <nodeName> --channel <integer> --data <string> --final <string> --initial <string> --time <double> --allowReverse
Positional Arguments:
nodeName
(required string)
The name of the node to scan. Should be a motor position, or something that directly corresponds to a single motor. A virtual device that moves multiple motors will generally not work, since when the virtual device is moved, the motors will generally will not be at positions consistent with a good virtual device value until they have all completed moving.
Keyword Arguments:
--channel
If the node specified with the "--data" option is of list type (such as an area detector), this option must be used to specify the index of the list element you are interested in. Defaults to zero.--data
The node id for the count data which will be used to calculate the count rate while scanning. May be a list node (such as an array of count channels) or a single-valued node (like the monitor node). If the node is a list node, you must also use the channelOfInterest option to specify the index of the list element you are interested in. Defaults to the last value specified by a run of either this command or the findPeak command.--final
-fMust be used to explicitly define interval and direction to scan in terms of initial/final. If the "--allowReverse" flag is set, the command may choose to scan in the reverse direction (from final to initial) if it is faster.--initial
-iMust be used to explicitly define interval and direction to scan in terms of initial/final. If the "--allowReverse" flag is set, the command may choose to scan in the reverse direction (from final to initial) if it is faster.--time
-tThe minimum number of seconds between generation of data points. Defaults to 0.5.
Flags:
--allowReverse
-aIf the "--allowReverse" flag is set, the command may choose to scan in the reverse direction (from final to initial) if it is faster.
Rezero
(queued)
Changes the zero of the motor scanned during the last peak scan such that the "fit position" is redefined to the specified "re-zero position". If no argument is provided, the re-zero position defaults to the center of the last peak scan. If the difference between "fit position" and the "re-zero position" is less than the specified tolerance, then zero will not be changed.Usage:
rezero [reZeroPosition ...] --tolerance <string> --useBadFit
Positional Arguments:
reZeroPosition...
(optional string)
Motors ONLY! Same as reZero except that the motor’s zero is changed such that "fit position" is redefined to the specified value.
Keyword Arguments:
--tolerance
--tolMotors ONLY! When re-zeroing, do not change the zero if the "fit position" is within tolerance of the specified re-zero position.
Flags:
--useBadFit
Forces rezeroing, even if the fit was bad.
Refit
(queued)
Re-fits the data collected during the findPeak command. Unspecified fitting options are left at whatever value they had during the last fit.
Usage:
refit --channel <integer> --data <string> --fit <string> --fixedParameters <map> --initialParameters <map> --lowerBounds <map> --maxIterations <integer> --upperBounds <map>
Keyword Arguments:
--channel
If the node specified with the "--data" option is of list type (such as an area detector), this option must be used to specify the index of the list element you are interested in. Defaults to zero.--data
The node id for the data to fit against. It may be a list node (such as an array of count channels) or a single-valued node (like the monitor node). If the node is a list node, you must also use the "--channel" option to specify the index of the list element you are interested in. The default is the last value specified by a run of either the findPeak or rapidScan command.--fit
The function to fit against.--fixedParameters
Map of fit parameters to corresponding values which should be held fixed during fitting.--initialParameters
Map of fit parameters to corresponding initial values to start fitting from.--lowerBounds
Map of fit parameters to their lower limits during fitting.--maxIterations
The maximum number of iterations to allow during the fitting process.--upperBounds
Map of fit parameters to their upper limits during fitting.
Fp
(queued)
This is an alias to the findpeak commandAvailable fit functions (default is GaussianPlusBackground):
Cosine
Fits a cosine function, with a valley at center and which is entirely positive. It assumes that no more than 4 cycles appear in the scanned range and no less than 1/4 cycle. Functional Form: y = amplitude * cos(2 * pi * (x - center) / wavelength - pi) + amplitude + offsetParams:
- center
- amplitude
- wavelength
- offset
Echo
Echo function. Functional form: y = Av-Amp*exp(-(x-center)^2/(2*width^2))*cos((x-center)/period)Params:
- Av
- Amp
- center
- width
- period
GaussianFindCenter
A gaussian, which fits the 5 points surrounding the highest point. This is specifically designed to accurately find the center of the peak at the expense of properly determining other quanities such as height and dev.
Functional Form: y = height * e ^ ((x - center) ^ 2 ) / (2 * dev ^ 2))Params:
- center
- height
- dev
GaussianPlusBackground
A Gaussian with a constant background.
Functional Form: y = height * e ^ ((x - center) ^ 2 ) / (2 * dev ^ 2)) + backgroundParams:
- center
- height
- dev
- background
GaussianPlusLinear
A Gaussian with a linear background.
Functional Form: y = height * e ^ ((x - center) ^ 2 ) / (2 * dev ^ 2)) + slope * (x - center) + backgroundParams:
- center
- height
- dev
- background
- slope
LineXIntercept
A straight line, with offset parametrized as x-intercept. The "fit position" is taken to be the x-intercept. Functional form: y = slope * (x - xIntercept)Params:
- slope
- xIntercept
Quadratic
A parabola. Functional form: y = a * (x - center) ^ 2 + cParams:
- a
- center
- c
Usage:
fp <nodeName> [quickRange] [quickStepSize] [quickCountAgainst] --center <string> --channel <integer> --data <string> --detector <string> --final <string> --fit <string> --initial <string> --monitor <integer> --numPoints <integer> --prefactor <integer> --range <string> --reZeroPosition <string> --roi <double> --stepSize <string> --time <double> --tolerance <string> --ignoreScanDomain --moveToFit --reZero --useBadFit
Positional Arguments:
nodeName
(required string)
The name of the node to scan. For some devices (such as power supplies), the current value for the quantity being scanned is read back on a different node.quickRange
(optional string)
A positional version of the "range" keyword argument, for fast typing.quickStepSize
(optional string)
A positional version of the "stepSize" keyword argument, for fast typing.quickCountAgainst
(optional double)
A positional way to specify what you want to count against.Positive values count against monitor, negative values count against time.
Keyword Arguments:
--center
-cThe center of the peak scan, this is an alternate way to specify initial and/or final, via the relation "center = (initial + final)/2". If a range is explicitly specified (but not the center, initial, or final) then center is defaulted to the current position.--channel
If the node specified with the "--data" option is of list type (such as an area detector), this option must be used to specify the index of the list element you are interested in. Defaults to zero.--data
The node id for the data to fit against. It may be a list node (such as an array of count channels) or a single-valued node (like the monitor node). If the node is a list node, you must also use the "--channel" option to specify the index of the list element you are interested in. The default is the last value specified by a run of either the findPeak or rapidScan command.--detector
-dLogical counter name when counting against ROI.--final
-fSpecifies the final position of the peak scan. If the stepSize is explicitly specified, the final position may be rounded to an achievable position consistent with the stepSize and other parameters.--fit
The function to fit against. The default is GaussianPlusBackground.--initial
-iSpecifies the initial position of the peak scan. If the stepSize is explicitly specified, then the initial position may be rounded to an achievable position consistent with the stepSize and other parameters. --monitor
-mHow many monitor counts to count for at each point.--numPoints
-nThe number of points in the scan. Defaults to 11--prefactor
-pNot available yet!--range
-rThe total distance to scan the device, defined by the relation "range = end - start". Negative ranges are allowed, and correspond to an end position less than the start position.--reZeroPosition
-xMotors ONLY! Same as reZero except that the motor’s zero is changed such that "fit position" is redefined to the specified value.--roi
How many ROI counts to count for at each point.--stepSize
-sSpecifies the magnitude of the difference in position of successive points in the scan. The stepSize is always positive, even if the scan is moving in the negative direction.--time
-tThe number of seconds to count for at each point. Defaults to 1.0.if neither monitor or ROI is specified.--tolerance
--tolMotors ONLY! When re-zeroing, do not change the zero if the "fit position" is within tolerance of the specified re-zero position.
Flags:
--ignoreScanDomain
If the move to fit option is used, this flag will remove the safety which prevents the move to fit from going outside the scan domain.--moveToFit
-vCauses the device to move to the fit position when the scan finishes, rather than back to its original position.--reZero
-zMotors ONLY! When the scan finishes it will produce a "fit position". For example, if the fitFunction is Gaussian, the "fit position" will be the center. If this flag is present, the zero on the scanned motor will be changed such that the "fit position" is redefined to the center of the scanned region. If the difference between "fit position" and the center of the scanned region is less than tolerance, then no re-zeroing will occur.--useBadFit
If the rezero or move to fit options are used, this flag will cause the check for bad fits to be skipped (a bad fit will otherwise prevent a rezero or move to fit from being performed).
ICP Transition Commands
Miscelaneous Commands
Polarized Beam Commands
RegisterHe3Cell
(queued)
Adds an entry into current experiment's polarization.log file indicating name of the He-3 cell, when it was added, and the polarization device it was added to.Usage:
registerHe3Cell <cellName> <polarizationName>
Positional Arguments:
cellName
(required string)
Pre-determined name given by the He-3 teampolarizationName
(required string)
Name of the polarization device that is already present on the system.
FlipRatio
(queued)
Perform a flipping ratio command on instruments with polarization.Usage:
flipRatio <polarizationName> --dataOfInterest <string> --detector <string> --monitor <integer> --roi <double> --time <double>
Positional Arguments:
polarizationName
(required string)
Keyword Arguments:
--dataOfInterest
-oSpecify logical detector whose counts are to be used in calculation. Monitor counts will be used by default.--detector
-dLogical counter name when counting against ROI.--monitor
-mMonitor count at which counting should terminate.--roi
ROI value at which counting should terminate.--time
-tTime in seconds after which counting should terminate.
Measure
(queued)
The command will perform a count, compute the rate on the specified detectorOfInterest and then assign that value to the specified working value node and log the transaction to the polarized beam log.Usage:
measure <measurementType> --detector <string> --monitor <integer> --roi <double> --time <double>
Positional Arguments:
measurementType
(required class nice.api.data.PolarizationMeasurementType)
Keyword Arguments:
--detector
-dLogical counter name when counting against ROI.--monitor
-mMonitor count at which counting should terminate.--roi
ROI value at which counting should terminate.--time
-tTime in seconds after which counting should terminate.
Simulated Instrument Commands (for testing only)
Time Estimation Commands
DryRunSequence
(immediate)
Dry runs a sequence, producing a time estimate. By default this looks under the current experiment's sequence directory. You can also look under /common, for instrument scientist defined sequences.
Example:
dryrunsequence sequence.txtUsage:
dryRunSequence <filePath>
Positional Arguments:
filePath
(required string)
DryRunTrajectory
(immediate)
Runs the trajectory in the given fileBy default this looks under the current experiment's trajectory directory. You can also look under /common, for instrument scientist defined trajectories.
Example:
runtrajectory /common/trajectories/trajblah.jsonUsage:
dryRunTrajectory <filePath> --postInit <list> --silent
Positional Arguments:
filePath
(required string)
Keyword Arguments:
--postInit
-pThis allows you to customize template trajectories by setting post init arguments.
Flags:
--silent
-ssilent mode - don't write 'DryRun Results:...' on console.
EstimateMotorMotion
(queued)
This command may be used to view and update various estimates describing a motors motion, such as the motor's velocity or acceleration. These estimates are used to make time estimates on how long motor moves will take to complete.Usage:
estimateMotorMotion <motorDeviceID> --setAcceleration <string> --setDeceleration <string> --setOverhead <string> --setVelocity <string>
Positional Arguments:
motorDeviceID
(required string)
The device ID for the motor you wish to set/get time estimate parameters for.
Keyword Arguments:
--setAcceleration
-aSets the softPosition acceleration which will be used to estimate time for the motor's moves. If no unit is specified, the default is "softUnit" per second squared where "softUnit" is the user unit for the motor's softPosition node.--setDeceleration
-dSets the softPosition deceleration which will be used to estimate time for the motor's moves. If no unit is specified, the default is "softUnit" per second squared where "softUnit" is the user unit for the motor's softPosition node.--setOverhead
-oSets the fixed time overhead which will be added to the time estimate for each motor move. If no unit is specified, the default is seconds.--setVelocity
-vSets the softPosition velocity which will be used to estimate time for the motor's moves. If no unit is specified, the default is "softUnit" per second where "softUnit" is the user unit for the motor's softPosition node.
EstimateMonitorRate
(queued)
Updates the cached monitor rate by performing a "ct" command. The cached monitor rate is used to make time estimates on how long counts against monitor will take to complete.Usage:
estimateMonitorRate --setRate <double> --time <double> --noCount
Keyword Arguments:
--setRate
-sIf the setRate option is used, the cached monitor rate will simply be set to the provided value. This option implies the "noCount" option.--time
-tTime in seconds after which counting should terminate.
Flags:
--noCount
-nIf the noCount flag is present, no count will be performed to estimate the monitor rate. The cached monitor rate will still be printed to the console.