}

Index

Spectrograph:

Guider/Slitviewer and Slit Controller:

Spectrograph Setup/Status Commands

initialize

Initializes the ICC state machine and synchronizes it with the array controller.  If the command detects that a DSP timing file has not been loaded, the a load of the default DSP file will occur, setting the controller to the array power off condition

Response - 4 keyword updates reflecting the current controller configuration:
dspload="filename" - filename of currently loaded timing file or "?" if the ICC has not loaded a timing file yet.
arrayPower="on/off/?" - where the response is "?" if the power state has not been set by the ICC yet.
exposureState="state",t-total,t-remaining where state during this command should be either "done" or "aborted"
exposureMode="fowler",nfowler - camera is in fowler sampling mode with nfowler array reads

arrayPower

Keywords:
state="on/off"
Non-optional state string indicates whether to power up/down the controller.
Response:
arrayPower=string
String = "on", "off" or "?" - ? is only sent during status updates if this command has not been executed during the life of this ICC.

mode

Currrently only fowler mode is supported.  SUTR may be implemented later. Keywords:
fowler=n
sutr=n
These keywords are mutually exclusive since they toggle the operational mode of the instrument. In both cases n is an integer setting the number of reads for that mode. In fowler n reads at start and end of exposure, and for SUTR n total reads.
Response:
exposureMode="fowler/sutr",n

status

Keywords:
no keywords are recognized.  This command results in a full dump of all information available to the hub
Response:
A dump of the following spectrograph state machine status responses. Links indicate previously defined responses:
dspload
powerState
exposureMode
exposureState
exposureModeInfo="fowler",n-min,n-max
minimum/maximum allowable number of reads for the two exposure modes
dspFiles="file1","file2","file3",.... A listing of the available dsp files for the array
vacuumThreshold(Torr),vacuumLimits(Torr),vacuumInterval(S),vacuum(Torr),vacuumAlarm(0|1)
tempNames(Strings),tempInterval(S),tempMin(K),tempMax(K),tempThreshold(K),temps(K),tempAlarms(0|1)

camStatus

Keywords: None - dump a status subset of the exposureState and exposureMode information

ping

Keywords: None.  This is a utility command used to verify the presence of the ICC.
Response:
codeID="versionNumber" - returns the version ID of the currently running ICC

help

Keywords: None.  
Response: produces a multiline listing of available commands with a short description of keywords.

Spectrograph Expose Command

expose

Keywords:
  • "object,flat,dark,sky,calib" - simple keyword expressing exposure type, kept in IMAGETYP fits header keyword
  • time=ss.ss - floating point exposure time in seconds.  This keyword must exist or the command will fail.
  • basename or filename=string - fully qualified name of output fits file
  • subframing.  If using filename=string above, subframing commands become available.  They are as follows:
    • window=llx,urx,lly,ury - specifiy the window directly.  0 indexed. Will override offset/size keywords
    • offset=llx,lly - specifiy lower left corner, 0 indexed combined with size keyword to specify window.
    • size=dx,dy - combined with offset, sets window corners
    • bin=n | nx,xy - bin the pixels by n.  Option with 2 values to separately specify x,y binning values.
Response:
exposureState="state",time,time-remaining
state is one of: reading,integrating,processing,done,aborting,aborted
time is a double value indicating estimated time for completion of this state
time-remaining is a double value expressing remaining time in this task.
if exposureState is returned as done, and the command failed, the response will be preceeded by an informational response with the error message associated with the failure.

abort

Abort commanding is a variant of the expose command.  Including a keyword abort as an option to the expose command will abort any currently running exposures.  The abort will result in an "aborting" exposureState keyword indicating the expected duration before the abort is finished and the instrument is prepared for another exposure.  The instrument can be considered ready for another exposure when a persistent "aborted" exposureState keyword is seen.

bsub

Keywords:
state="on/off" - indicate whether to do background subtraction.  If "on" the last collected frame will be used for background subtraction.  Consecutive "on" state commands can be sent, and will simply update the background frame as indicated.
Response:
isBSub="true/false" - simple readback of exposure background subtract control variable.
bSubBase="fileBase" - root name associated with the file currently registered for use in background subtraction.  No path or extension information is included.  For example bSubBase="t0001"

Spectrograph TipTilt Commands

ttMode

Keywords:
mode="mode" where mode is one of - offline,openLoop,closedLoop
Response:
ttmode="mode" where modes are listed above with the addition of "off" if the server determines the controller is unpowered. Off will be the error response if one of the other modes is specified but the controller is powered down.

ttPosition

Keywords:
newposition=x,y - positions are specified in floating point pixels
Response:
ttPosition=x,y,xcommanded,ycommanded - all positions are floating point pixels, NaN's if not in a position mode or if positions are not available from the controller (e.g. off).

ttStatus

Keywords: None
Response: Several responses with previously defined responses indicated by links:
ttmode
ttPosition
ttLimits=xmin,xmax,ymin,ymax

Instrument Housekeeping Commands

temps

Keywords: None
Response:
temps=t1,t2,t3,t4,t5,t6,t7,t8,t9,t10
Temperatures are reported as a vector in floating point degrees Kelvin

tempReportInterval

