* Table of Contents Previous Chapter * Next Chapter

5.0 The PSCI Program

This program reads a stream of ACIS packets, verifies their format and internal consistency, and optionally, sorts, reformats, and writes them to a series of data streams and disk files, as detailed in Table 11. The UNIX command syntax is as follows:

psci [-BDTVacmpqsuv] [-h name] [-l name] [file]

Packets are read from the input file named on the psci command line, or, if omitted, from the standard input stream, stdin. They are subjected to a variety of tests, as detailed below. If the ­l option is specified, their headers are translated into ASCII and written to log files. If ­m is specified, a one-line description is written to stdout, suitable for display by monitorScience (q.v.) Most packets are then discarded, and psci reads the next one, but some are retained, as follows:

5.1 Packet Field Verification

psci has been compiled with tables derived directly from the IP&CL Structures database. Packets with unrecognized TTAG codes (as defined in the "acis_h/interface.h" file) cause warning messages to be written to stderr, and are ignored. All fields in recognized packets and pseudopackets are then checked against their IP&CL limits--bit fields are expanded to "unsigned long int" values unless their minimum permissible values (column 15 in the IP&CL structure tables) are negative, in which case, psci treats them as twos-complement signed integers and expands them to "long int". If a field is discovered to beout of range, psci writes a message to stderr, e.g.

file: packet[ntotal,ncount].field[index] above maximum (val > maxval)
file: packet[ntotal,ncount].field[index] below minimum (val < minval)

This example illustrates several features of psci. All stderr messages begin with a file: argument; for errors and warnings, this is the name of the input file (or "stdin"); for informatory messages, it is usually the name of an output file. Packets are designated by their IP&CL names, e.g., exposureTeRaw, followed by ntotal, the sequence number of the packet within the input stream, and ncount, the sequence number among packets of this particular type. Both counts start at zero, so the first packet is [0,0]. Multi-dimensional fields within packets are followed by an array index, which also starts at 0. The value of the field is displayed as a decimal integer.

TABLE 11. Output files and streams generated by psci
File or Stream Contents Remarks
stdout One line per input packet, containing the packet name followed by one or more keyword=value fields. For use by monitorScience. Only generated when the ­m option is specified on the psci command line. For an example, see Table 13.
stderr Error, warning, and informatory messages. Warning messages will be suppressed by including ­q on the psci command line; informatory messages are only generated if ­v is specified.
Files containing formatted listings of packet headers
name.s.bias.log Bias packets from science run s.
name.command.log CommandEcho packets. Details all commands received and echoed by the ACIS BEP.
name.deahk.log DeaHousekeeping packets.
name.s.science.log Science packets from run s. Includes the contents of all load*Block commands within dumped*Block packets.
name.packet.log Miscellaneous packets. Describes all packets not logged in one of the other files.
name.pseudo.log Pseudopackets. Only generated if the ­p flag is specified on the psci command line.
name.swhk.log SwHousekeeping packets. Details all messages received from the BEP software housekeeper.
Files containing data in various other formats
name.s.n.erv.txt Events in "extended RV" format from FEP number n from science run s. *.txt if ASCII; *.dat if binary. If the ­a flag is specified on the psci command line, the file will be written in ASCII (see Table 15); else it will contain 36-byte binary records (Table 14).
name.s.n.erv.dat
name.s.n.i-j.hist.txt Histograms from exposures i through j of FEP number n from science run s. *.txt if ASCII; *.fits if binary. If the ­a flag is specified, contains columns of ASCII values (see Table 17), one per CCD output node; otherwise writes FITS files containing 4096 samples of 32-bit binary integers per output node.
name.s.n.i-j.hist.fits
name.s.packet.n.txt The contents of the n'th instance of a memory read-back packet- multiple packets generated by the same ACIS command will be concatenated. If ­a is specified on the psci command line, the data are written in groups of hexadecimal ASCII words to *.txt (except Huffman blocks which are formatted as shown in Table 19.) Without ­a, they are written in binary to *.dat.
name.s.packet.n.dat
name.s.n.bias.fits A bias map from FEP number n from science run s, in FITS format. Continuously clocked bias maps are replicated to 512 rows by 1024 columns. Timed exposure maps contain 1024 rows of 1024 columns (see Table 18).
name.s.n.m.raw.fits Raw pixels from exposure m of FEP number n from science run s, in FITS format. Overclock values are appended to each image line. Frame-average overclocks are written to the FITS header (see Table 7).
name.s.time.txt Exposure time tag files. See Section 5.5
name.s.n.TMP.fits A temporary file name used for raw data. psci will rename the file as soon as it determines the exposure number.

Since out-of-limits field-values are not considered to be sufficient reason for halting the program, psci writes these messages and continues processing. The messages themselves can be suppressed by invoking psci with the ­q option.

5.2 Packet Logging

