Skip to content

Installing and Setting Up Plotspec

kfkaplan edited this page Feb 1, 2020 · 4 revisions

Plotspec requires the following applications that run from the command line

The following python libraries are required

Download

You can either:

Install

Once you have made a copy of the code, place it in your favorite directory.

Modify global variables in plotpsec.py

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.

Modify global variables in h2.py

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