Product: StdStarFieldPicker
Author:  Douglas Tucker (dtucker@fnal.gov)
Created: 13 September 2012
Updated: 24 October 2012
Updated: 25 February 2013 (added some March-August standards for CTIO)
Version: v0.99

This product contains python scripts to aid in finding appropriate 
standard star fields for DECam to observe at a given time.

1. INSTALLATION
===============

This product requires the following python modules to be on the PYTHONPATH:
* numpy
* pyephem  (http://rhodesmill.org/pyephem/index.html)  
* pyslalib (https://github.com/scottransom/pyslalib)

Download this product into any suitable directory on your machine, and
ensure the above modules are in your PYTHONPATH.

To run this code from any directory on your machine, place the following
in your .bashrc file:

  export PYTHONPATH=${MYCODE_DIR_HOME}/StdStarFieldPicker/py:${PYTHONPATH}
  export PATH=${MYCODE_DIR_HOME}/StdStarFieldPicker/py:${PATH}

where MYCODE_DIR_HOME is the directory where you placed this product's
main directory (StdStarFieldPicker).


2. CODE
=======

a. decamStdFieldsTimeDate.py 
----------------------------

This script outputs a list of high-priority and lower-priority
standard star fields for a given UT.

For more info, run the following command:

  decamStdFieldsTimeDate.py --help



b. decamQuickExpTimeLUT.py
--------------------------

This script outputs a quick lookup table of exposure times to 
reach a S/N=10, a S/N=100, and the saturation limit for a point
source observed by DECam, for point sources between mag=9.0 and 
mag=23.9  It is only a quick-and-dirty guide, as it currently 
ignores the effects of the Moon on sky brightess.

For more info, run the following command:

  decamQuickExpTimeLUT.py --help



c. decamCreateXEphemCat.py
--------------------------

This script creates a table of standard star fields and their
positions that can be read into xephem 
(http://www.clearskyinstitute.com/xephem/).
Once you have created it, you must copy the table into your
.xephem directory under your home directory for xephem to be
able to access it.

For more info, run the following command:

  decamCreateXEphemCat.py --help


d. decamStdFieldsQueryNextSet.py
--------------------------------

This script outputs the 3 "best" standard star fields --
one at low airmass, one at intermediate airmass, and one
at high airmass -- for either the beginning of the night,
or the middle of the night, or the end of the night.

For more info, run the following command:

  decamStdFieldsQueryNextSet.py --help


e.  decamStdFieldsPickOneByName.py 
----------------------------------

This script creates a json-formatted exposure list 
file for a single standard star chosen by name from
StdStarFieldPicker/data/stdStarFieldPicker.dat.
Note that only the SDSS equatorial fields cover all 
the CCDs in the focal plane.  For smaller fields 
(most of which are 10arcmin on a side), the output 
coordinates are shifted by 5 arcmin so that the stars 
are centered on CCD N4 (CCDNUM=35).

For more info, run the following command:

  decamStdFieldsPickOneByName.py --help