Skip to content

Commands

Mike Langmayr edited this page Jul 30, 2024 · 3 revisions

Command Format

In general, commands which require a parameter and value set that parameter to that value. Stating the parameter only, without the value, initiates a query to return the current value, while inclusion of a value implies setting the named parameter to the specified value. Thus, with one exception the "set" and "get" operations are inherent and not sent as separate commands. For example, rather than sending commands like:

set exptime 100 and get exptime

one would instead send only:

exptime 100 and exptime

where the former sets the exposure time to 100 and the latter queries the current exposure time. The exception to this design rule is the getp and setp commands used to get and set Archon parameters, respectively. These commands are used to avoid possible confusion between server commands and what might be an allowable Archon parameter name.

Any command received that is not among this syntax is assumed to be a native controller command and passed directly to the controller. This allows a user to interact directly with the controller. Every effort has been made to avoid mirroring native and server commands, but in the event that is unavoidable then sending the command in upper case should indicate that it is to be a controller-native command. In general, commands are sent as lower case, even native controller commands.

Return Values

Return values are ASCII strings. In general, the response to commands is either DONE (on success) or ERROR (on error). If the command required or requested a value then on success that value is returned first, before the DONE. The command syntax described in Section 4.3 describes in detail what is returned for each command.

Command Syntax

This section describes the syntax recognized by the server, listed in alphabetical order.

Where a command can be used for setting or getting a parameter, the parameter value is shown as an optional argument in [ square brackets ]. Required arguments are shown in <angled brackets>. Either-or arguments are separated by the "vertical bar" | symbol. Commands sent to, and responses returned from the server are shown in courier font. Non-literals are shown in italics; e.g., "basename [value]" means not the word "value" but that a value should be supplied, while "autodir [yes|no]" means that the literal word "yes" or "no" should be supplied. Commands accepted by only one controller or the other are indicated appropriately as ARC or Archon.

abort – abort an exposure in progress (ARC-only)

usage: abort

returns: DONE on success

ERROR on error

Aborts an exposure currently in progress. This can abort any stage, the exposure delay, readout, etc. Currently only available on ARC (AstroCam).

amplifier – set or get which detector amplifier(s) to use

usage: amplifier [ ampsel ]

returns: ampsel DONE on success

ERROR on error

Set or get the amplifier(s) to use. When an argument <ampsel> is included then the amplifier selection will be <ampsel>. When no argument is suppled then the current amplifier selection will be returned.

autodir – automatically create UTC subdirectory for images

usage: autodir [ yes | no ]

returns: yes | no DONE on success

This command controls whether images will be saved into a UTC date subdirectory within the image directory imdir (§4.3.21) . If yes then the subdirectory will automatically be created if it doesn't exist. The format of this directory is YYYYMMDD so that images would be saved under /imdir/YYYYMMDD/basename_suffix.fits. A default state can also be set in the configuration file with the key AUTODIR=yes | no (see Configuration §3.2). If not specified and omitted from the configuration file then the default state is "yes".

When no argument is supplied then the current state is returned.

See also the imdir (§4.3.21), basename (§4.3.4), and fitsnaming (§4.3.15) commands.

basename – base image name for FITS image files

usage: basename [ value ]

returns: value DONE on success

ERROR on error

Set or get the base image name for image files. When an argument <value> is included then the image name is set to <value>. When no argument is supplied then the current image name is returned. A default can also be set in the configuration file with the key BASENAME=value (see Configuration §3.2).

FITS image files are saved to /imdir/[YYYYMMDD]/basename_suffix.fits. where the UTC date subdirectory YYYYMMDD is optionally set by autodir (see §4.3.3 and Table 1). See also the imdir (§4.3.21) and fitsnaming (§4.3.15) commands.

bias – bias voltage

usage: bias <module> <channel> [ bias ] (Archon)

usage: bias <pcinum> <boardid> <dac> <CLK|VID> <adu> (ARC)

returns: bias DONE on success

ERROR on error

Set a bias voltage.

For Archon, specify module number {1:12} and channel {1:30} to read the specified bias. Include a voltage (in floating point volts, E.G. 14.0, -5.5, etc.) to write that voltage to the specified module and channel. The software automatically checks the board type (HVBias, HVXBias, LVBias, LVXBias) and applies limit checks accordingly.

