sp_generate_model_OH_line_spectrum.pro

DPC 20060305

The sp_generate_model_OH_line_spectrum.pro program has two main uses:

  1. Modeling the OH emission lines of the night sky (and producing a spectrum for import into plotting/fitting packages)
  2. Determining the effective wavelengths of the blended OH emission line features at the observed resolution

Notes: This program is useful for generating OH night sky spectra that "look like" the ones Mimir collects. However, users are cautioned against using these model spectra as templates for correlating with their Mimir spectra. The *exact* spectral channel centers matter in the real observations, and that is not modeled here. Users wishing to establish Mimir spectroscopy dispersion equations through correlation with OH night sky spectra are advised to model the spectral resampling as part of their correlation analysis. This program is intended to serve a different purpose, that of helping to identify the effective wavelengths of the blended OH night sky features Mimir sees so to enable wavelength matching of model and observed features. This is a different approach to determination of dispersion equations than direct correlation.


Start Up

    1. Compile the IDL program and start it.
    2. It seeks access to any ASCII file of OH line wavelengths (in Angstroms) and line strengths. I have been using the Rousellot_OH_list_v2.0.dat file (note that it contains a request to reference the author of the file in publications resulting from use of the file).
    3. Enter the starting and ending wavelengths (in microns and separated by a comma)
    4. Enter the desired FWHM spectral resolution (in nanometers, note!) - for Mimir, use the 2-channel dispersion for most cases (e.g., 2.94 nm for H-band with the JHK grism and S1 slit)
    5. Enter the desired final spectral channel spacing (in nanometers) - for Mimir, use the 1-channel dispersion value

Convolved spectrum analysis

    1. The first displayed plot is a convolved spectrum, with the desired FWHM, but with 10x higher channel sampling than the final spectrum will have
    2. OH line centers are shown as vertical green lines. Note that many OH features may contribute to the convolved spectral features seen. Hence the effective wavelengths of these features will not match the the strongest OH line wavelength contributing to the smooth feature.
    3. To perform gaussian fitting of any convolved spectral feature, move the cursor and click at the peak of the desired feature
      1. A gaussian fit is performed, and if successful, the spectrum will be overlaid with a red curve indicating the fit
      2. The central wavelength of the gaussian fit is printed, as its wavelength uncertainty, and the strength of the feature
      3. If the gaussian fit fails to converge, a "bad fit" will be reported and the user can try again
      4. Fits will continue to be peformed as long a the cursor is within the plot boundaries when the mouse button is clicked.
    4. To exit this portion of the analysis, position the cursor outside the plot boundaries (but still within the window) and click a mouse button

Resampled spectrum analysis

    1. A second window will open which shows the convolved spectrum, resampled to the desired channel separation
    2. The convolved spectrum from the previous window can be overlaid on the current plot
      1. To do so, move the cursor to inside the plot boundaries and press a mouse button
    3. To save this model (convolved, resampled) spectrum, move the cursor outside the plot boundary (but still within this window) and click a mouse button

Saving the model OH sky spectrum

    1. The file chooser window will open and allow the user to save the current spectrum as an ASCII file of wavelength (in microns) and intensity