-
Notifications
You must be signed in to change notification settings - Fork 0
Installing and Setting Up Plotspec
kfkaplan edited this page Feb 1, 2020
·
4 revisions
- Python (version 3.7 or later)
- Anaconda (https://anaconda.org) is the recommended python environment. Other python setups might work, but people have had issues in the past with other setups.
- DS9 (version 7.2 or later) for viewing results
- XPA for scripting DS9
- https://github.com/ericmandel/xpa
- On Mac OS use macports or brew to install. Use apt-get to install for ubuntu.
- Astropy
- Install with conda
- http://www.astropy.org/
- Pyregion
- Install with pip
- https://pyregion.readthedocs.io/en/latest/
- pyds9
- Install with pip
- https://github.com/ericmandel/pyds9
- Pylab
- Should come installed with anaconda, if not install with conda
- http://wiki.scipy.org/PyLab *Scipy
- Should come installed with anaconda, if not install with conda
- http://www.scipy.org/
- Numpy
- Should come installed with anaconda, if not install with conda
- http://www.numpy.org
- Bottleneck
- Should come installed with anaconda, if not install with conda
- http://berkeleyanalytics.com/bottleneck/
- Not required, but highly recommended. Set of fast numerical functions, greatly speeds up the code at various places
You can either:
- Clone this github repo:
git clone git@github.com:kfkaplan/plotspec.git - Download a zip file of the plotspec repo: https://github.com/kfkaplan/plotspec/archive/master.zip
Once you have made a copy of the code, place it in your favorite directory.
Once the code has been copied to your computer open up plotspec.py in a text editor and modify the following global variables near the top of the code to match your setup:
- pipeline_path - Set this to the directory of the IGRINS Pipeline (PLP), needed to read in the reduced spectra.
- save_path - This is a directory where plotspec.py will create and store various temporary files. Can be set to plotspec's own directory if desired, but you might want to put it somewhere else to avoid clutter.
- default_wave_pivot - Cut in wavelength space between overlapping orders when stitching orders together, 0.0 is blue side, 1.0 is red side, 0.5 is in the middle. Currently it set to 0.85, but you can modify it.
- set_velocity_range - Positive and negative edge in velocity space (km/s) for interpolating lines onto position-velocity diagrams. Default +/- 100 km/s.
- set_velocity_res - Resolution of velocity grid in km/s, on which all lines are interpolated onto. Default set to 1 km/s.
- slit_length - Number of pixels in the spatial axis along slit in both H and K bands
- block - Number of pixels used in the window (or block) for the running median smoothing filter for continuum subtraction or normalization, currently set to 750 but you can modify if you wish to tweak the continuum subtraction or smoothing done inside plotspec.
- You can ignore the cosmic ray global variables unless you want to try the (experimental) cosmic ray removal routine. Use at own risk.
Open up h2.py in a text editor and modify the following global variables near the top of the code to match your setup:
- cloudy_dir Directory where Cloudy models reside, if you wish to import any
- If you want to modify the extinction global variables, contact Kyle Kaplan (kkaplan@usra.edu) for guidance