Prerequisites:
- Python 2.7.8 and Anaconda 2.1.0 are the recommended versions for running NSDRP, as those are the versions it was developed with. NSDRP will run on the latest Anaconda release, version 4.3.1. You can get Anaconda from https://www.continuum.io/donwloads. NSDRP requires several Python modules and Anaconda comes installed with all of them.
- NSDRP will run on MacOS, Windows or Linux based systems.
- NSDRP can be run on the standard Python installation, but additional modules may need to be installed. Python version 2.6.1 is the earliest known and tested release which is compatible with NSDRP. NSDRP will not run using Python 3.
- 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.
Installation:
Additional information can be found in the troubleshooting guide.
- NSDRP can be cloned or downloaded from GitHub:
git clone https://github.com/Keck-DataReductionPipelines/NIRSPEC-Data-Reduction-Pipeline.git
Download from https://github.com/Keck-DataReductionPipelines/NIRSPEC-Data-Reduction-Pipeline and unzip the prepared NIRSPEC-Data-Reduction-Pipeline_master.zip file
- To verify the installation, change directory to where the source files exist and run
python nsdrp.py rawfits test_output
Output will be written to the test_output directory and can be compared with the products in the downloaded sample_products.zip file.
Any required Python modules that are not installed will be printed to the terminal and NSDRP will halt execution.
There are two ways to run NSDRP:
The following arguments are required:nsdrp flat object [-b nod_pair]
The following arguments are required:nsdrp.py input_dir output_dir
For testing, the NSDRP download from GitHub includes a rawfits directory with some sample FITS files. Executing the following commandnsdrp.py -h or --help
usage: nsdrp.py [-h] [-debug] [-verbose] [-subdirs] [-dgn] [-npy] [-no_cosmic] [-no_products] [-obj_window OBJ_WINDOW] [-sky_window SKY_WINDOW] [-sky_separation SKY_SEPARATION] [-oh_filename OH_FILENAME] [-int_c] [-lla LLA] [-pipes] [-shortsubdir] [-ut UT] [-gunzip] [-spatial_jump_override] [-out_dir OUT_DIR] [-b B] [-jpg] arg1 arg2 NSDRP positional arguments: arg1 input directory (KOA mode) | flat file name (cmnd line mode) arg2 output directory (KOA mode) | object file name (cmnd line mode) optional arguments: -h, --help show this help message and exit -debug enables additional logging for debugging -verbose enables output of all log messages to stdout, always true in command line mode -subdirs enables creation of per object frame subdirectories for data products,ignored in command line mode -dgn enables storage of diagnostic data products -npy enables generation of numpy text files for certain diagnostic data products -no_cosmic inhibits cosmic ray artifact rejection -no_products inhibits data product generation -obj_window OBJ_WINDOW object extraction window width in pixels -sky_window SKY_WINDOW background extraction window width in pixels -sky_separation SKY_SEPARATION separation between object and sky windows in pixels -oh_filename OH_FILENAME path and filename of OH emission line catalog file -int_c revert to using integer column values in wavelength fit -lla LLA calibration line location algorithm, 1 or [2] -pipes enables pipe character seperators in ASCII table headers -shortsubdir use file ID only, rather than full KOA ID, for subdirectory names, ignored in command line mode -ut UT specify UT to be used for summary log file, overrides auto based on UT in first frame -gunzip forces decompression of compressed FITS files, leaves both the .gz and .fits files in the source directory. Note that the compressed files can be read directly, so it is not necessary to decompress them. -spatial_jump_override inhibit rejection of order edge traces based on 'jump' limit) -out_dir OUT_DIR output directory in command line mode [.], ignored in KOA mode -b B filename of frame B in AB pair -jpg store preview plots in JPG format instead of PNG
will result in the data products listed below. For a direct comparison, the actual data products are part of the NSDRP downloand and can be found in the sample_products.zip file.nsdrp.py -oh_filename /path/to/ir_ohlines.dat /path/to/rawfits /your/output/path
/your/output/path/log NS.20100429.log
NS.20100429_summary.csv
NS.20100429.40280.log
/your/output/path/flats NS.20100429.32524_flat_0.log
NS.20100429.32524_flat_0.fits
/your/output/path/fitstbl/profile NS.20100429.40280_50_profile_tbl.fits
NS.20100429.40280_49_profile_tbl.fits
NS.20100429.40280_48_profile_tbl.fits
NS.20100429.40280_47_profile_tbl.fits
NS.20100429.40280_46_profile_tbl.fits
NS.20100429.40280_45_profile_tbl.fits
NS.20100429.40280_44_profile_tbl.fits
NS.20100429.40280_43_profile_tbl.fits
/your/output/path/fitstbl/wavecal NS.20100429.40280_wavecal_tbl.fits
/your/output/path/fitstbl/flux NS.20100429.40280_50_flux_tbl.fits
NS.20100429.40280_49_flux_tbl.fits
NS.20100429.40280_48_flux_tbl.fits
NS.20100429.40280_47_flux_tbl.fits
NS.20100429.40280_46_flux_tbl.fits
NS.20100429.40280_45_flux_tbl.fits
NS.20100429.40280_44_flux_tbl.fits
NS.20100429.40280_43_flux_tbl.fits
/your/output/path/fits/snr NS.20100429.40280_50_snr.fits
NS.20100429.40280_49_snr.fits
NS.20100429.40280_48_snr.fits
NS.20100429.40280_47_snr.fits
NS.20100429.40280_46_snr.fits
NS.20100429.40280_45_snr.fits
NS.20100429.40280_44_snr.fits
NS.20100429.40280_43_snr.fits
/your/output/path/fits/profile NS.20100429.40280_50_profile.fits
NS.20100429.40280_49_profile.fits
NS.20100429.40280_48_profile.fits
NS.20100429.40280_47_profile.fits
NS.20100429.40280_46_profile.fits
NS.20100429.40280_45_profile.fits
NS.20100429.40280_44_profile.fits
NS.20100429.40280_43_profile.fits
/your/output/path/fits/order NS.20100429.40280_50_order.fits
NS.20100429.40280_49_order.fits
NS.20100429.40280_48_order.fits
NS.20100429.40280_47_order.fits
NS.20100429.40280_46_order.fits
NS.20100429.40280_45_order.fits
NS.20100429.40280_44_order.fits
NS.20100429.40280_43_order.fits
/your/output/path/fits/sky NS.20100429.40280_50_sky.fits
NS.20100429.40280_49_sky.fits
NS.20100429.40280_48_sky.fits
NS.20100429.40280_47_sky.fits
NS.20100429.40280_46_sky.fits
NS.20100429.40280_45_sky.fits
NS.20100429.40280_44_sky.fits
NS.20100429.40280_43_sky.fits
/your/output/path/fits/flux NS.20100429.40280_50_flux.fits
NS.20100429.40280_49_flux.fits
NS.20100429.40280_48_flux.fits
NS.20100429.40280_47_flux.fits
NS.20100429.40280_46_flux.fits
NS.20100429.40280_45_flux.fits
NS.20100429.40280_44_flux.fits
NS.20100429.40280_43_flux.fits
/your/output/path/fits/trace NS.20100429.40280_50_trace.fits
NS.20100429.40280_49_trace.fits
NS.20100429.40280_48_trace.fits
NS.20100429.40280_47_trace.fits
NS.20100429.40280_46_trace.fits
NS.20100429.40280_45_trace.fits
NS.20100429.40280_44_trace.fits
NS.20100429.40280_43_trace.fits
/your/output/path/previews/profile NS.20100429.40280_50_profile.png
NS.20100429.40280_49_profile.png
NS.20100429.40280_48_profile.png
NS.20100429.40280_47_profile.png
NS.20100429.40280_46_profile.png
NS.20100429.40280_45_profile.png
NS.20100429.40280_44_profile.png
NS.20100429.40280_43_profile.png
/your/output/path/previews/trace NS.20100429.40280_50_trace.png
NS.20100429.40280_49_trace.png
NS.20100429.40280_48_trace.png
NS.20100429.40280_47_trace.png
NS.20100429.40280_46_trace.png
NS.20100429.40280_45_trace.png
NS.20100429.40280_44_trace.png
NS.20100429.40280_43_trace.png
/your/output/path/previews/sky NS.20100429.40280_50_sky.png
NS.20100429.40280_49_sky.png
NS.20100429.40280_48_sky.png
NS.20100429.40280_47_sky.png
NS.20100429.40280_46_sky.png
NS.20100429.40280_45_sky.png
NS.20100429.40280_44_sky.png
NS.20100429.40280_43_sky.png
/your/output/path/previews/order NS.20100429.40280_50_order.png
NS.20100429.40280_49_order.png
NS.20100429.40280_48_order.png
NS.20100429.40280_47_order.png
NS.20100429.40280_46_order.png
NS.20100429.40280_45_order.png
NS.20100429.40280_44_order.png
NS.20100429.40280_43_order.png
/your/output/path/previews/snr NS.20100429.40280_50_snr.png
NS.20100429.40280_49_snr.png
NS.20100429.40280_48_snr.png
NS.20100429.40280_47_snr.png
NS.20100429.40280_46_snr.png
NS.20100429.40280_45_snr.png
NS.20100429.40280_44_snr.png
NS.20100429.40280_43_snr.png
/your/output/path/previews/flux NS.20100429.40280_50_flux.png
NS.20100429.40280_49_flux.png
NS.20100429.40280_48_flux.png
NS.20100429.40280_47_flux.png
NS.20100429.40280_46_flux.png
NS.20100429.40280_45_flux.png
NS.20100429.40280_44_flux.png
NS.20100429.40280_43_flux.png
/your/output/path/ascii/wavecal NS.20100429.40280_wavecal.txt
/your/output/path/ascii/flux NS.20100429.40280_50_flux.txt
NS.20100429.40280_49_flux.txt
NS.20100429.40280_48_flux.txt
NS.20100429.40280_47_flux.txt
NS.20100429.40280_46_flux.txt
NS.20100429.40280_45_flux.txt
NS.20100429.40280_44_flux.txt
NS.20100429.40280_43_flux.txt
/your/output/path/ascii/profile NS.20100429.40280_50_profile.txt
NS.20100429.40280_49_profile.txt
NS.20100429.40280_48_profile.txt
NS.20100429.40280_47_profile.txt
NS.20100429.40280_46_profile.txt
NS.20100429.40280_45_profile.txt
NS.20100429.40280_44_profile.txt
NS.20100429.40280_43_profile.txt
Please also acknowledge the PI(s) of datasets that have been obtained through KOA.