When the -l option is used, psci writes packet-header information to the log files listed in Table 11. The format of these files is derived from that of data structures in the C language, e.g. Table 12, which identifies itself as the first dataTeFaintBias packet, the 16th packet in the stream. Note that fields whose values are enumerated in acis_h/interface.h will be followed by "#" and the enumeration. Unsigned values larger than 32767 are shown in hexadecimal base, preceded by "0x". The values of arrays of fields with dimension > 9 are not shown-merely their dimension. When a packet contains one or more command blocks, e.g. dumpedTeBlock, which contains a science parameter block (either loadTeBlock or loadCcBlock) and an optional window block (either load1dBlock or load2dBlock), the individual sub-fields are logged, shifted to the right by 2 columns.

As shown in Table 11, the "name" supplied with the -l option of psci is used as a common prefix to the names of all output files. When a dumpedCcBlock or dumpedTeBlock packet is received, a comment is written into all open log files, and the science run number is incremented. Any opened science and bias data files are automatically closed, and a warning message is written to stderr since they should have been closed: science files by the receipt of a previous scienceReport packet, and bias files when complete.

TABLE 12. Example of formatted packet logs
A timed-exposure faint-mode event packet

dataTeBiasMap[12,4] = {
  telemetryLength            = 779
  formatTag                  = 14 # TTAG_SCI_TE_BIAS
  sequenceNumber             = 9
  biasStartTime              = 0x9e73a7e5
  biasParameterId            = 4011
  ccdId                      = 6 # CCD_S2
  fepId                      = 2 # FEP_2
  dataPacketNumber           = 4
  initialOverclocks          =   180   184   181   184
  pixelsPerRow               = 1023
  rowsPerBias                = 1023
  ccdRow                     = 1015
  ccdRowCount                = 1
  compressionTableSlotIndex  = 255
  compressionTableIdentifier = 0xffffffff
  pixelCount                 = 2048
  data                       = [768]
}
A timed-exposure bias data packet

dataTeFaint[15,0] = {
  telemetryLength            = 1021
  formatTag                  = 21 # TTAG_SCI_TE_DAT_FAINT
  sequenceNumber             = 11
  ccdId                      = 6 # CCD_S2
  fepId                      = 2 # FEP_2
  dataPacketNumber           = 0
  ccdRow                     = 1
  events                     = [138]
}

5.3 Monitor Output

When psci is invoked with the -m flag, monitor records are written to stdout. The example in Table 13 shows the start of a science run, from the BEP's restart message (bepStartupMessage) through the commands (commandEcho) used to configure the DEA and BEP, the dump of the parameter blocks (dumpedTeBlock), and the beginning of interleaved event (dataTeFaintBias) and bias (dataTeBiasMap) records. These records should be piped into monitorScience. They are not intended to be read in this form by humans!

To save bandwidth, and lighten the load on monitorScience, psci does not write all packet fields to the monitor stream-the excluded items include all arrays and fields identified by the nomonitor directive in the tlm.aux file used to build the psci executable (see "Architecture").

A different level of monitoring is achieved when psci is invoked with the -s flag. In this case, all telemetry packets will be converted to ASCII and written to the standard output stream, stdout, in a format identical to that used for the various log files when the -l flag is used.

Finally, the -u flag causes psci to print all user-type pseudo-packets containing ASCII messages (i.e. those of type = 0) to the standard error stream, stderr.

5.4 Science Event Modes

psci saves the science parameter block and (optional) window block that ACIS reports at the start of a science run. It also saves event data blocks until an exposure packet is received for the corresponding FEP, at which time it writes 36-byte binary event records to the appropriate "name.s.n.m.erv.dat" file as shown in Table 14. During this process, psci checks numerous fields in each FEP's event data, exposure, and parameter block packets, as detailed in "Tests Applied to Packet Fields". This process should be sufficient to detect any missing, mislabeled, or out-of-order packet, but the events themselves-their row and column indices and pixel values-are not examined. Discrepancies are reported to stderr, in one of two formats:

file: packet1[tot1,cnt1].field1=val1 != val2
file: packet1[tot1,cnt1].field1=val1 != packet2[tot2,cnt2].field2=val2

where val1 is a (possibly signed) decimal integer, and val2 is an integer or an enumeration from acis_h/interface.h. As with the out-of-range messages described in "Packet Field Verification", these are merely warnings, and may be suppressed by the -q flag. psci also examines the irigB and bepSciTime fields of all scienceFramePseudo packets. Ifthese are accurate, it will calculate approximate irigtime fields for the ERV records, but the algorithm makes three assumptions: (a) that the BEPtimer runs at precisely 100 kHz, (b) that all exposures in timed exposure mode have the same duration, and (c) that until psci has received a pair of fepTimestamp fields, it will approximate the exposure repetition interval by the primaryExposure field of loadTeBlock

TABLE 13. Packet monitor stream written to stdout


bepStartupMessage sequenceNumber=0 bepTickCounter=567 version=0xffffffff lastFatalCode=0 lastFatalValue=0 watchdogFlag=0 patchValidFlag=1 configFlag=1 parametersFlag=1

commandEcho sequenceNumber=1 arrival=0xa5997d1e result=1 commandIdentifier=0 commandOpcode=9