For ARC, specify PCI device pcinum={0,1,2,...}, boardid {0:15}, DAC number {0:7}, the string "CLK" or "VID" for the type of bias board (clock or video), and the voltage in A/D units, adu {0:4095} which you must scale to the maximum output voltage of the system. E.G. for a 3.3V system, adu = 4095Ívoltage / 3.3.

buffer – PCI/e image buffer mapping (ARC-only)

usage: buffer [ pcinum ] [ cols rows | size ]

returns: size DONE on success

ERROR on error

This command will allocate PCI/e buffer space for performing the DMA transfers, for ARC only. If no argument is given then the size of the currently mapped buffer (in bytes) will be returned.

If a single value <size> is given, then a buffer of <size> bytes will be allocated and mapped to the PCI/e device.

If two values <cols> <rows> are given then a suitably sized buffer will be allocated to contain an image of those dimensions.

For systems with more than one installed PCI/e device, the PCI device number [pcinum] is optional. If specified then the buffer for that device only will be set (or returned). If not specified then all PCI/e buffers will be set (or returned). For systems with only one PCI/e device, this is always omitted.

cds – CDS/Deinterlace configuration key (Archon-only)

usage: cds <key> [ value ]

returns: value DONE on success

ERROR on error

Allows direct reading and writing of Archon CDS and deinterlacing settings. When an optional [value] is supplied then that key/value pair is written to configuration memory and the Archon native APPLYCDS command is issued, which parses and applies all CDS and deinterlacing settings to the system.

When value is omitted then the value is read.

close – close the connection to the detector controller

usage: close

returns: DONE on success

ERROR on error

Closes the connection to the controller. For Archon this closes the TCP sockets; for ARC (AstroCam) this closes the PCI/e driver(s).

cubeamps – write amplifiers as multi-extensions in data cube

usage: cubeamps [ true | false ]

returns: [true|false] DONE on success

[true|false] ERROR on error

When false, all amplifiers will be written in a single extension (flat) FITS file. When true, each amplifier will be written in a separate extension.

Default is false. This can also be set in the configuration file, §3.2.

For Archon, amplifiers will be identified automatically using the LINECOUNT, PIXELCOUNT, and TAPLINES keywords found in the ACF.

For AstroCam, amplifier identification is TBD.

Setting cubeamps will automatically force datacube to the same value, however when cubeamps and datacube are both true, when exposing for multiple sequences (i.e. "expose N") cubeamps takes priority. In other words, the data cube extensions will be composed of each amplifier, and the sequence of multiple exposures will be written to separate files. To create a cube of multiple exposures, cubeamps must be false.

datacube – data cube state

usage: datacube [ true | false ]

returns: true | false DONE

When provided with the (optional) state of "true" or "false" (case-insensitive) this will set the datacube state for multiple exposures. When the datacube state is true and the cubeamps state is false, multiple exposures will be written as FITS-formatted multi-extension data cubes; when datacube is false (or when cubeamps is true), separate files will be created for each exposure. See also "cubeamps" in §4.3.9 above and "expose N " in §4.3.13 below.

When no state is supplied then the current state is returned.

The default state is false.

echo – test server communication

usage: echo <string>

returns: string DONE

The server will write ("echo") any string received back to the connected socket. This is used for testing communication with the server without requiring any detector controller.

exit – exit the server

usage: exit

returns: none

Cleanly closes all connections and exits the server. Note that if the server is run in the foreground, it captures Ctrl-C which will execute this command to cleanly shut down before exiting.

expose – initiate an exposure

usage: expose [ N ]

returns: DONE on success

ERROR on error

Initiate an exposure, where "exposure" is the complete sequence of waiting for an exposure delay (if one was set via exptime), reading out the image sensor, transferring of pixel data to the host computer, and writing the image data to a FITS file on disk.

The previously set exptime will be used for the exposure time for this image. The command blocks other commands while the exposure is executing and does not return until the image (or optionally-specified [ N ] images) has been written to disk.

If the optional argument [ N ] is included then it will repeat for [ N ] exposures and additional exposures will be written to either separate files or in a single data cube, according to the datacube state (see §4.3.10 above).

If no argument N is given then N=1.

exptime – exposure time

usage: exptime [ value ]

returns: value <unit> DONE on success

ERROR on error

Set or get the exposure time. When an argument value is included then the exposure time is set to value. When no argument is suppled then the current exposure time is returned. The units are specified by <unit>. For ARC only msec is possible but for Archon <unit> may be sec or msec, as determined by the state of longexposure (§4.3.30). The default unit is msec.

