Skip to content

pavolgaj/spectroPy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

spectroPy

DOI Codacy Badge GitHub all releases

Calibration and manipulation with grating spectra in Python. Focused mainly on spectra obtained using StarAnalyser SA-100 and SA-200.

Requirements:

  • python
  • numpy
  • scipy
  • matplotlib
  • astropy

Recommended workflow:

  1. Take images of spectrum.
  2. Apply dark-frame and flat-field corrections, register and stack images etc. (optional).
  3. Extract L channel (optional).
  4. Extract line profile of image with 0th order a 1st order spectrum - use e.g. SAO DS9 or MaximDL.
  5. Start spectroPy: python spectroPy.py your_profile. Code reads CSV, text and FITS files.
  6. Run calibration of spectrum:
  • Use 1-point calibration if you know a spectral resolution of used equipment.
  • Use 2-points calibration otherwise.
  • If your image was color and there is three channels in your profile, you can run calibration for only one channel or for all channels separately (slower but more precise).
  1. Select region of profile with 0th order spectrum - use left mouse button to mark left border of this region and right button for right border.
  2. Check the fitted gauss profile. If it looks bad, try to select slightly different region of spectra (bigger or smaller).
  3. If you choosed 1-point calibration, add a spectral resolution in Angstrom per pixel.
  4. If you choosed 2-points calibration, select area with known spectral line (similarly to steps 7 and 8). And write the wavelength of this spectral line (in Angstrom).
  5. Now, you can crop your spectrum, plot it and save it to a CSV file, text file or FITS file.

About

Calibration and manipulation with grating spectra in Python.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages