wiki:HetProcedures/RA/lrs2

Version 37 (modified by sir, 8 years ago) (diff)

--

LRS2 Operating Procedures

The LRS2 instrument is controlled by the lrs2.as.utexas.edu system under the hetdex user.

Startup

Ion Pump and Vacuum Gauge

From the RA launcher under Engineering bring up the APC gui.

At the start of the night turn off the Lrs2B-IONPump, Lrs2R-IONPump, and Lrs2-VacuumGage?. If you fail to turn off these you will have extra light evident in the dark frames and science frames. The image below shows the state of the APC LRS2 column when done.

APC Gui LRS2 column when ready to start LRS2 activities

Starting the Servers

The camra_server and camra_monitor should be running at all times on lrs2, thus no action from the RA should be required.

If you want to check on these servers try:

hetdex@lrs2 ~]$ ps -ef | grep -i camra
hetdex    8817     1  3 19:27 ?        00:00:02 /home/hetdex/code/het/trunk/camra/camra_server -c /home/hetdex/code/het/trunk/camra/testing/lrs2-het.conf
hetdex    8847     1  0 19:27 ?        00:00:00 python /home/hetdex/code/het/trunk/camra/testing/lrs2_monitor_temperatures.py
hetdex    8867  8407  0 19:28 pts/2    00:00:00 grep -i camra 

Below are the Linux init scripts are used to start the data acquisition server and temperature monitor on lrs2. If needed this should be run on lrs2.

$ sudo /etc/init.d/camra_server_start.sh
$ sudo /etc/init.d/camra_monitor

Setting up monitoring

It is useful to pull some logging output to the RA console to be able to follow what is going on with the instruments. The easiest way is using jrf's monitor command:

$ monitor -v -P -V -l --key-filter 'log_.*' --log-print

This will collate the log output from the lrs2, vdas, and pfip systems on one screen. It is recommended this be run from a terminal on mcs.

On another terminal, start a monitor that shows tcs activity (note the different filter, we're excluding debug messages here):

$ monitor -v -T --key-filter 'log_[^d].*' --log-print

Calibrations

Calibration Script

A prototype calibration script is available that can calibrate VIRUS and LRS2. This script attempts to expose all known supported FCU configurations as well as darks and biases. The console output of the script provides a log of the calibration process so it is recommended to capture the output to a log file via tee.

For BASH shell

$ rm cal.py.db; $HET_SRC_ROOT/integration/cal.py -i lrs2  -l lamp1a lamp1b lamp5b ldls -o 101 -n 11  2>&1 | tee lrs-cal.log

For CSH shell

$ rm cal.py.db; $HET_SRC_ROOT/integration/cal.py -i lrs2  -l lamp1a lamp1b lamp5b ldls -o 101 -n 11 |& tee lrs-cal.log

NB

  • run one lamp at a time for now
  • in case of any problem try to get hardware status of instruments. if got problem try to kill and start camra_server on lrs2

The above will expose the lamp1a lamp1b lamp5b ldls (Hg Cd Qth ldls) as observation 101 (and subsequent numbers) and take 11 darks and biases at the end. This is the standard calibration sequence for LRS2. For VIRUS, we leave out the Qth.

Calling the script with --help produces more information:

$ $HET_SRC_ROOT/integration/cal.py --help
usage: cal.py [-h] -i {lrs2,virus} [-l LAMPS [LAMPS ...]] [-o OBS] [-N NLAMP]
              [-n NDARK] [--dry-run]

VIRUS and LRS2 Calibration Script.

optional arguments:
  -h, --help            show this help message and exit
  -i {lrs2,virus}, --instrument {lrs2,virus}
                        Instrument to expose. Must be virus or lrs2
  -l LAMPS [LAMPS ...], --lamps LAMPS [LAMPS ...]
                        List of lamps to expose, e.g. '-l lamp1a lamp3a'. The
                        default list is all lamps: ['lamp1a', 'lamp1b',
                        'lamp5b', 'ldls']
  -o OBS, --obs OBS     Observation number to start with, defaults to 101.
  -N NLAMP, --nlamp NLAMP
                        Number of exposures to take for each lamp, defaults to
                        1. A value of 0 means no bias or dark exposures will be taken.
  -n NDARK, --ndark NDARK
                        Number of darks and biases to take, defaults to 11.
                        Give 0 for no exposures.
  --dry-run             Print actions without executing commands on the
                        hardware.

The list of lamp combinations is spelled out in a table at the beginning of the script. That table also sets the exposure times and warmup times for the lamps.

Use the --dry-run option to see what the script would do given some options without actually executing any commands on the hardware.

Taking Science Exposures

There are many ways to take an exposure, the simplest uses Python to issue the expose command.

# LRS2:
$ syscmd -v -l 'expose( seconds=20, observation=1234, exposure=1, x_binning=1, y_binning=1, type="sci" )'

or

$ $HET_SRC_ROOT/camra/testing/lrs2.py  'expose( seconds=20, observation=1234, exposure=1, x_binning=1, y_binning=1, type="sci" )'

The exposure command will return once the readout has started. The output FITS files will be available 40-50 seconds after that, depending on binning and disk I/O. The return string of the expose command provides the output directory for that exposure.

The exposure time is in the "seconds" parameter (minimum of 15).

Observation and exposure determine the directories under which the data are grouped. An example output directory structure might be

/opt/data/20160309/lrs20000023/exp01/
                              /exp02/

So here two exposures are grouped under the observation number 23 taken on 20160309.

The combination of observation/exposure must be unique for the UTC date. The agreed upon types are "sci", "cmp", "zro", "flt", "drk", "tst".

Checking Hardware Status

$ syscmd -v -l 'get_hardware_status( update_state="true" )'
$ syscmd -v -V 'get_hardware_status( update_state="true" )'

The status may be queried mid-exposure by omitting the update_state parameter.

Additional Help

Help for the complete set of CAMRA commands can be obtained by issuing a 'help()' command to the CAMRA subsystem.

$ syscmd -v -l 'help()'

End of Night Procedures

Ion Pump and Vacuum Gauge

From the RA launcher under Engineering bring up the APC gui.

At the end of operations turn on the Lrs2B-IONPump, Lrs2R-IONPump, and Lrs2-VacuumGage?. The image below shows the state of the APC LRS2 column when done.

APC LRS2 column when done with operations

The Servers

Please leave the servers and monitors up at the end of the night so that they can check on the health of the instrument. You can see if they are running with:

hetdex@lrs2 ~]$ ps -ef | grep -i camra
hetdex    8817     1  3 19:27 ?        00:00:02 /home/hetdex/code/het/trunk/camra/camra_server -c /home/hetdex/code/het/trunk/camra/testing/lrs2-het.conf
hetdex    8847     1  0 19:27 ?        00:00:00 python /home/hetdex/code/het/trunk/camra/testing/lrs2_monitor_temperatures.py
hetdex    8867  8407  0 19:28 pts/2    00:00:00 grep -i camra 

Attachments (5)

Download all attachments as: .zip