commandEcho sequenceNumber=1 arrival=0xa5997d1e result=1 commandIdentifier=0 commandOpcode=9

commandEcho sequenceNumber=2 arrival=0xa5997de8 result=1 commandIdentifier=0 commandOpcode=11

commandEcho sequenceNumber=3 arrival=0xa5997e2c result=1 commandIdentifier=0 commandOpcode=14

dumpedTeBlock sequenceNumber=4

dataTeBiasMap sequenceNumber=5 ccdId=6 fepId=2 dataPacketNumber=0 pixelsPerRow=1023 rowsPerBias=1023 ccdRow=1023 ccdRowCount=1 pixelCount=2048

dataTeBiasMap sequenceNumber=6 ccdId=6 fepId=2 dataPacketNumber=1 pixelsPerRow=1023 rowsPerBias=1023 ccdRow=1021 ccdRowCount=1 pixelCount=2048

dataTeBiasMap sequenceNumber=7 ccdId=6 fepId=2 dataPacketNumber=2 pixelsPerRow=1023 rowsPerBias=1023 ccdRow=1019 ccdRowCount=1 pixelCount=2048

dataTeBiasMap sequenceNumber=8 ccdId=6 fepId=2 dataPacketNumber=3 pixelsPerRow=1023 rowsPerBias=1023 ccdRow=1017 ccdRowCount=1 pixelCount=2048

dataTeBiasMap sequenceNumber=9 ccdId=6 fepId=2 dataPacketNumber=4 pixelsPerRow=1023 rowsPerBias=1023 ccdRow=1015 ccdRowCount=1 pixelCount=2048

dataTeBiasMap sequenceNumber=10 ccdId=6 fepId=2 dataPacketNumber=5 pixelsPerRow=1023 rowsPerBias=1023 ccdRow=1013 ccdRowCount=1 pixelCount=2048

dataTeFaintBias sequenceNumber=11 ccdId=6 fepId=2 dataPacketNumber=0 ccdRow=1

dataTeBiasMap sequenceNumber=12 ccdId=6 fepId=2 dataPacketNumber=6 pixelsPerRow=1023 rowsPerBias=1023 ccdRow=1011 ccdRowCount=1 pixelCount=2048

All event-finding modes generate ERV files in the same format, but the use of the 9 fields in the data array differs according to mode. In CC and TE graded modes, the event amplitude is recorded in data[0] and the grade code in data[1]; in graded TE mode, data[2] contains the mean of the 4 corner pixel amplitudes; the remaining graded-mode data fields contain zeroes. In faint modes, the central pixel value is reported in data[4], with the neighboring pixels from the same CCD row in data[3] and data[5]. In 1x3 faint mode, the remaining 6 fields contain zeroes; in 3x3 faint modes, data[0] through data[2] contain the pixel values from the previous row, and data[6] through data[8] those from the following row. CCD column and row numbers are defined from the lower left corner of the CCD.

TABLE 14. Extended Vanderspek (ERV) record format

typedef struct {
  unsigned short expnum;        /* exposure number */
  unsigned short exposure;      /* exposure time (msec) */
  unsigned long  irigtime;      /* IRIG timestamp */
  unsigned short nodenum;       /* output node index */
  unsigned short col;           /* column index */
  unsigned short row;           /* row index */
  unsigned short data[9];       /* event data values */
  short          doclk;         /* delta overclock */
} RvRec;

TABLE 15. A sample ERV event file in ASCII forma

 n  msec   irig  nq  col  row ----------------- Pixels ----------------- Doclk
 0  2800 80856262 2  566   1  191 1057  178  217 1406  168  174  180  176  0
 0  2800 80856262 0  192   2  197  181  201  175 1300  661  188  760  385  0
 0  2800 80856262 1  352   2  187  213  217  161 1453 1143  178  170  177  0
 0  2800 80856262 2  549   2  182  387  164  173 2094  177  169  155  165  0
 0  2800 80856262 2  650   2  175  176  174  177 1599  891  181  177  181  0
 0  2800 80856262 2  743   2  172  177  185  177 1292  185  160 1179  217  0
 0  2800 80856262 3 1017   2  227  602  619  211 1014  936  213  211  209  0
 0  2800 80856262 0  102   3  183  196  185  179 2549  184  180  180  184  0
 0  2800 80856262 0  224   3  185  175  175  167 2517  192  181  173  187  0
 0  2800 80856262 3  949   3  215  223  205  204 2431  205  205  217  214  0
 ...

In most event modes, psci will report the raw pixel values, but in Faint-with-Bias mode, the corresponding bias values are available. Even then, the subtraction will be made only if the -B flag is specified on the psci command line, in which case the appropriate "biasValues + deltaOverclocks" is subtracted from each valid pixel value. Invalid pixels, i.e. those with bias values exceeding 4093, will be assigned a value of -32768.

