determination of equivalent widths
Guest wrote on Oct 04, 2006
Dear Sir or Madam,
my name is Martin Tafelmeyer, I am a PhD student at EPF Lausanne. I am using
IRAF to determine equivalent widths of spectral lines for metallicity
determination.
To automatize the procedure I created a cursor file containing the lines, as
described on page 11 of the 'User's guide to IRAF scripts'
Unfortunately the output is not written to the 'splot.log' file so that I do not
know the results of the calculations.
When I do not use a curser file and determine the equivalent widths 'by hand' by
moving the curser to the line in the plot and pressing 'k' everything works
quite well and
the results are written to the log file.
I also tried to use a normalized spectrum an therefore droped the first line in
the example cursor file given in the User's Guide on page 11.
Then the 'splot.log' file contained the data of just one spectral line whose
position did not match the position of any of the input lines from the cursor
file.
Do you have an idea what I should change, that the equivalent widths of all
lines from the cursor file are written to the log file?
The first line in the example on page 11 normalizes the continuum, why is the
wavelength of the Halpha line written at the beginning of tis line?
The second coloumn of the example refers to the flux level, the value in the
example is 0.98, does this mean you assume the continuum level at 0.98 rather
than 1?
I would really be very grateful if you could help me with these problems,
best regards,
Martin Tafelmeyer
Post generated using Mail2Forum (http://www.mail2forum.com)
my name is Martin Tafelmeyer, I am a PhD student at EPF Lausanne. I am using
IRAF to determine equivalent widths of spectral lines for metallicity
determination.
To automatize the procedure I created a cursor file containing the lines, as
described on page 11 of the 'User's guide to IRAF scripts'
Unfortunately the output is not written to the 'splot.log' file so that I do not
know the results of the calculations.
When I do not use a curser file and determine the equivalent widths 'by hand' by
moving the curser to the line in the plot and pressing 'k' everything works
quite well and
the results are written to the log file.
I also tried to use a normalized spectrum an therefore droped the first line in
the example cursor file given in the User's Guide on page 11.
Then the 'splot.log' file contained the data of just one spectral line whose
position did not match the position of any of the input lines from the cursor
file.
Do you have an idea what I should change, that the equivalent widths of all
lines from the cursor file are written to the log file?
The first line in the example on page 11 normalizes the continuum, why is the
wavelength of the Halpha line written at the beginning of tis line?
The second coloumn of the example refers to the flux level, the value in the
example is 0.98, does this mean you assume the continuum level at 0.98 rather
than 1?
I would really be very grateful if you could help me with these problems,
best regards,
Martin Tafelmeyer
Post generated using Mail2Forum (http://www.mail2forum.com)
Francisco Valdes wrote on Oct 04, 2006
Hi Martin,
If you post the parameter listing for SPLOT and the way you execute the command either on the command line or from a script I may be able to tell you what is wrong.
Yours,
Frank Valdes
If you post the parameter listing for SPLOT and the way you execute the command either on the command line or from a script I may be able to tell you what is wrong.
Yours,
Frank Valdes
martin wrote on Oct 04, 2006
hi frank,
to execute I used the command:
splot myspectrum.fits cursor="equi.cur"
where the content of the cursor file was
4878 1 1 k
5270 1 1 k
and the splot parameters:
images = "testcomb05.fits" List of images to plot
line = 1 Image line/aperture to plot
band = 2 Image band to plot
star_name = "" Standard star name
mag = Magnitude of star
magband = Magnitude type
teff = Effective temperature or spectral type
next_image = "sky080144_F4_MWXB_SCI_REDL_UVES.2004-03-22T00:06:44.786.fits"
new_image = "tasdgf" Image to create
overwrite = yes Overwrite image?
spec2 = Spectrum
constant = Constant to be applied
wavelength = Dispersion coordinate:
linelist = "" File
wstart = 100. Starting wavelength
wend = 1000. Ending wavelength
dw = Wavelength per pixel
boxsize = 107 Smoothing box size (odd number)
(units = "") Plotting units
(options = "auto wreset") Combination of plotting options:\nauto, zero, x
(xmin = INDEF) Minimum X value of initial graph
(xmax = INDEF) Maximum X value of initial graph
(ymin = INDEF) Minimum Y value of initial graph
(ymax = INDEF) Maximum Y value of initial graph
(save_file = "splot.log") File to contain answers
(graphics = "stdgraph") Output graphics device
(cursor = "") Graphics cursor input\n\n# PARAMETERS FOR ERROR
(nerrsample = 50) Number of error samples (<10 for no errors)
(sigma0 = 16.4) Constant gaussian noise term (INDEF for no erro
(invgain = 1.59) Inverse gain term (INDEF for no errors)\n\n# PA
(function = "spline3") Fitting function
(order = 1) Order of fitting function
(low_reject = 2.) Low rejection in sigma of fit
(high_reject = 4.) High rejection in sigma of fit
(niterate = 10) Number of rejection iterations
(grow = 1.) Rejection growing radius in pixels
(markrej = yes) Mark rejected points?\n\n# PARAMETERS FOR OVERP
(caldir = )_.caldir) Directory containing calibration data
(fnuzero = 3.6800000000000E-20) Absolute flux zero point\n\n# PARAMETERS U
(mode = "ql")
The log file splot.log contained just the date and the name of the input spectrum but no equivalent widths.
best regards,
Martin
to execute I used the command:
splot myspectrum.fits cursor="equi.cur"
where the content of the cursor file was
4878 1 1 k
5270 1 1 k
and the splot parameters:
images = "testcomb05.fits" List of images to plot
line = 1 Image line/aperture to plot
band = 2 Image band to plot
star_name = "" Standard star name
mag = Magnitude of star
magband = Magnitude type
teff = Effective temperature or spectral type
next_image = "sky080144_F4_MWXB_SCI_REDL_UVES.2004-03-22T00:06:44.786.fits"
new_image = "tasdgf" Image to create
overwrite = yes Overwrite image?
spec2 = Spectrum
constant = Constant to be applied
wavelength = Dispersion coordinate:
linelist = "" File
wstart = 100. Starting wavelength
wend = 1000. Ending wavelength
dw = Wavelength per pixel
boxsize = 107 Smoothing box size (odd number)
(units = "") Plotting units
(options = "auto wreset") Combination of plotting options:\nauto, zero, x
(xmin = INDEF) Minimum X value of initial graph
(xmax = INDEF) Maximum X value of initial graph
(ymin = INDEF) Minimum Y value of initial graph
(ymax = INDEF) Maximum Y value of initial graph
(save_file = "splot.log") File to contain answers
(graphics = "stdgraph") Output graphics device
(cursor = "") Graphics cursor input\n\n# PARAMETERS FOR ERROR
(nerrsample = 50) Number of error samples (<10 for no errors)
(sigma0 = 16.4) Constant gaussian noise term (INDEF for no erro
(invgain = 1.59) Inverse gain term (INDEF for no errors)\n\n# PA
(function = "spline3") Fitting function
(order = 1) Order of fitting function
(low_reject = 2.) Low rejection in sigma of fit
(high_reject = 4.) High rejection in sigma of fit
(niterate = 10) Number of rejection iterations
(grow = 1.) Rejection growing radius in pixels
(markrej = yes) Mark rejected points?\n\n# PARAMETERS FOR OVERP
(caldir = )_.caldir) Directory containing calibration data
(fnuzero = 3.6800000000000E-20) Absolute flux zero point\n\n# PARAMETERS U
(mode = "ql")
The log file splot.log contained just the date and the name of the input spectrum but no equivalent widths.
best regards,
Martin
Francisco Valdes wrote on Oct 04, 2006
Hi Martin,
I would need to see he spectrum header to know the resolution but I have a pretty good guess. The k requires a minimum of 3 pixels. Since you are giving the position in angstroms I don't know how many pixels are covered but my guess is that it is only one or two pixels. Probably the warning message is being swallowed by the way you are doing things. So the thing to try is making the input wavelengths define a slightly wider window.
If you show me a long header listing of the whole header or just the coordinate keywords I could verify this further or try and reproduce the problem with the same header.
Yours,
Frank
I would need to see he spectrum header to know the resolution but I have a pretty good guess. The k requires a minimum of 3 pixels. Since you are giving the position in angstroms I don't know how many pixels are covered but my guess is that it is only one or two pixels. Probably the warning message is being swallowed by the way you are doing things. So the thing to try is making the input wavelengths define a slightly wider window.
If you show me a long header listing of the whole header or just the coordinate keywords I could verify this further or try and reproduce the problem with the same header.
Yours,
Frank
martin wrote on Oct 04, 2006
Hi Frank,
thank you very much, I'll try to increase the number of pixels covered and see if it works. Here is the header of my spectrum:
testcomb05.fits[70672][real]:
No bad pixels, min=0., max=0. (old)
Line storage mode, physdim [70672], length of user area 20210 s.u.
Created Wed 09:51:39 27-Sep-2006, Last modified Wed 09:51:39 27-Sep-2006
Pixel file "testcomb05.fits" [ok]
EXTEND = T / File may contain extensions
ORIGIN = 'NOAO-IRAF FITS Image Kernel July 2003' / FITS file originator
IRAF-TLM= '09:51:39 (27/09/2006)' / Time of last modification
COMMENT NOST 100-2.0: Hanisch,R. et al. 2001, Astron. & Astrophys. 376, 559
CRPIX1 = 1. / Reference pixel
CRVAL1 = 4759.8837890625 / Coordinate at reference pixel
CDELT1 = 0.014714524157275 / Coord. incr. per pixel (original value)
CTYPE1 = 'LINEAR ' / Units of coordinate
BUNIT = 'FLUX ' / Units of data values
DATE = '2006-09-27T07:51:39' / [UTC] Date of writing
FILENAME= 'mwfxb_l_0008.bdf' / Original file base-name
MIDASFTP= 'IMAGE ' / MIDAS File Type
OBJECT = ' ' / MIDAS desc.: IDENT(1)
HISTORY COMPUTE/IMAG wfxb_l_0008.bdf mwfxb_l_0008.bdf 1.20000E+01,4.00000E+00 O\
HISTORY PTIMAL weight.bdf varmfxb_l_0008.bdf \
HISTORY
TELESCOP= 'ESO-VLT-U2' / MIDAS desc.: TELESCOP(1)
INSTRUME= 'UVES ' / MIDAS desc.: INSTRUME(1)
RADECSYS= 'FK5 ' / MIDAS desc.: RADECSYS(1)
DATE-OBS= '2004-03-22' / MIDAS desc.: O_TIME(1)
MJD-OBS = 53086.00468502 / MIDAS desc.: O_TIME(4)
TM-START= 404.7857281286 / MIDAS desc.: O_TIME(5)
EXPTIME = 4500.0001 / MIDAS desc.: O_TIME(7)
AIRMASS = 1.458 / MIDAS desc.: O_AIRM(1)
RA = 153.2419 / MIDAS desc.: O_POS(1)
DEC = -1.63519 / MIDAS desc.: O_POS(2)
EQUINOX = 2000. / MIDAS desc.: O_POS(3)
OBSERVER= ' ' / MIDAS desc.: OBSERVER(1)
RON = 3.42
GAIN = 0.63
FIBRENUM= 7
UTC = 396. / 00:06:36.000 UTC
LST = 26659.875 / 07:24:19.875 LST
UT = '00:06:36.000' / UT at start
ST = '07:24:19.875' / ST at start
PI-COI = ' '
ARCFILE = 'UVES.2004-03-22T00:06:44.786.fits' / Archive File Name
ORIGFILE= 'FLAMES_UVES_OBS082_0001.fits' / Original File Name
This is followed by a huge list of ESO descriptions, which are, as I assume, not so important.
Best regards,
Martin
thank you very much, I'll try to increase the number of pixels covered and see if it works. Here is the header of my spectrum:
testcomb05.fits[70672][real]:
No bad pixels, min=0., max=0. (old)
Line storage mode, physdim [70672], length of user area 20210 s.u.
Created Wed 09:51:39 27-Sep-2006, Last modified Wed 09:51:39 27-Sep-2006
Pixel file "testcomb05.fits" [ok]
EXTEND = T / File may contain extensions
ORIGIN = 'NOAO-IRAF FITS Image Kernel July 2003' / FITS file originator
IRAF-TLM= '09:51:39 (27/09/2006)' / Time of last modification
COMMENT NOST 100-2.0: Hanisch,R. et al. 2001, Astron. & Astrophys. 376, 559
CRPIX1 = 1. / Reference pixel
CRVAL1 = 4759.8837890625 / Coordinate at reference pixel
CDELT1 = 0.014714524157275 / Coord. incr. per pixel (original value)
CTYPE1 = 'LINEAR ' / Units of coordinate
BUNIT = 'FLUX ' / Units of data values
DATE = '2006-09-27T07:51:39' / [UTC] Date of writing
FILENAME= 'mwfxb_l_0008.bdf' / Original file base-name
MIDASFTP= 'IMAGE ' / MIDAS File Type
OBJECT = ' ' / MIDAS desc.: IDENT(1)
HISTORY COMPUTE/IMAG wfxb_l_0008.bdf mwfxb_l_0008.bdf 1.20000E+01,4.00000E+00 O\
HISTORY PTIMAL weight.bdf varmfxb_l_0008.bdf \
HISTORY
TELESCOP= 'ESO-VLT-U2' / MIDAS desc.: TELESCOP(1)
INSTRUME= 'UVES ' / MIDAS desc.: INSTRUME(1)
RADECSYS= 'FK5 ' / MIDAS desc.: RADECSYS(1)
DATE-OBS= '2004-03-22' / MIDAS desc.: O_TIME(1)
MJD-OBS = 53086.00468502 / MIDAS desc.: O_TIME(4)
TM-START= 404.7857281286 / MIDAS desc.: O_TIME(5)
EXPTIME = 4500.0001 / MIDAS desc.: O_TIME(7)
AIRMASS = 1.458 / MIDAS desc.: O_AIRM(1)
RA = 153.2419 / MIDAS desc.: O_POS(1)
DEC = -1.63519 / MIDAS desc.: O_POS(2)
EQUINOX = 2000. / MIDAS desc.: O_POS(3)
OBSERVER= ' ' / MIDAS desc.: OBSERVER(1)
RON = 3.42
GAIN = 0.63
FIBRENUM= 7
UTC = 396. / 00:06:36.000 UTC
LST = 26659.875 / 07:24:19.875 LST
UT = '00:06:36.000' / UT at start
ST = '07:24:19.875' / ST at start
PI-COI = ' '
ARCFILE = 'UVES.2004-03-22T00:06:44.786.fits' / Archive File Name
ORIGFILE= 'FLAMES_UVES_OBS082_0001.fits' / Original File Name
This is followed by a huge list of ESO descriptions, which are, as I assume, not so important.
Best regards,
Martin
Francisco Valdes wrote on Oct 04, 2006
Hi Martin,
Well, my guess was wrong. You actually have a very high resolution of 0.015 A/pixel. So in your interval of 4878 to 5270 you have 26133 pixels. If anything your problem is likely to do with such a large number of pixels. The fitting must be failing and leaving you with the log file that does contain values.
I suggest you do the fit interactively to see what is going on. If you continue to not understand the problem you could send me the spectrum separately to valdes@noao.edu.
Regards,
Frank
Well, my guess was wrong. You actually have a very high resolution of 0.015 A/pixel. So in your interval of 4878 to 5270 you have 26133 pixels. If anything your problem is likely to do with such a large number of pixels. The fitting must be failing and leaving you with the log file that does contain values.
I suggest you do the fit interactively to see what is going on. If you continue to not understand the problem you could send me the spectrum separately to valdes@noao.edu.
Regards,
Frank
martin wrote on Oct 04, 2006
Hi Frank,
I think I know what was the problem, I thought it is sufficient to have one wavelength value per line in the cursor file and IRAF automatically finds the line to fit, but it seems that I have to enter the 2 wavelength boundaries between which I would like to fit a line. I did this wrong because I just followed an example from the 'users guide to IRAF scripts' which was as follows:
6562 .98 1 k - equivalent width of Halpha
4861 .98 1 k - equivalent width of Hbeta
4340 .98 1 k - equivalent width of Hgamma
From this example it seemed to me that only one wavelength per line would be neccessary.
I have got one other question about continuum determination with the 'continuum' task:
If you use the 'spline3' function for the fit, what exactly does the 'order' parameter mean?
As I understood the help file, in the case of spline interpolation, 'Order' refers to the number of splines and 'spline3' refers to cubic splines.
But my supervisor thought for spline3, 'order' refers to the order of the splines, but she wasn't sure at all about this. So what is correct?
Thank you very much for your help,
best regards,
Martin
I think I know what was the problem, I thought it is sufficient to have one wavelength value per line in the cursor file and IRAF automatically finds the line to fit, but it seems that I have to enter the 2 wavelength boundaries between which I would like to fit a line. I did this wrong because I just followed an example from the 'users guide to IRAF scripts' which was as follows:
6562 .98 1 k - equivalent width of Halpha
4861 .98 1 k - equivalent width of Hbeta
4340 .98 1 k - equivalent width of Hgamma
From this example it seemed to me that only one wavelength per line would be neccessary.
I have got one other question about continuum determination with the 'continuum' task:
If you use the 'spline3' function for the fit, what exactly does the 'order' parameter mean?
As I understood the help file, in the case of spline interpolation, 'Order' refers to the number of splines and 'spline3' refers to cubic splines.
But my supervisor thought for spline3, 'order' refers to the order of the splines, but she wasn't sure at all about this. So what is correct?
Thank you very much for your help,
best regards,
Martin
Francisco Valdes wrote on Oct 04, 2006
Hi Martin,
You are right! The script guide is incorrect in its example. First the t key requires a second key, /, to normalize. I think the k key referred to in the example is the one that follows the h key. Anyway, it is certainly very confusing. I'm sorry about the problem and I failed to grok (realize) that you thought the k key was one key per line since your example had two values which is the way the k key is used. Anyway, I'm glad you figured it out.
The order parameter in all the IRAF function fitting tasks has two meanings depending on the function. For polynomials it is the number of terms (which is different that the highest power) such that an order of 3 is a quadratic. For the spline functions, both spline1 and spline3, it is the number of spline pieces. This means that an order of 1 means one spline piece which is a single linear function for spline1 and a single cubic function for spline3. An order of two means to spline pieces, etc.
Yours,
Frank
You are right! The script guide is incorrect in its example. First the t key requires a second key, /, to normalize. I think the k key referred to in the example is the one that follows the h key. Anyway, it is certainly very confusing. I'm sorry about the problem and I failed to grok (realize) that you thought the k key was one key per line since your example had two values which is the way the k key is used. Anyway, I'm glad you figured it out.
The order parameter in all the IRAF function fitting tasks has two meanings depending on the function. For polynomials it is the number of terms (which is different that the highest power) such that an order of 3 is a quadratic. For the spline functions, both spline1 and spline3, it is the number of spline pieces. This means that an order of 1 means one spline piece which is a single linear function for spline1 and a single cubic function for spline3. An order of two means to spline pieces, etc.
Yours,
Frank
martin wrote on Oct 04, 2006
Hi Frank,
thank you very much for your support, you helped me a lot,
best regards,
Martin
thank you very much for your support, you helped me a lot,
best regards,
Martin
starburst84 wrote on Oct 04, 2006
Could someone please tell me what am i doing wrong in executing the following:
longslit> splot spectra.imh cursor="equiv.cur"
where equiv.cur is:
6562 1 1 t \
6562 0.98 1 h k
4861 0.98 1 h k
4340 0.98 1 h k
which is a modified version of the example on page 11 as discussed in previous posts. My aim is to measure EWs for these lines, after normalising the continuum.
longslit> splot spectra.imh cursor="equiv.cur"
where equiv.cur is:
6562 1 1 t \
6562 0.98 1 h k
4861 0.98 1 h k
4340 0.98 1 h k
which is a modified version of the example on page 11 as discussed in previous posts. My aim is to measure EWs for these lines, after normalising the continuum.
Francisco Valdes wrote on Oct 04, 2006
Hello Martin,
Well my first observation would be that you seem to be using a "backward" slash instead of the "forward" slash (i.e. divide character). :?
Let me know if there is more to this problem.
Yours,
Frank Valdes
Well my first observation would be that you seem to be using a "backward" slash instead of the "forward" slash (i.e. divide character). :?
Let me know if there is more to this problem.
Yours,
Frank Valdes
starburst84 wrote on Oct 04, 2006
hi!
Thanks for the consideration. The slash is a typographical error.
smriti
p.s.: its me not martin!!
Thanks for the consideration. The slash is a typographical error.
smriti
p.s.: its me not martin!!
Last post on Oct 04, 2006