3 Running ORAC-DR

This is a very brief introduction to running Orac-dr. More detailed information can be found in SUN/230. SUN/232 also includes a description of how to set up and run Orac-dr.

These instructions assume that you are using the tcsh shell as this is what the pipeline wrappers have been written in and have the Starlink software already setup (this is normally done in the users’ setup files e.g. in  /.tcshrc) but if this has not be done, you can get things setup by issuing the following commands (this assumes the Starlink software has been installed in /git-star):

        $ tcsh
        % setenv STARLINK_DIR /git-star
        % source $STARLINK_DIR/etc/cshrc
        % source $STARLINK_DIR/etc/login

You must first initialise Orac-dr using source eng/Setup_Night_ORAC.csh <UTdate> <camera>. This will prepare Orac-dr to reduce data taken that night. If necessary, you should set the $ORAC_DATA_IN and $ORAC_DATA_OUT environment variables to the names of the directories from which the raw data should be read and to which reduced data should be written.

For example:

        % source ~eng/Setup_Night_ORAC.csh 20140511 kb74

This will setup the necessary environment variables (as detailed in Section 2.2) to enable the pipeline to run properly. It is also possible to redefine the enviroment variables to read and/or write from different locations or to use a different calibration library for example. (To see a list of all the enviroment variables that were setup, you could issue the following command:

        % printenv | grep "ORAC\|FINAL"
        FINAL_DATA_OUT=/mnt/images/daydirs/kb74/20140511/oracproc
        ORAC_CAL_ROOT=/data/tlister/SVN/LCO_Pipeline/trunk/code/oracdr/cal
        ORAC_CAMERACODE=kb74
        ORAC_DATA_CAL=/data/tlister/SVN/LCO_Pipeline/trunk/code/oracdr/cal/lcosbig/kb74
        ORAC_DATA_IN=/mfs-sba/engineering/elp/kb74/20140511/raw
        ORAC_DATA_OUT=/speedy/eng/elp/proc/kb74/20140511
        ORAC_DIR=/data/tlister/SVN/LCO_Pipeline/trunk/code/oracdr/src/
        ORAC_INSTRUMENT=LCOSBIG
        ORAC_LOOP=flag -skip
        ORAC_NFS_OK=1
        ORAC_PERL5LIB=/data/tlister/SVN/LCO_Pipeline/trunk/code/oracdr/src/lib/perl5/
        ORAC_PERSON=tlister@lcogt.net
        ORAC_SITECODE=elp

To reduce all data for a given night you should run

        oracdr -log f -verbose -file <filename of frames>

This will not normally produce much (if any) output to the screen as the pipeline is designed to be run non-interactively. The pipeline will reduce the data in the order they are specified in the file given after the -file option, using the recipe name given in the image header. Details of the processing will be written to a logfile called .oracdr_NNNN.log where NNNN is the current process ID. It is written to $ORAC_DATA_OUT and is a hidden file (use e.g. % ls -ltrA .oracdr* to see them with the most recent files at the bottom).

Additional information about the processing can be seen by starting oracdr with the -log fx option which will open a X window for the log which has the advantage that warnings and errors are written to different, independently scrollable windows and the reduction can be paused and restarted.

You may choose to reduce your data with a recipe other than the one specified in the file headers. If you wished to test data reduction with a new SCAMP-based astrometric solver you had written, you could specify the OFFLINE_REDUCTION_SCAMP recipe on the command line, for example:

        oracdr -log fx -verbose -debug -file OFFLINE_REDUCTION_SCAMP

(The -debug option will cause additional debug information such as each primitive call and timing information to be written into .oracdr_NNNN.log file and additionally into a ORACDR.DEBUG file in $ORAC_DATA_OUT).

To exit (or abort) Orac-dr click on ‘Exit’ in the text log window, or type [ctrl]-c in the xterm. The command oracdr_nuke can be used to kill all DR-related processes, should you be having serious problems.