If the -a flag is specified, psci writes ERV files in ASCII format to "name.s.n.m.erv.txt", as shown in Table 15. A tally is kept of all exposures, events, and bias parity errors for checking against the contents of the scienceReport packet that should terminate the science run. Additional informatory messages will be written to stderr if psci is invoked with the -v flag, e.g.


# psci -a -l test1 -v dat.1
dat.1: start TE EV3x3 FAINTBIAS bep 0x52ccbf71 irig 935:72262 exptime 3.207
test1.2.fits: bias file written, 2100032 bytes
test1.2.erv: written 13 exposures 25127 events
dat.1: scienceReport[909,0] irig 935:72301 exp 13 fep ok ccd ok dea 0 bep 0
test1.packet.log: 456 bytes written
test1.command.log: 1570 bytes written
test1.science.log: 80351 bytes written
test1.bias.log: 371820 bytes written
psci: 930 packets read from dat.1

5.5 Event Frame Timestamp Files

When the -T flag is specified on the psci command line, the times of each event-mode exposure frame present in the input stream are written to the ASCII file "name.s.time.txt". This consists of the quantities shown in Table 16. The timestamp file is only generated during event-mode science runs, i.e. not during raw or histogram mode. The BepTime value should be constant within a given file. Frames will only be listed if at least one FEP processed that exposureNumber. Since the external (IRIG) time will drift relative to the ~100 kHz pixel clock reported in BepTime and FepTime, the drift can be estimated by comparing BEP and IRIG timestamps within science header pseudopackets. This drift is reported in the dIrig0 field.

TABLE 16. Contents of an event frame timestamp file
Field Name Description
Exp ACIS frame number
BepTime BEP start-of-run timestamp
FepTime FEP timestamp for this frame
dFEP FEP timestamp increment since the last frame
dFrame Length of a frame in pixel clock units
irigTime IRIG time (UTC) of this exposure
dIrig Frame-to-frame time in seconds
dIrig0 Drift between IRIG and ACIS clock in seconds

5.6 Histogram Files

Although ACIS writes histograms for each CCD output node at a time, psci saves the data packets until all expected nodes have been received, and writes a binary file in FITS format (see the left hand column of Table 18) named "name.s.n.i-j.hist.fits" for each contributing FEP. If the -a flag is specified, this will be an ASCII file named "name.s.n.i-j.hist.txt", consisting of 6 header lines followed by 4096 lines of 5 columns each containing, respectively, the pixel value and one pixel count for each output node A through D (see Table 17). If the CCDs are run with restricted output nodes (i.e. QUAD_AC or QUAD_BD), the unused columns are filled with zeroes.

TABLE 17. Contents of an ASCII histogram file

! histogram of fep n for n exposures n to n
!
! minimumOverclock        valA   valB   valC   valD
! maximumOverclock        valA   valB   valC   valD
! meanOverclock           valA   valB   valC   valD
! varianceOverclockLow    valA   valB   valC   valD
! varianceOverclockHigh   valA   valB   valC   valD
!
000000    histA   histB   histC   HistD
000001    histA   histB   histC   HistD

5.7 Raw Mode

The contents of raw data packets are written to disk files in FITS format as soon as they are received. Since the data packets always precede the exposure packet that describes them, the output file is first named "name.s.n.TMP.fits", and renamed "name.s.n.m.raw.fits" as soon as the exposure number "m" is known. For greater efficiency, psci uses memory mapping (the mmap(2) system call) to write raw-mode and bias files. As a consequence, the "ls -l" command will indicate that these files contain at least 2 Mbytes (1 Mbyte in continuous clocking mode), but the actual disk allocation, e.g. from the "du -a" command, will gradually increase as the data packets are received. Care must be taken to allow for this extra disk space when psci is receiving raw data and bias maps.

The headers of raw-mode FITS files will contain the fields shown in the center column of Table 18. Overclocks are appended to each line of the image array. The data area is always 1024x1024 pixels in timed-exposure mode and 1024x512 pixels in continuous clocking mode. psci will examine the dumpedTeBlock or dumpedCcBlock packet to see whether the CCD was run in a pixel-summing mode, or in sub-array readout mode, and will replicate and shift pixels accordingly to recreate a FITS file that reconstructs the original CCD geometry.

TABLE 18. Examples of FITS file headers
Binary Histograms Raw Mode with Overclocks Bias Images

SIMPLE  = T
BITPIX  = 32
NAXIS   = 2
NAXIS1  = 4096
NAXIS2  = 4
NFEP    = 3
NCCD    = 5
CCDROW1 = 1
CCDNROWS= 1024
CCDNODES= 4
QUADMODE= 'QUAD_FULL'
DEAGAIN = 125
SUM2X2  = 'NO'
EXPOTIM1= 30
EXPOTIM2= 0
DUTYCYCL= 0
FIRSTEXP= 71
LASTEXP = 75
NEXP    = 5
FILENAME= '...'
DATETIME= `...'
OCLKMINA= 181
OCLKMAXA= 186
OCLKMEAA= 184
OCLKVARA= 8
OCLKVAHA= 0
...
END

SIMPLE  = T
BITPIX  = 16
NAXIS   = 2
NAXIS1  = 1088
NAXIS2  = 1024
NFEP    = 2
NCCD    = 5
CCDROW1 = 1
CCDNROWS= 1024
CCDNCOLS= 1024
CCDOCLKS= 64
CCDNODES= 4
QUADMODE= 'QUAD_FULL'
DEAGAIN = 123
SUM2X2  = 'NO'
EXPOTIM1= 28
EXPOTIM2= 0
DUTYCYCL= 0
EXPOSURE= 21
FILENAME= '...'
DATETIME= `...'
END