For Archon this requires an ACF which supports an appropriate exposure delay subroutine, and that the exposure delay is controlled by a parameter named "exptime". Since the Archon allows for 20-bit values the largest exposure delay is 0x1FFFFF or 2,097,151. Represented in milliseconds this equates to a maximum exposure delay of 34.95 minutes. To accommodate longer exposure delays (at the cost of resolution) the command longexposure (§4.3.30) will change the Archon exposure delay unit to seconds.

For ARC this requires that the exposure timer is set using the 3-letter command "SET". Since the ARC controller allows for 24-bit values the largest exposure time is 0x1FFFFFF or 33,554,431. Represented in milliseconds this equates to a maximum exposure delay of 9.32 hours.

fitsnaming – FITS filename format

usage: fitsnaming [ type ]

returns: type DONE on success

ERROR on error

Set or get the FITS file naming type. When no parameter is specified the current type is returned. Valid types are "time" and "number".

When <type> is number then the FITS files are saved as:

imdir/[YYYYMMDD]/basename_imnum.fits

where imnum is an incremental number which starts at 0000 each time the server is started and increments automatically with each successful exposure, and [YYYYMMDD] is an optional date subdirectory (see "AUTODIR" in Table 1 and §4.3.3).

When <type> is time then the FITS files are saved as

imdir/[YYYYMMDD]/basename_YYYYMMDDHHMMSS.fits

where YYYYMMDDHHMMSS represents the time of the exposure (to the resolution of the current second).

See also the imdir (§4.3.21) and basename (§4.3.4) commands.

When multiple controllers are in use, basename is replaced with basename__N_ where N is the controller number {0, 1, 2, ... } in order to properly correlate the file with the controller.

framestatus – read the frame status (Archon-only)

usage: framestatus

returns: DONE on success

ERROR on error

This command prints the Archon frame buffer status to the log file in a human-friendly format similar to that which is displayed in the STA archongui. This is the information obtained from the Archon-native "FRAME" command. Since the frame status for all internal buffers is displayed, there are no return values (other than a possible error sending the FRAME command) and this is considered more of a diagnostic, visual command.

geometry – detector geometry (ARC-only)

usage: geometry [ cols rows ]

returns: cols rows DONE on success

ERROR on error

Set or get the detector geometry for ARC (AstroCam) only.

When two arguments are specified then set the cols and rows (respectively) on the detector controller to those specified. When no arguments are given then return the cols and rows.

This command writes the cols to Y: memory address 0x400001 and the rows to Y: memory address 0x400002.

getp – get parameter value (Archon-only)

usage: getp <parameter>

returns: value DONE on success

ERROR on error

Get a parameter value for Archon only.

When the argument <parameter> is a stored parameter name, this command will return the associated value stored in the controller's configuration memory. See also setp (§4.3.35).

hdrshift – HDR bit-shift value (Archon-only)

usage: hdrshift [ value ]

returns: value DONE on success

ERROR on error

Gets [ sets ] the number of bits to right-shift the Archon buffer when in HDR mode (i.e. SAMPLEMODE=1, 32 bits per pixel). The default is 16.

This can also be set in the config file with the parameter:

HDR_SHIFT=value

heater – control HeaterX module (Archon-only)

There are several forms for the heater command, as described in the following subsections. For each command, ERROR is returned on error. <module> refers to the (integer) module number. The heater ID <A|B> and requested state <on|off> are not case-sensitive. When no optional arguments are provided then both the state and target are returned. When setting a parameter then only the parameter(s) set is(are) returned.

The heater command is slow to execute (~1.5s) because it has built into it an Archon native APPLYMODxx command, which parses and applies the configuration for module xx.

A summary of the heater commands, detailed in the following corresponding subsections, is detailed below.

  1. turn heater on/off and set target temperature
  2. control loop PID parameters
  3. turn ramp on/off and set ramp rate
  4. set control loop I limit term
  5. set the input sensor for the heater control loop

Set or get the state and target for heater A or B on the specified module

usage: heater <module> < A | B > [ <on | off> <target> ]

returns: ON | OFF target DONE on success

When state is set to <on> then heater A or B on the specified module is enabled and the target temperature is set to <target>. When set to off then heater A or B on the specified module is disabled. The target alone may be set, the state alone may be set, or the target may be set at the same time with the ON state (e.g. heater 1 A ON -205.0).

