wiki:HetProcedures/RA/ocd

Observation Condition Decision tool (OCD)

Getting help

Help can be found at

http://www.mpe.mpg.de/~montefra/documentation/ocd/devel/index.html

After update, you might have to remake the OCD config file. Be sure to save a copy first and then run ocd config copy.

Running OCD

new AUTOMATIC procedure:

  • To run OCD use command (must be run as astronomer@vdas) run_ocd
    • It determines the correct sequence of a log file, and sym-links it to ~astronomer/ocd/OCD.log if you want to tail -f that.
    • archive previous for current UT night log and autoschedule_n_obs.dat files
    • update autoschedule_n_obs.dat and start OCD
  • To end the OCD process, you must use CTRL + \, as there is no better way to end the process. The killing terminal is not working.
    • script catching termination and add core dump into the archive as well, so at the end of a night we nave archive "archive/<UTD>.tar with all information about what happens to OCD during that night.
  • Can hear sounds and see critical messages on Zeus with hobswatch
  • To start/stop/abort OCD, can use simplify commands:
    • ocdstart
    • ocdstop
    • ocdabort

Detailed commands with configuration files can be found in the following section.


the old MANUAL procedure, retained for reference:

  • Go to the "ocd" directory
  • Run queue_short_list.php queue_short_list.php command to generate "autoschedule_n_obs.dat"
  • Check that the targets in "autoschedule_n_obs.dat" look good (generally this is fine in late 2019)
  • Then try ocd run --config ~/ocd/ocd.cfg to start OCD. To kill the OCD process do a cnrt+\.
  • If you want to save a log for engineering purposes try the following: ocd run --config ~/ocd/ocd.cfg |& tee logs/OCDlog_YYYYMMDD_X.txt where the X is the test number; note that this produces a pretty big log so keeping to a single track is probably a good idea and gzipping it before e-mailing it is also a good idea.

Starting OCD

  • Then to allow OCD to select hetdex fields you need to execute as astronomer@vdas: ocd allow_hetdex --config ~/ocd/ocd.cfg start
    • NOTE that you can start OCD in good conditions without metrology data from the probes, and it will assume perfect conditions
  • The best two tools to use are:
    • [astronomer@vdas ~]$ ocdwatch.py
    • [stevenj@zeus ~]$ ocdsounds
  • But you could also use the older methods of tailing the logs:
    • To see what commands OCD is executing in an observation use command: tail -f ~/ocd/OCD.log | grep 'run_shot\|QIDX'
    • To see what autoschedule is planning, use command: tail -f ~/ocd/OCD.log | grep Autoschedule

Stopping OCD

  • To stop OCD from choosing any additioal fields run ocd allow_hetdex --config ~/ocd/ocd.cfg stop
  • Note that this does not affect the current shot in progress.

Aborting OCD

  • To abort the current shot *and* stop OCD from choosing any additional fields run ocd allow_hetdex --config ~/ocd/ocd.cfg abort
  • This (should) completely and quickly stop OCD more gracefully (needs to be tested)
  • OCD will still be running after an "abort", and you can "start" it again if needed.

Running a shot manually ((unnecessary but retained for reference))

  • The RA and DEC must be in a floating-point format and should be taken from the .cfg file
  • shot number must be the target name from shuffle

To run a shot you first need to setup a shuffle run for that object. This should be done in ocd/shuffle/output. In that directory, you will also need to make a directory with the name of the object and move the .cfg file from the HETcommands directory into the shuffle directory.

Then look at the .cfg file and pull out the ra, dec and az from that file. fill in the fields like below:

ocd run_shot --config ~/ocd/ocd.cfg -ec -d yes sdss14n643 1001 12.241050 0.856717 144.9583 0 15 15 15

where the 0 is the Az indicator (E=0,W=1), 15 15 15 is the exposure time for exp01, exp02, exp03 and 1001 will be the observation number.

Running autoschedule manually ((unnecessary but retained for reference))

Looks at the shot list and for a given JD tries to pick all targets that should be observed after that JD for that night.

$CUREBIN/autoschedule_main -v -i /home/mcs/astronomer/ocd/autoschedule_init.dat -m /home/mcs/astronomer/ocd/moon_loc.dat /home/mcs/astronomer/ocd/autoschedule_n_obs.dat 2458136.793750 135 1.5 0.99 21.2

Updating OCD

If someone updates OCD, you may need to regenerate the ocd.cfg file. First, save a copy of the working version. Then create a new version with ocd config copy. You will then need to edit the new config copy with all of the old paths and settings. I do this by doing a diff between the new one and the saved copy.

Last modified 3 days ago Last modified on May 2, 2024 3:40:12 AM