SIMPLE  = T
BITPIX  = 1
NAXIS   = 2
NAXIS1  = 1024
NAXIS2  = 1024
NFEP    = 2
NCCD    = 5
CCDROW1 = 1
CCDNROWS= 1
CCDNODES= 4
QUADMODE= 'QUAD_FULL'
ACISMODE= `TE'
SUM2X2  = 'NO'
DEAGAIN = 75
BIASALGO= 1
BIASARG0= 0
BIASARG1= 10
BIASARG2= 0
BIASARG3= 100
BIASARG4= 70
FILENAME= `...'
DATETIME= `...'
INITOCLA= 180
INITOCLB= 184
INITOCLC= 181
INITOCLD= 184
END

5.8 Bias Files

These are created in the same manner as raw pixel images, i.e. they are memory-mapped into pre- allocated files of fixed length. The FITS file header format is shown in the right-hand column of Table 18. Timed exposure bias files always contain 2100032 bytes (2880 header bytes followed by 1024x1024 2-byte image pixels). As in raw mode, psci replicates and shifts the pixels to fill the entire 1024x1024 pixel array. Continuously clocked bias maps contain 1051456 bytes--the single row reported by the BEP is replicated 512 times.

5.9 Memory Readout

When the -l flag is specified, psci copies the contents of all memory readout packets to disk files named "name.pkt.n.dat", where "name" is the prefix specified on the command line, "pkt" is the type of memory readout, and "n" is an index that increments whenever a packet, or group of packets of this type is encountered. They are written in the native byte order of the host machine. When the ­a flag is also present, the files are written in hexadecimal notation similar to the output of the "od -X" command (or "od -x" for the 16-bit SRAM and PRAM dumps), and they will be named "name.pkt.n.dat".

5.10 Huffman Tables

The compression tables used by the BEP to compress the contents of raw science and bias data packets are treated by psci as special cases of memory readout. Since the Huffman table block is too long to dump in a single packet, psci assembles it from several dumpedHuffman packets and, when it is complete, saves it to decompress any subsequent raw or bias packets. If the "­l" option is used, the Huffman block will also be written to a disk file. Since Huffman blocks will not always be part of the packet stream, psci can be told, via the "­h" option, to pre-load a previously saved binary Huffman block, but this will always be supplanted by a complete Huffman block in the packet stream.

When the "­a" flag is used, Huffman blocks will be written to disk in ASCII format. These cannot be loaded by the "­h" option, but they are more readable, e.g. the example in Table 19.

TABLE 19. ASCII dump of a Huffman block containing multiple tables

huffmanTable[0] = {
    tabid = 0xffffffff
   lowlim = 3837
  tabsize = 512
    trunc = 07 3e0000 1111100
  badbias = 21 184df8 111111011001000011000
   badpix = 21 004df8 111111011001000000000
     -256 = 16 43bf00 1111110111000010
     -255 = 17 87ef80 11111011111100001
     -254 = 18 8897c0 111110100100010001
     -253 = 19 d737e0 1111110110011101011
...
      252 = 19 0937e0 1111110110010010000
      253 = 18 f6efc0 111111011101101111
      254 = 20 a89bf0 11111101100100010101
      255 = 19 e937e0 1111110110010010111
}
huffmanTable[1] = {
    tabid = 0xfffffffe
   lowlim = 3837
  tabsize = 512
    trunc = 06 280000 010100
  badbias = 21 497af8 111110101111010010010
   badpix = 18 c557c0 111110101010100011
     -256 = 20 eaf5f0 11111010111101010111
     -255 = 19 bc77a0 1011110111000111101
     -254 = 19 9c77a0 1011110111000111001
     -253 = 21 c17af8 111110101111010000011
...
}

5.11 Pseudopackets

If the "­p" flag is specified, these are written to "name.pseudo.log". BEP & IRIG time fields are saved from scienceFramePseudo packets, as outlined in "Science Event Modes". above. Also, when psci is invoked with the "-u" flag, userPseudo packets with "type" field values of zero are interpreted as diagnostic messages from the flight software and the remainder of the packets, assumed to contain null-terminated character strings, are written to stderr.Otherwise, pseudopackets are ignored.

5.12 Architecture

With the exception of the external tables discussed in "Huffman Tables", psci is self-contained-all packet and field names and formats are compiled into the executable module. The code is generated in three stages. In the first, a Perl script named genmap reads the IP&CL structures file and creates intermediate cmd.map and tlm.map files which define the field formats and minimum and maximum values. genmap also extracts the enumeration values from acis_h/interface.h and writes them to enum.c as character string arrays.Then gentab, a second Perl script, converts cmd.map and tlm.map into C structures in cmdtab.c and cmdtab.h. Finally, gcc compiles the structures with the remaining source code. While the process is automatic, it can be guided by directives in the three files enum.aux, cmd.aux, and tlm.aux. An example of enum.aux is shown in Table 20-lines of the form "command id name" assign "name" to command packets with that "id", and "packet id name" performs the same function for telemetry packets. This causes psci to use the new names within messages and in log and monitor files, as well as giving symbolic names to pseudopackets, since these were never described by the IP&CL.

[ORGANIZATION]

Examples of the cmd.aux and tlm.aux files are shown in Table 21 and Table 22. They share a common syntax. The "enumerate" command assigns a character string array in enum.c to a particular command or telemetry packet field. psci will display the enumerated value in its log files and error messages. The "nolog" directive prevents psci from logging a particular type of command, or packet, or field. The "nomonitor" command, which is only used in tlm.aux, performs the same function-of eliminating fields from monitor packets. The more restrictive "nomonitornull" command prevents fields from being written to the monitor stream if they have zero value.

5.13 Tests applied to packet fields

Table 23 details the tests applied within the particular packet-handling modules. These are in addition to the range tests described in "Packet Field Verification", which themselves verify the following fields:

A number of other consistency checks are made in the process of creating the output data files, and may cause warning messages to appear on stderr. For instance, the ccdRow and ccdRowCount fields in dataTeBiasMap packets are verified against the sub-array fields in loadTeBlock. The warnings are usually self-explanatory; the user should consult the source code for further details.


TABLE 20. Sample enum.aux file

#
# resolve duplicated command packet names
#
command CMDOP_START_TE         startTe
command CMDOP_BIAS_TE          startTeBias
command CMDOP_START_CC         startCc
command CMDOP_BIAS_CC          startCcBias
command CMDOP_ADD_BAD_TE_COL   addBadTeColumn
command CMDOP_RESET_BAD_TE_COL resetBadTeColumnMap
command CMDOP_ADD_BAD_CC_COL   addBadCcColumn
command CMDOP_RESET_BAD_CC_COL resetBadCcColumnMap
command CMDOP_DUMP_TE_SLOTS    dumpTeSlots
command CMDOP_DUMP_CC_SLOTS    dumpCcSlots
command CMDOP_DUMP_2D_SLOTS    dump2dSlots
command CMDOP_DUMP_1D_SLOTS    dump1dSlots
command CMDOP_DUMP_DEA_SLOTS   dumpDeaSlots
#
# resolve duplicated telemetry packet names
#
packet TTAG_DUMP_SYS_CONFIG    dumpedSysConfig
packet TTAG_DUMP_BAD_PIXEL     dumpedBadPix
packet TTAG_DUMP_BAD_TE_COL    dumpedBadTeCol
packet TTAG_DUMP_BAD_CC_COL    dumpedBadCcCol
packet TTAG_DUMP_PATCHES       dumpedPatches
packet TTAG_DUMP_HUFFMAN       dumpedHuffman
packet TTAG_DUMP_TE_SLOTS      dumpedTeSlots
packet TTAG_DUMP_CC_SLOTS      dumpedCcSlots
packet TTAG_DUMP_2D_SLOTS      dumped2dSlots
packet TTAG_DUMP_1D_SLOTS      dumped1dSlots
packet TTAG_DUMP_DEA_SLOTS     dumpedDeaSlots
packet TTAG_SCI_CC_REC_FAINT   exposureCcFaint
packet TTAG_SCI_CC_REC_GRADED  exposureCcGraded
packet TTAG_SCI_TE_REC_FAINT   exposureTeFaint
packet TTAG_SCI_TE_REC_GRADED  exposureTeGraded
#
# name the pseudopackets
#
packet 61 engineeringPseudo
packet 62 scienceFramePseudo
packet 63 userPseudo
TABLE 21. An example of tlm.aux

#
#  Use the following enumerations in log files
#
enumerate	formatTag	TlmFormatTagStr
enumerate	ccdId		CcdIdStr
enumerate	fepId		FepIdStr
enumerate	lastFatalCode	FatalCodeStr
enumerate	commandOpcode	CmdOpcodeStr
enumerate	result		CmdResultStr
enumerate	fepErrorCodes	FepIoErrorsStr
enumerate	query		DeaQueryCntlIdStr
enumerate	queryId		DeaQueryCcdIdStr
enumerate	fatalCode	FatalCodeStr
#
# Omit the following fields from log records
#
nolog	commandEcho.commandBody
nolog	scienceReport.ccdError
nolog	dumpedTeBlock.parameterBlockData
#
# Omit the following fields from monitor records
#
nomonitor	userPseudo
nomonitor	engineeringPseudo
nomonitor	scienceFramePseudo
nomonitor 	telemetryLength
nomonitor	formatTag
nomonitor	dataTeBiasMap.compressionTableSlotIndex
nomonitor	dataTeBiasMap.compressionTableIdentifier
nomonitor	dataTeBiasMap.biasStartTime
nomonitor	dataTeBiasMap.biasParameterId
nomonitor	commandEcho.commandLength
#
# Omit the following when null
#
nomonitornull	biasParityErrors
TABLE 22. An example of cmd.aux

#
#  Use the following enumerations in log files
#
enumerate	commandOpcode		CmdOpcodeStr
enumerate	ccdId			CcdIdStr
enumerate	itemId			SystemSettingsStr
enumerate	fepId			FepIdStr
enumerate	fepCcdSelect		CcdIdStr
enumerate	queryId			DeaQueryCcdIdStr
enumerate	outputRegisterMode	QuadModeStr
#
# Enumerations specific to particular command blocks
#
enumerate	loadCcBlock.fepMode		CcFepModeStr
enumerate	loadTeBlock.fepMode		TeFepModeStr
enumerate	loadCcBlock.bepPackingMode	CcBepModeStr
enumerate	loadTeBlock.bepPackingMode	TeBepModeStr
#
# Remove redundant fields from log output
#
nolog	loadTeBlock.gradeSelectValue
nolog	loadTeBlock.videoResponse
nolog	loadCcBlock.gradeSelectValue
nolog	loadCcBlock.videoResponse

TABLE 23. Tests applied to individual ACIS packet fields
Packet Field Checked against Module
bepReadReply
dumped*Slots
commandId last packet of same type within multi-packet group memory.c
readAddress
requestedAddress
requestedWordCount
dataCcBiasMap biasParameterId loadCcBlock: parameter BlockId bias.c
ccdId loadCcBlock: fepCcdSelect
fepId
dataCcFaint
dataCcGraded
ccdId exposureCcFaint: ccdId event.c
loadCcBlock: fepCcdSelect
dataPacketNumber running packet count
fepId exposureCcFaint: fepId
dataCcRaw ccdId last packet of same type from this FEP raw.c
loadCcBlock: fepCcdSelect
compressionTableIdentifier last packet of same type from this FEP
compressionTableSlotIndex loadCcBlock: rawCompressionSlotIndex
last packet of same type from this FEP
dataPacketNumber running packet count
fepId last packet of same type from this FEP
pixelCount loadCcBlock fields and pixel count
dataTeBiasMap biasParameterId last packet of same type from this FEP bias.c
loadTeBlock: parameter BlockId
biasStartTime last packet of same type from this FEP
ccdId loadTeBlock: fepCcdSelect
last packet of same type from this FEP
ccdRow compatibility with loadTeBlock fields
ccdRowCount
compressionTableIdentifier last packet of same type from this FEP
compressionTableSlotIndex loadTeBlock: rawCompressionSlotIndex
last packet of same type from this FEP
dataPacketNumber running packet count
fepId last packet of same type from this FEP
loadTeBlock: fepCcdSelect
pixelsPerRow pixel count
loadTeBlock: onChip2x2Summing
rowsPerBias loadTeBlock: subarrayRowCount
dataTeFaint
dataTeGraded
ccdId exposureTeFaint: ccdId event.c
dataPacketNumber packet count
fepId exposureTeFaint: fepId
dataTeFaintBias ccdId exposureTeFaintBias: ccdId event.c
loadTeBlock: fepCcdSelect
dataPacketNumber packet count
fepId exposureTeFaintBias: fepId
dataTeHist ccdId exposureTeHistogram: ccdId hist.c
loadTeBlock: fepCcdSelect
dataPacketNumber packet count
fepId exposureTeHistogram: fepId
outputNodeId exposureTeHistogram: outputNodeId
startingBin packet count
dataTeRaw ccdId last packet of same type from this FEP raw.c
loadTeBlock: fepCcdSelect
compressionTableIdentifier last packet of same type from this FEP
compressionTableSlotIndex loadTeBlock: rawCompressionSlotIndex
last packet of same type from this FEP
dataPacketNumber packet count
fepId last packet of same type from this FEP
exposureCcFaint - loadCcBlock: bepPackingMode event.c
loadCcBlock: commandOpcode
loadCcBlock: fepMode
biasParameterId last packet of same type from this FEP
biasStartTime last packet of same type from this FEP
scienceReport: runStartTime
ccdId last packet of same type from this FEP
dataCcFaint: ccdId
dataCcGraded: ccdId
loadCcBlock: fepCcdSelect
eventsSent event count
exposureNumber > last packet of same type from this FEP
fepId last packet of same type from this FEP
dataCcFaint: fepId
parameterBlockId last packet of same type from this FEP
loadCcBlock: parameter BlockId
runStartTime last packet of same type from this FEP
scienceReport: runStartTime
windowBlockId last packet of same type from this FEP
load1dBlock: windowBlockId
exposureCcRaw - loadCcBlock: commandOpcode raw.c
loadCcBlock: fepMode
ccdId last packet of same type from this FEP
loadCcBlock: fepCcdSelect
exposureNumber > last packet of same type from this FEP
fepId last packet of same type from this FEP
parameterBlockId last packet of same type from this FEP
scienceReport: parameterBlockId
runStartTime last packet of same type from this FEP
scienceReport: runStartTime
windowBlockId last packet of same type from this FEP
scienceReport: windowBlockId
exposureTeFaint
exposureTeFaintBias
- loadTeBlock: bepPackingMode event.c
loadTeBlock: commandOpcode
loadTeBlock: fepMode
scienceReport: exposures Sent
biasParameterId last packet of same type from this FEP
biasStartTime last packet of same type from this FEP
scienceReport: biasStart Time
ccdId last packet of same type from this FEP
dataTeFaint: ccdId
dataTeGraded: ccdId
loadTeBlock: fepCcdSelect
eventsSent event count
exposureNumber > last packet of same type from this FEP
fepId last packet of same type from this FEP
dataTeFaint: fepId
dataTeGraded: fepId
parameterBlockId last packet of same type from this FEP
loadTeBlock: parameter BlockId
scienceReport: parameter BlockId
runStartTime last packet of same type from this FEP
scienceReport: runStartTime
windowBlockId last packet of same type from this FEP
load2dBlock: windowBlockId
scienceReport: window BlockId
exposureTeHistogram - loadTeBlock: commandOpcode hist.c
loadTeBlock: fepMode
ccdId last packet of same type from this FEP
dataTeHist: ccdId
loadTeBlock: fepCcdSelect
endExposureNumber last packet of same type from this FEP
exposureCount scienceReport: exposuresSent
fepId last packet of same type from this FEP
dataTeHist: fepId
outputNodeId dataTeHist: outputNodeId
parameterBlockId last packet of same type from this FEP
loadTeBlock: parameter BlockId
scienceReport: parameter BlockId
runStartTime last packet of same type from this FEP
scienceReport: runStartTime
startExposureNumber last packet of same type from this FEP
> last packet of same type from this FEP
exposureTeRaw - loadTeBlock: commandOpcode raw.c
loadTeBlock: fepMode
scienceReport: exposures Sent
ccdId last packet of same type from this FEP
loadTeBlock: fepCcdSelect
exposureNumber > last packet of same type from this FEP
fepId last packet of same type from this FEP
parameterBlockId last packet of same type from this FEP
scienceReport: parameterBlockId
runStartTime last packet of same type from this FEP
scienceReport: runStartTime
windowBlockId last packet of same type from this FEP
scienceReport: windowBlockId
fepReadReply commandId last packet of same type within multi-packet group from this FEP memory.c
fepId
requestedAddress
requestedWordCount
load1dBlock commandOpcode CMDOP_LOAD_1D bias.c
event.c
raw.c
window.c
windowBlockId exposureCcFaint: windowBlockId event.c
exposureCcRaw: windowBlockId raw.c
load2dBlock commandOpcode CMDOP_LOAD_2D bias.c
event.c
raw.c
window.c
windowBlockId exposureTeFaint: windowBlockId event.c
exposureTeFaintBias: windowBlockId
exposureTeRaw: windowBlockId raw.c
loadCcBlock bepPackingMode BEP_CC_MODE_FAINT event.c
BEP_CC_MODE_GRADED
commandOpcode CMDOP_LOAD_CC bias.c
event.c
raw.c
fepMode FEP_CC_MODE_EV1x3 event.c
FEP_CC_MODE_RAW raw.c
parameterBlockId dataCcBiasMap: biasParameterId bias.c
exposureCcFaint: parameterBlockId event.c
loadTeBlock bepPackingMode BEP_TE_MODE_FAINT event.c
BEP_TE_MODE_FAINTBIAS
BEP_TE_MODE_GRADED
commandOpcode CMDOP_LOAD_TE bias.c
event.c
hist.c
raw.c
fepMode FEP_TE_MODE_EV3x3 event.c
FEP_TE_MODE_HIST hist.c
FEP_TE_MODE_RAW raw.c
parameterBlockId dataTeBiasMap: biasParameterId bias.c
exposureTeFaint: parameter BlockId event
exposureTeFaintBias: parameterBlockId
exposureTeHistogram: parameterBlockId hist.c
subarrayRowCount dataTeBiasMap: rowsPerBias bias.c
pramReadReply
sramReadReply
ccdId last packet of same type within multi-packet group from this DEA memory.c
commandId
requestedIndex
requestedWordCount
scienceReport biasErrorCount bias error count science.c
biasParameterId value in previous exposure record(s)
biasStartTime
exposuresProduced exposure counters
exposuresSent
parameterBlockId value in previous exposure record(s)
runStartTime
windowBlockId

Considerate la vostra semenza:
fatti non foste a viver come bruti,
ma per seguir virtute e canoscenza.


*Table of Contents Previous Chapter *Next Chapter
Peter G. Ford
Last modified: Fri Jun 20 19:36:21 EDT