Keywords:
interval=time
set the automatic reporting interval of tspec temperatures to the interval time in seconds. A value of 0.0 turns off automated reporting of temperatures and temperature alarms
Response:
tempInterval=time

tempStatus

Keywords: None
Response: A series of keyword reponses is generated, all temperatures are in Kelvins. Links indicate previously defined responses:
tempNames=name1,name2,....
tempInterval
temps
tempAlarms=a1,a2,a3,.... Integer boolean value indicating alarm states. 0=ok,1=alarm
An alarm is triggered when the temperature passes a threshold (see tempThresholds next). The alarm will continue to be asserted until the temperature goes within bounds by some hysteresis value.
tempThresholds=t1,t2,t3...
Threshold for each sensor for raising an alarm.
If > 0 then a temperature above this value raises an alarm.
If < 0 then a temperature below this limit raise an alarm.
If NaN then there is no alarm for this temerature.
Values of 0 are undefined and should not appear.
tempMin=t1,t2.... Expected minimum values. Not used for alarms but possibly useful for plotting.
tmpMax=t1,t2,t3... Expected maximum values. Not used for alarms but possibly useful for plotting.

vacuum

Keywords: None
Response:
vacuum=vacuum - current vacuum in floating point Torr - NaN for no data

vacuumReportInterval

Keywords:
interval=time. Same as temperature time interval

vacuumStatus

Keywords: None
Response: A series of keyword responses is generated. All vacuums are in Torr. Links indicate previously defined responses:
vacuum
vacuumInterval
vacuumAlarm=alarmState - integer boolean 0=ok,1=alarm
An alarm is triggered when the vacuum exceeds the threshold (see vacuumThreshold next). The alarm will continue to be asserted until the vacuum goes within bounds by some hysteresis value.

vacuumThreshold=value - Vacuums exceeding this value generate an alarm.
vacuumLimits=1E-09,760.00 - Expected minimum and maximum vacuum; not used for alarms but possibly useful for graphing.

Guider/Slitviewer and Slit Controller

Commands associated with the Guider/slitviewer ICC for TripleSpec at APO

Guider Setup Commands

initialize

Same as Spectrograph initialize command

arrayPower

Same as Spectrograph arrayPower command

mode

Same as spectrograph mode command

bsub

Same as Spectrograph bsub command

status

Keywords: None
Response: a series of messages with the following keys:

ping

Keywords: None.  same as Spectrograph ping command

help

Print out a brief help summary of available commands


Guider Exposure Commands

expose

Keywords:
exptime=ss.ss - floating point exposure time in seconds.  This key must be included or command will fail.
filename="filename" -fully qualified fits file name to place data in.  This key must also be present.  
windowing and binning are identical to the Spectrograph expose command.
Response:
exposureState="state",time,time-remaining
state is one of "reading,integrating,processing,done"
time is estimated time for this sub-task, not for the entire sequence. 0.0 indicates inconsequential.
time-remaining is time left as of the generation of this message

bsub

See description under the spectrograph bsub command.

Slit Control Commands 

startApp

Keywords: NoneStarts the monitor program which handles digital and analog I/O in the leach utility card.  This must be sent after power cycling the controller or slit control will not function.

utilStatus

Keywords: None.  Will return the status of the digital inputs and outputs on the utility card:
Response:
utilInput=n -  Current digital I/O input.  Only 3 bits are used.  Bits 0,1 are the motor rotation sense switch NO/NC outputs respectively, Bit 2 is the motor driver over temperature sense line (active low).  Normal motor rest position should produce a value of 5.
utilOutput=n  - current digital I/O output.  Only lower 3 bits are used.  Bit 0 = step clock, Bit 1 = Motor direction, always 0, Bit 2 = Motor Current Enable - active high during stepping, should be low when motor is inactive.  Normal inactive value should readback as a 0.  Other values may indicate that the monitor program is not active.

setSlit

Tell the controller the name of the current slit position

Keywords:
position="slitName"
valid positions are listed given in the slitPositions keyword
Response:
slitPosition=position
position is one of those listed in the slitPositions keyword

gotoSlit

Move to the requested slit

Keywords:
position="slitName"
valid positions are listed in the slitPositions keyword
Response:
slitState="state",time,time-remaining
state is one of "moving,done". In the case of command failure the terminating command response will be followed by a slitPosition message defined in setSlit, giving a best guess as to the current position of the slit substrate. A slitPosition message following a normal command termination indicates the current slit position.

time, and time-remaining are floating point seconds indicating total expected time and time-remaining in the task as of the issuance of the message.

A slitPosition keyword will be emitted as each intermediary position is passed during the move as progress indicator.  In addition a stateX=n keyword will be emitted where n is the number of switch transitions seen during the drive rotation.  Normal values are between 20 and 60.  Numbers of 0 or 1 probably indicate a rotation failure.

slitStatus

Keywords: None
Response: A sequence of the following messages:
slitPosition
slitState
slitPositions
A list of allowed slit names. For example:
"0.7 Slit","0.7 Block","1.1 Slit","1.1 Block","1.5 Slit","1.5 Block","1.7 Slit","1.7 Block""

stopSlit

Keywords: None - Stop slit rotation at the next rotational position.
Response:
slitState="done",slitPosition="Slit Name"