NSDRP was developed by the Keck Observatory Archive. KOA is a collaboration between the NASA Exoplanet Science Institute and the W. M. Keck Observatory. NExScI is sponsored by NASA’s Exoplanet Program and operated by the California Institute of Technology in coordination with the Jet Propulsion Laboratory. Please contact the KOA Help Desk with q…
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
__pycache__ Updated code abse to Python3 May 22, 2017
rawfits Added files via upload Feb 24, 2016
sample_products Updated code abse to Python3 May 22, 2017
.DS_Store Updated code abse to Python3 May 22, 2017
DrpException.py Reject orders with large trace fit residuals Mar 16, 2016
Flat.py Add files via upload May 18, 2017
FlatCacher.py Updated code abse to Python3 May 22, 2017
FlatOrder.py Merge 0.9.14 with master Mar 14, 2017
GratingEq.py Add files via upload May 18, 2017
Line.py Merge 0.9.14 with master Mar 14, 2017
NSDRP-Data-Products.pdf Updated documents May 19, 2017
NSDRP-Software-Design.pdf Updated documents May 19, 2017
NirspecConfig.py Updated code abse to Python3 May 22, 2017
Order.py Merge 0.9.14 with master Mar 14, 2017
README.md Create README.md Jun 13, 2017
RawDataSet.py Merge 0.9.14 with master Mar 14, 2017
ReducedDataSet.py Merge 0.9.14 with master Mar 14, 2017
WaveCalTable.py merge 0.9.13 with master Jul 27, 2016
check_modules.py Updated code abse to Python3 May 22, 2017
config.py Add files via upload May 18, 2017
cosmics.py Updated code abse to Python3 May 22, 2017
create_raw_data_sets.py Updated code abse to Python3 May 22, 2017
dgn.py Merge 0.9.14 with master Mar 14, 2017
extract_order.py envar for OH filename Mar 18, 2016
grating_eq.py 0.9.11 to master, second attempt Apr 6, 2016
gui.py Initial Aug 24, 2017
image_lib.py Added Try/Except for TypeError Nov 6, 2017
ir_ohlines.dat Added files via upload Feb 24, 2016
log2csv.py merge 0.9.13 with master Jul 27, 2016
nirspec_constants.py Update nirspec_constants.py Apr 20, 2017
nirspec_lib.py Merge 0.9.14 with master Mar 14, 2017
nsdrp.py Add files via upload May 18, 2017
nsdrp_cmnd.py Update nsdrp_cmnd.py Apr 19, 2017
nsdrp_koa.py Updated code abse to Python3 May 22, 2017
product_lib.py Merged 0.9.11 with master Apr 6, 2016
products.py Updated code abse to Python3 May 22, 2017
readme.txt Update readme.txt Mar 14, 2017
reduce_frame.py Updated code abse to Python3 May 22, 2017
reduce_order.py Merge 0.9.14 with master Mar 14, 2017
tracer.py long slit trace improvements Nov 5, 2015
wavelength_utils.py Updated code abse to Python3 May 22, 2017

README.md

nsdrp

PREREQUISITES:

  1. NSDRP was developed with Anaconda python and that distribution is recommended, but can be run with Ureka or other python installations. Anaconda comes installed with the required modules: numpy, os, math, subprocess, fnmatch, logging, pylab, errno, datetime, warnings, astropy, scipy, argparse, and statsmodels. Depending on your python distribution of choice, you may be required to manually download and install one or more of these modules.

  2. Verify correct installation by typing "python" on the command line. The terminal will display the version number and the distribution, i.e. Python2.7.8, Anaconda 2.1.0, etc. To verify installation of the required python modules, please refer to step one in the EXECUTING NSDRP section below.

  3. The NSDRP software is maintained on GitHub. Download the code from https://github.com/Keck-DataReductionPipelines/NIRSPEC-Data-Reduction-Pipeline.git and install by decompressing the folder in the directory of your choice.

CONSTRAINTS:

The NSDRP is designed to be fully automated to run without any user's interaction. In addition, it is intended to produce only quick-look, browse extracted spectra for the purpose of assessing the scientific quality and content of the raw data. It may not be able to reduce all types of NIRSPEC data. Specifically, it can only reduce data obtained in high-dispersion mode, and is optimized for and works best on frames having:

  • single point source in slit
  • reasonably bright targets with detectable continuum
  • NIRSPEC-1 through NIRSPEC-7 filters
  • well-separated orders without overlapping
  • sufficient exposure times (~> 30s) with detectable sky lines

Finally, the NSDRP should be run only on files downloaded from the Keck Observatory Archive (KOA, http://koa.ipac.caltech.edu/) since it needs to know the correct image type (on-sky object or calibrations) of the data frames. Only NIRSPEC files ingested into the archive are guaranteed to contain this information.

EXECUTING NSDRP:

  1. Simple command line usage: python nsdrp.py in_dir out_dir

    Note that you must provide the full directory path of the python file (nsdrp.py) if your current working directory is not the source code.

    Any required python packages that are not installed will be printed on the terminal console and NSDRP will halt execution.

    OH sky lines are used to refine the theoretical wavelength scale. These lines are listed in the ir_ohlines.dat file which is included in the download. In case you would like to use a different file, it can be specified by using an additional command line argument described in advanced usage.

    in_dir: Path to directory which contains the raw FITS files to be reduced. This must include at least 1 object frame and 1 flat image. For testing purposes, two sample NIRSPEC files are included in the download under the directory 'rawfits'. To check that the installation is successful, try running the pipeline on this directory and verify that it completes without any errors. The descriptions of the output products are provided in the document NSDRP.Products.pdf.

    out_dir: Path to the root of the output directory to use for storage of generated data products. This directory will be created if it does not pre-exist.

  2. Advanced Usage

    Additional command line arguments are available. These are listed and described after executing: python nsdrp.py -h