PRIMUS autologger instructions

From NYU CCPP Wiki

Contents

Running the PRIMUS autologger

We have developed a script that will monitor a directory for new IMACS images and automatically update a ASCII log that can then be edited with comments. Please put all comments that you would write on a paper log into this electronic log (seeing, weather, notes on individual exposures, etc.). Below are the instructions to set up the logger and run it on a night of data. If you have problems running the code, let Richard know.

Setup SSH keys

The first step is to provide SSH keys between burro and llama.

On burro :

ssh-keygen -t dsa
scp .ssh/id_dsa.pub llama:burro.key

On llama :

ssh-keygen -t dsa
scp .ssh/id_dsa.pub burro:llama.key
cp burro.key .ssh/authorized_keys2

On burro :

cp llama.key .ssh/authorized_keys2

Now, SSH and RSYNC can be run between the two computers without passwords.

Set up data transfer

The code $PRIMUS_DIR/bin/check_for_data.sh will do this rsync job for you. There are many hardwired entries in this code for now. You should edit the following lines:

inpath = "/d1/obsmag1b/CC/"

Inpath should be changed to the full path to the raw data directories on llama. For example, the default location for data taken on ut061223 would be /d1/obsmag1b/CC/ut061223.

user1="obsmag1b"

User1 should be set to the user name given to us for this run.

Running the transfer

The best way to run the autologger is to couple it with the code that pulls the data from llama to burro. The code run_daemon will sync the data automatically every minute and then run the autologger if needed. After setting everything up as directed above, running this is simple

IDL > run_daemon, date, polltime=polltime

Here date is the numeric date for the night (this means 061223 not ut061223). Polltime is how often, in minutes, llama should be checked for new data. The default is 1 minute. The data will be downloaded to $PRIMUS_RAWDATA/utDATE directory and the file utDATE.obslog will contain the logged information. Each time the logger is run, the new entries are appended to the old log, so any changes you make are preserved. If you add comments to the log (in a text editor like Emacs), be sure to save each change. Also, be sure to reload the file from disk before adding comments to be sure you are working on the most up-to-date version of the log.

If you end up re-taking an exposure (for example you are taking image 100 as a flat, but your first attempt is saturated, so you move the image counter back one retake exposure 100), you can simply delete the corresponding line in the log. When the new image 100 is read out, that information will be added to the log. Otherwise, the information for the original exposure 100 will remain in the log.