Welcome to iraf.net Saturday, April 20 2024 @ 07:01 AM GMT


 Forum Index > Help Desk > Applications New Topic Post Reply
 splot - equivalent width
   
cosmologist
 01/17/2014 07:48AM (Read 6405 times)  
++++-
Regular Member
curious

Status: offline


Registered: 03/30/2009
Posts: 117
Hi,

I often use splot with "e", to find the equivalent width (EW) of certain features in my spectrum, but I couldn't find any information of how iraf calculates this equivalent width. Whenever I convert my spectra from .fits files to asci files and I try to do the calculations of the EW myself I don't get the exact same values, so I am wondering what algorithm is used by iraf for it.

Thanks!

 
Profile Email
 Quote
fitz
 01/17/2014 04:33PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
See the SPLOT help page section "Centroid, Flux, and Equivalent Width Determinations". Specifically,


CENTROID, FLUX, AND EQUIVALENT WIDTH DETERMINATIONS

There are currently five techniques in SPLOT to measure equivalent widths
and other line profile parameters. The simplest (conceptually) is by
integration of the pixel values between two marked pixels. This is
invoked with the 'e' keystroke. The user marks the two edges of the line
at the continuum. The measured line center, continuum value, line flux, and
equivalent width are given by:

center = sum (w(i) * (I(i)-C(i))**3/2) / sum ((I(i)-C(i))**3/2)
continuum = C(midpoint)
flux = sum ((I(i)-C(i)) * (w(i2) - w(i1)) / (i2 - i2)
eq. width = sum (1 - I(i)/C(i))

where w(i) is the wavelength of pixel i, i1 and i2 are the nearest integer
pixel limits of the integrated wavelength range, I(i) is the data value of
pixel i, C(i) is the continuum at pixel (i), and the sum is over the marked
range of pixels. The continuum is a linear function between the two points
marked. The factor mulitplying the continuum subtracted pixel values
in the flux calculation is the wavelength interval per pixel so that
the flux integration is done in wavelength units. (See the discussion
at the end of this section concerning flux units).
:
:


 
Profile Email
 Quote
cosmologist
 03/12/2014 03:41AM  
++++-
Regular Member

Status: offline


Registered: 03/30/2009
Posts: 117

I am trying to write a code that does the same thing but the equivalent width calculated is always wrong (its sometimes negative). There is something that I might have misunderstood. the equation says sum(1-I(i)/C(i)). Since I'm not reading .fits files and reading only text files, I had assumed that I(i) meant the flux value at wavelength i in the original graph and C(i) the same but for the continuum. What exactly do I(i) and C(i) translate to if I'm reading from a text file?

 
Profile Email
 Quote
fitz
 03/12/2014 03:59AM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
It depends on what's in your text file. Do you actually have continuum values or just wavelengths and fluxes? If the latter then you need to somehow fit a continuum first and then evaluate the fit function at each wavelength point. If the fluxes have already been calibrated or otherwise flattened then you can use a constant for C(i) (where that constant value depends on how the data were processed, e.g. is the continuum normalization 1.0 or 0.0?)

 
Profile Email
 Quote
cosmologist
 03/12/2014 05:59AM  
++++-
Regular Member

Status: offline


Registered: 03/30/2009
Posts: 117


The text file has just wavelengths and fluxes. The fluxes have already been normalized at a wavelength of 5870 A. Does that mean I don't have to fit it to a continuum and that I can use a constant for C(i) let's say 1 because the flux at 5870 A is 1? Is that correct?

 
Profile Email
 Quote
fitz
 03/12/2014 06:05AM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040

It sounds like the data are normalized to a continuum level of 1.0, but I'd plot the spectrum first to be sure it looks flattened and it isn't just the case that 1.0 is the max value of a curve.

 
Profile Email
 Quote
cosmologist
 03/12/2014 06:59AM  
++++-
Regular Member

Status: offline


Registered: 03/30/2009
Posts: 117
This is an example of one of my spectra:

https://www.dropbox.com/s/ji6081znmq48j97/NGC1711plot.png

 
Profile Email
 Quote
fitz
 03/12/2014 07:14AM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040

It looks flux calibrated, but not continuum normalized, you'll need to fit it first to get a continuum value to use.

 
Profile Email
 Quote
cosmologist
 03/12/2014 09:57AM  
++++-
Regular Member

Status: offline


Registered: 03/30/2009
Posts: 117
How I do that? Cry

 
Profile Email
 Quote
fitz
 03/12/2014 02:08PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
In IRAF you'd use the CONTINUUM task, otherwise Google "continuum normalization" if you plan to write your own code. The process basically involves fitting something like a spline to a sample of high points along the spectrum to establish the continuum, and then dividing your spectrum by this fit to do the normalization (i.e. "flattening").

 
Profile Email
 Quote
   
Content generated in: 0.35 seconds
New Topic Post Reply

Normal Topic Normal Topic
Sticky Topic Sticky Topic
Locked Topic Locked Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Anonymous users can post 
Filtered HTML Allowed 
Censored Content 
dog allergies remedies cialis 20 mg chilblain remedies


Privacy Policy
Terms of Use

User Functions

Login