Set or get the PID parameters for heater A or B on the specified module

usage: heater <module> < A | B > PID [ <p> <i> <d> ]

returns: p i d DONE on success

When setting parameters, all three must be provided in the order indicated, <p> <i> <d>.

Fractional PIDs are supported with backplane version 1.0.1054 or newer.

Set or get the ramp and ramprate for heater A or B on the specified module

usage: heater <module> < A | B > RAMP [ <on | off> [ ramprate ] ]

returns: ON | OFF ramprate DONE on success

When setting the ramp to <on> then the [ramprate] is required and requested ramprate is returned. When setting ramp to <off> then the ramprate is not included, and "0" is returned for the ramprate.

The ramprate alone may be set (e.g. heater 1 A RAMP 300), the state alone may be set, or the ramprate may be set at the same time with the ON state
(e.g. heater 1 A RAMP ON 300).

The RAMP command requires backplane version 1.0.548 or newer.

Set or get the I limit term for heater A or B on the specified module

usage: heater <module> < A | B > ILIM [ value ]

returns: value DONE on success

Acceptable values for value are 0 to 10000.

Set or get the input sensor used for the specified heater control loop

usage: heater <module> < A | B > INPUT [ A | B | C ]

returns: A | B | C DONE on success

Set the sensor A, B, or C to be used as input for heater A or B on the specified module. (NB. Sensor A, B, C is not to be confused with heater A, B – it's unfortunate that STA has used the same names for both inputs and outputs.)

When no input is specified then the current input is returned.

imdir – base image directory for FITS image files

usage: imdir [ name ]

returns: name DONE on success

ERROR on error

Set or get the base image directory, in which to save files. When an argument <name> is included then the base image directory is set to <name> which may contain any number of subdirectories. If any directory doesn't exist then it will be created. When no argument is supplied then the current image directory is returned.

This sets and returns the base directory only. Images can be optionally saved in a date subdirectory of the base image directory, using the current UTC date, i.e., imdir/[YYYYMMDD]/ either by default (Table 1) or by command (autodir, §4.3.3).

imnum – image number for FITS image files

usage: imnum [ value ]

returns: value DONE on success

ERROR on error

Set or get the image number, which is appended to the image base name (e.g. basename_0001) when fitsnaming is set to “number” (§4.3.15). When an argument <value> is included then the image number is set to <value>. When no argument is supplied then the current image number is returned. The image number is automatically incremented after a successful exposure.

inreg – write to VCPU input register (Archon-only)

usage: inreg <module> <reg> <value>

returns: DONE

This command writes <value> to the VCPU input register <reg> on module <module>. The selected module must support digital IO and contain VCPU support. Register <reg> must be in the range {0:15} and <value> must be in the range {0:65535}. The Archon command "APPLYDIO_m_" is sent automatically after successfully writing the configuration key "MODULE_xxxx_MOD_m_/VCPU_INREG_i_=vvvvv".

interface – return the detector interface type

usage: interface

returns: type DONE

This command returns a string indicating the type of detector controller interface for which the camera interface software has been compiled.

isloaded – has the firmware been loaded (Archon-only)

usage: isloaded

returns: true|false DONE

This command returns true or false if the firmware has been loaded or not. Note that this is only from the perspective of the camera controller server, whether or not a load command was successful (a failed load command will set this false). Since this does not check the current state of the controller, if the controller was powered off after loading the firmware, this could return a false positive indicating that firmware was loaded (which it was), even if it is no longer true.

key – add FITS keyword to user-defined database

usage: key < KEYWORD=VALUE//COMMENT | list >

returns: DONE on success

ERROR on error

This command accesses an internal database to include user-defined FITS keyword in the primage image header. This internal database is held in RAM while the server is running and is not independently saved.

When the argument is of the following form:

KEYWORD=VALUE//COMMENT

then a new keyword=KEYWORD equal to value=VALUE and optional comment=COMMENT is inserted (or updated, if keyword already exists) in the internal database. The type (BOOL, STRING, INT, FLOAT) is automatically detected (a Boolean is defined as any single character string equal to "T" or "F"). The comment is optional and may be omitted along with the slashes (i.e. "key KEYWORD=VALUE" is acceptable).

If commands are given the same keyword with different values then that keyword is over-written in the database with the latest value (i.e. there are not multiple keywords of the same name).

If VALUE=. (a period) then that keyword will be deleted from the user database.

If the optional argument "list" is passed then all user-defined keywords will be printed in the logfile, indicating the keyword, value, comment and the auto-detected type indicated in parentheses (TYPE).

load – load firmware into detector controller

usage: load [ filename ]

usage: load [ devnum ] [ filename ] (AstroCam-only)

returns: DONE on success

ERROR on error

Load firmware onto the controller from the file specified. If filename argument is included then it must be a fully qualified pathname. This would be an ACF file for STA/Archon, or a .lod file for an ARC timing board.

If the optional filename argument is omitted then the default firmware specified in the server's .cfg file will be loaded.

For AstroCam, an optional PCI device number or space-delimited list of device numbers devnum may be included to indicate which device(s) to load. For example "load 0 tim.lod" or "load 0 2 3 tim.lod". The API loadControllerFile() is used to upload the .lod file over the fiber to the timing board.

For Archon, the configuration memory is first cleared, then written (WCONFIG) from the specified .ACF file, after which Archon will parse and apply the complete system configuration (APPLYALL). Power to the detector will be off after this operation (send the Archon-native command POWERON to turn on the power). The DEFAULT mode is automatically selected (see "mode" §4.3.31).

loadtiming – load timing script and parameters (Archon-only)

usage: loadtiming [ filename ]

returns: DONE on success

ERROR on error

Loads the specified ACF file into the Archon configuration memory (WCONFIG), then sends the LOADTIMING command. This parses and compiles the timing script and parameters contained in the configuration memory, and applies them to the system. This resets the timing cores.

If filename argument is included then it must be a fully qualified pathname.

If the optional filename argument is omitted then the default firmware specified in the server's .cfg file will be loaded.

longerror – report long errors to command port

usage: longerror [ true | false ]

returns: [true|false] DONE on success

[true|false] ERROR on error

When longerror is false, commands will return ERROR on error. The full error message is always written to the asynchronous message port, and details are always written to the log file, but the command port response is simply "ERROR."

When longerror is true, the reason for the error will be added to the command port response, i.e., "ERROR message".

This can also be set in the configuration file, §3.2.

longexposure – long exposure mode to extend exptime unit (Archon-only)

usage: longexposure [ true | false ]

returns: [true|false] DONE on success

ERROR on error

This command applies only to STA/Archon.

When set to true the controller server assumes that the exposure time unit is in seconds. When set to false the exposure time unit is assumed to be in milliseconds.

This command requires compatible Archon firmware (ACF) with a parameter named "longexposure" which will be set =1 when longexposure is true, and =0 when longexposure is false. The ACF must also have appropriate exposure delay subroutines for both cases, to produce second and millisecond delays.

The default start-up condition of the server is longexposure=false.

The comment field of the EXPTIME header keyword is controlled by this value and will be set to "msec" or "sec" (for ARC the exposure time comment will always indicate "msec").

mode – camera mode (Archon-only)

usage: mode [ modename ]

returns: modename DONE on success

ERROR on error

This command (currently) applies only to STA/Archon. Modes are defined in ACF file as [MODE_modename]. Every ACF file must contain at least one mode called DEFAULT and that mode must define the following three values:

[MODE_DEFAULT]
ARCH:NUM_DETECT=x
ARCH:HORI_AMPS=y
ARCH:VERT_AMPS=z

where x, y, z are the number of detectors, number of horizontal amplifiers per detector, and vertical amplifiers per detector, respectively.

native – send a native detector controller command

usage: native <cmd> [ args ]

returns: DONE on success

ERROR on error

This allows sending native commands directly to the controller. See Section 7.

open – open a connection to the detector controller

usage: open [ devlist ]

returns: DONE on success

ERROR on error

Opens a connection to the controller by whatever means is supported by the hardware in order to establish a communications channel between the host computer and the controller. This is required before any other operation.

An optional space-delimited device list [ devlist ] can be supplied to open only the specified devices (currently ARC-only but Archon support for multiple devices is planned).

poweroff – turn off detector controller biases

usage: poweroff

returns: DONE on success

ERROR on error

This command wraps the native power off command. For ARC it sends POF; for Archon it sends POWEROFF. When compiled for specific instruments this may include other necessary Opens a connection to the controller by whatever means is supported by the hardware in order to establish a communications channel between the host computer and the controller. This is required before any other operation.

An optional space-delimited device list [ devlist ] can be supplied to open only the specified devices (currently ARC-only but Archon support for multiple devices is planned).

preexposures – number of exposures to take and discard before saved exposures

usage: preexposures [ P ]

returns: P DONE on success

ERROR on error

The requested number "pre-exposures" P will be added to the number of exposures N given to the expose command (§4.3.13) so the controller will expose for a total of P+N exposures (including any exposure time) but the first P exposures will not be read from the controller nor saved.

When no argument is given then the current number of pre-exposures is returned.

readout – set readout / de-interlacing type

usage: readout [ <type> ] [LIST]

returns: type DONE on success

ERROR on error

When no arguments are given the current readout type is returned. If type is LIST then all accepted readout types are returned. Valid readout types are as follows:

nirc2

sensor – temperature sensor current and averaging (Archon-only)

usage: sensor <module> < A | B | C > [ current ]

sensor <module> < A | B | C > AVG [ N ]

returns: current DONE on success

N DONE on success

ERROR on error

This command sets or gets the temperature sensor current for the specified sensor (A,B,C) on the specified module. <module> refers to the (integer) module number. <current> is an integer in the range {0:1600000} and is specified in nA. This is used only for RTDs.

When AVG N is used then Archon will average the previous N readings of the given sensor on the given module, where N may be one of the following: 1, 2, 4, 8, 16, 32, 64, 128, 256. When no number N is included with the AVG argument then the averaging value is returned.

setp – set parameter value (Archon-only)

usage: setp <name> <value>

returns: value DONE on success

ERROR on error

Set a parameter <name> to value <value> for Archon only. This is the equivalent of Archon native commands FASTEPREPPARAM followed by FASTLOADPARAM. See also getp (§4.3.18). Note that this does not re-write configuration memory, so a getp command will not read changes made by setp. See also writep (§4.3.44).

shutter – set or get the shutter enable state on expose

usage: shutter [ enable | disable ]

returns: enabled | disabled DONE on success

usage: shutter [ enable | disable | open | close | reset ] (Archon)

returns: enabled | disabled | OPEN | CLOSED DONE on success

ERROR on error

Set or get the shutter enable state on expose. When enabled, the shutter is allowed to open on expose; when disabled, the shutter is not allowed to open on expose. When no argument is given then the current enable state is returned. Requires firmware support.

For Archon, this will write to the parameter identified by SHUTENABLE_PARAM, setting this parameter to 1 or 0 to enable or disable, respectively. These values can be optionally overridden by setting the SHUTENABLE_ENABLE and SHUTENABLE_DISABLE keywords in the configuration file (see Table 1 under Configuration §3.2).

Archon also supports an optional set of engineering parameters open | close to force the shutter open or closed. After the shutter has been forced open or closed, the shutter command with no arguments will return only the open/close state (as opposed to the enable/disable state). When forced open or closed the shutter is not controlled for exposures by the firmware so enable/disable has no meaning. Forcing the shutter will set the Archon keyword TRIGOUTFORCE=1 and TRIGOUTLEVEL={ 1 | 0 } for { open | close }. No consideration is made as to the value of TRIGOUTINVERT so it is the responsibility of the Archon programmer to take this into consideration. A FITS header keyword "SHUTFORC" will be added which is set = 1 when forced open or = 0 when forced closed. To return to normal operation, send the "shutter reset" command; after this, the shutter command with no arguments will once again return only the enable/disable state (and remove the SHUTFORC keyword).

systemfile – generate a system file (Archon-only)

usage: systemfile <filename>

returns: DONE on success

ERROR on error

Sends the Archon-native SYSTEM command to read the current hardware and generate an ASCII text file containing the system information. Such a file may be read by WDL or used for the emulator described in Section 10.

test – development-level tests

usage: test < testname [ arg ] >

returns: DONE on success

ERROR on error

Several "development-level" tests have been implemented which are not meant for the typical user; these are described in the appendix Section 12 – Test Commands.

trigin – prepare for an external-trigger exposure (Archon-only)

usage: trigin < expose [N] | untimed | readout | disable >

returns: DONE on success

ERROR on error

This command requires an ACF which supports external exposure triggering. See External Triggering, Section 8 for more details.

expose

When the argument is expose then this prepares the Archon for a timed exposure which will be triggered by the next TRIGIN pulse; the exposure time will be that set by the exptime command (§4.3.14). The asynchronous EXPOSURE: progress message is a predicted indicator of exposure progress. It is expected that the hardware trigger will immediately follow the "trigin expose" command.

untimed

When the argument is untimed then this prepares the Archon for an untimed exposure which will be triggered by the next TRIGIN pulse. This command will return DONE|ERROR immediately because the exposure is expected to be triggered by hardware. This should be paired with a "trigin readout" command to end the exposure. It is expected that the TRIGIN pulse will arrive soon to trigger the exposure, so the FITS file is created now. This is considered the start of the exposure so if writekeys (§4.3.43) is set to "before" then FITS header keys are saved now for the current exposure. Once the "trigin untimed" has been received, the system is expecting a "trigin readout" command to follow. If it is decided to not read out the untimed triggered exposure then the "trigin disable" must be sent.

readout

When the argument is readout then this prepares the Archon for an end-of-exposure and readout, to be triggered by the next TRIGIN pulse.

disable

The argument disable can be used to disable the untimed state, so that an external trigger has no effect. This will also close and remove any empty FITS file created by a previous "trigin untimed" command.

expose N

The optional argument [ N ] is to be used with the expose argument for timed exposures only. When the exposure time (exptime, §4.3.14) is >=0 (greater than or equal to zero) and an optional argument [ N ] is supplied, then the next N trigger pulses each act as the expose (§4.3.13) command, meaning that each trigger initiates a complete exposure sequence; a wait for the defined exposure delay, reading out the sensor, transferring the image buffer to the host computer, and writing to disk.

useframes – set or get the useframes flag (ARC-only)

usage: useframes [ true | false ]

returns: state DONE on success

ERROR on error

When an argument [ true | false ] is passed then set the "useframes" flag to true or false; when no argument is passed then return the current useframes flag. This command is for ARC (AstroCam) only. Not all ARC firmware supports frames (some firmware sends only pixels). You must set useframes to false if your firmware does not support sending of frames.

The state of useframes is true by default on start-up.

writekeys – when to write FITS header keywords

usage: writekeys [ before | after ]

returns: state DONE on success

ERROR on error

When an argument [ before | after ] is passed then set when the server will write user-defined FITS header keywords in relation to the exposure, before or after. When set to "before" then user-defined keywords are written to the header before the exposure; any new keyword settings received after the exposure will be applied to a future exposure. When set to "after" then user-defined keywords are written to the header after the exposure; this allows the user to utilize an exposure delay to collect FITS header information.

When no argument is supplied then the current state is returned.

The state of writekeys is "before" by default on start-up.

writep – write parameter value to configuration memory (Archon-only)

usage: writep <name> <value>

returns: value DONE on success

ERROR on error

Write a parameter <name> = <value> to Archon configuration memory. This is the equivalent of Archon native command WCONFIG_xxxxPARAMNAME_=VALUE. See also getp (§4.3.18) and setp (§4.3.35).

NIRC2 Commands

The following are commands specific to NIRC2.

expose – initiate an exposure

usage: expose [ N ]

returns: DONE on success

ERROR on error

For NIRC2 when the optional argument N is given to the expose command it has a different meaning than for generic Archon. For NIRC2 it has the equivalent effect as sending the expose command N times to the server; in other words, the loop over N is performed at the server level and not at the firmware level. The result is that N separate FITS files will always be produced.

If no argument N is given then N=1.

roi – set region of interest

usage: roi [ <width> <height> ]

returns: N DONE on success

ERROR on error

When no arguments are given the current region of interest is returned. Width must be 32 <= width <= 1024 and a multiple of 32. Height must be 8 <= height <= 1024 and a multiple of 8.

sampmode – set sampling mode

usage: sampmode [ <mode> [ args ] ]

returns: N DONE on success

ERROR on error

When no arguments are given the current sampling mode is returned. The following sampling modes (and their arguments) are supported:

UTR: 1 <samples> <ramps>

CDS: 2 [ext]

MCDS: 3 <pairs> <ext>

nonCDSV: 4

CDSV: 5

For UTR the first argument <samples> will be stored as a data cube of depth <samples>. If <ramps> is greater than 1 then each ramp will be stored as a separate extension.

For CDS a pair of frames will always be recorded in a data cube; an optional number of extensions may be specified.

For MCDS the number of pairs must be an even number and will be stored in a data cube. An optional number of extensions may be specified.

Clone this wiki locally