Take the 2-minute tour ×
Astronomy Stack Exchange is a question and answer site for astronomers and astrophysicists. It's 100% free, no registration required.

Is there any handy module to detect emission lines in a spectrum like one we get from the Sloan Digital Sky Survey (SDSS)?

You can see there are many emission lines like Ha,OI in the spectrum below. In fact the spectrum is a two column data set, wavelength and flux. It is a combination of lots of scatter points. The typical interval between two points nearyby is 1.5 angstroms. I need to find all the Gaussian bumps and their line center.

So,first I need to find the the bumps and then I need to fit them to get their centers.

enter image description here

share|improve this question
    
I could probably give you a detailed answer if you tell me what you want to do with the spectrum. Rigorous spectrum analysis is not usually a trivial affair. –  Moriarty Oct 22 '13 at 3:21
    
I have updated my post.Maybe it is easy to understand now. –  questionhang Oct 22 '13 at 8:29
add comment

3 Answers

The programs I am aware of that you could use do require some programming expertise to operate. I would recommend looking at either IRAF (or PyRAF, which uses Python to interface with IRAF), or SPECTRE. Unfortunately, I'm not aware of a "black box" solution where you can just press a button and go.

SPECTRE is written in FORTRAN77 and is quite easy to use once you get the hang of it, though it has a somewhat limited feature set and the documentation is brief. It will help you to manually fit Gaussians to spectral lines, giving their central wavelengths and equivalent widths. A caveat for SPECTRE is that it requires the plotting package SuperMongo, which is not free software. If you are affiliated with a university, most Physics and Astronomy departments should have a license.

IRAF is a quite fully-featured, free, cross-platform application purposefully built for astronomical image analysis. It can help you measure the spectral lines, and can analyse the spectrum to determine the object's radial velocity.

share|improve this answer
    
how about writing our own python code to do it?All we have to do is analyse lots of wavlength-flux data sets from lots of spectra. –  questionhang Oct 22 '13 at 10:09
    
Go for it. Often it's easiest to write your own code, especially if you have large data sets to crunch through. –  Moriarty Oct 22 '13 at 11:03
    
First find a local maximum and then fit it with a Gaussian profile. This method is too easy to believe. Anything I miss? –  questionhang Oct 22 '13 at 12:12
1  
Yep, that's just about it. If you want to find local maxima computationally, applying some median smoothing (depending on noise levels) and then using its derivatives can work well. This piece of code does just that (I don't think it would work well for what you want as-is, though it will serve as a working example of what you might want to do). adsabs.harvard.edu/abs/2007A%26A...469..783S –  Moriarty Oct 22 '13 at 21:55
    
Thank you very much.It is very helpful. –  questionhang Oct 23 '13 at 16:28
add comment

Yes, there is are two python modules called astropy, and astropysics that both claim to have spectral analysis tools. As a reference, here is a link for resources for astronomers for the python programming language.

share|improve this answer
add comment

There are plenty of softwares and tools available to do what you want:

  • IRAF, by NOAO;
  • MIDAS which is basically very similar to IRAF but developped by ESO;
  • in Python, either astropy or pyRAF (to use IRAF with a Python interface).

I would go with some Python tools (Python is more versatile than IRAF or MIDAS that are much more "single-purpose" oriented), to benefit from the other features offered by Python.

But to plot and process your spectrum is just the first part of the work, what you would probably want to do in the end is to use spectral synthesis, to analyze your spectrum. Spectral synthesis will allows you:

  • to identify efficiently the chemical composition of the celestrial object you study;
  • to determine some properties of the celestrial object you study.

Among the existing tools for spectral synthesis (for stellar spectra for example), there are:

share|improve this answer
    
Thanks. I just want to know the positions of line center. –  questionhang Oct 22 '13 at 14:12
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.