Hi there,I have a quite similar problem with equivalent width measurements in absorption lines, and as I'm totally newbie with IRAF I may need your help if you don't mind.
I have to measure EW in hundreds of galaxy spectras (and 4 EW per spectra), that I corrected from doppler effects given their redshift and using the dopcor tool.
So as there are many spectras I figured I should do this using a script rather than doing it by hand.
However I encounter issues when it comes to running my script, because I use the deblending tool with a cursor file (I drew inspiration from the IRAF scripts pdf on this site, but noticed a few mistakes with cursor files and tried to correct them), and the cursor position is fixed, but absorption lines may be slightly at higher or lower wavelength depending on the accuracy of my redshift list.
My problem is that in some spectras there are emission lines very close to the absorption line that I wish to measure, and when my script is supposed to fit (gaussian fit) them, sometimes it fits the closer emission line, or sometimes it doesn't fit anything, and it returns INDEF values in my .log file or EW as large as hundreds of angströms, or negative EW when emission lines are measured...So I was wondering if there is a way, using the deblending tool in a script, to constraint only closer absorption lines EW measurements, and not to use a fixed value for the gaussian fit (because of the possible precision errors on the redshift that may imply inaccurate positions for my absorption lines) ?
if it may help here are excerpts my script files :[b:efd9be3566]Cursor file[/b:efd9be3566][i:efd9be3566]1360 1.2E-18 1 d
1380 1.2E-18 1 d
1370 1.2E-18 1 g
0 0 1 q
0 0 1 f
0 0 1 f
0 0 1 y
0 0 1 q
0 0 1 q[/i:efd9be3566][b:efd9be3566]Cl file[/b:efd9be3566]
[i:efd9be3566]lis="atmcor1370.lis" while (fscan (list,s1) != EOF) {
cl.ukey="ukey.dat"
splot (s1, save_fi="atmeqw1370.log",cursor="eqw1370.cur")
cl.ukey=""
}unlearn splot[/i:efd9be3566]- my .lis file in the .cl file is the list of .fits images for which I need to measure specific EW (I have 4 cl files; 4 .lis files and 4 .cur files because there are spectras in which I can't measure certain lines because of their redshift)- concerning the cursor file, I tried to adapt what I read in the pdf about scripts, I'm not sure of using the right options of the deblend tool for my fit. Actually I tried several cases, when it asks for fit positions and gaussian widths I didn't find documentation on what the options do, that's to say "fixed, single or all". My supervisor first told me to do all and all, but it returned too many INDEF values and weird values, so I tried various combinations, single-fixed, fixed-fixed, etc... and the fixed-fixed one was the one which worked best regarding the amount of INDEF values, but I'm not sure if in term of accuracy it is the best.- I haven't normalized my spectras (as indicated in the IRAF scripts pdf) but I don't think this is the cause of my problem, my supervisor told me this wasn't necesary, are we wrong ?
anyway thank you in advance for taking the time to read my post, and hope you can help me !
JulienPS : and don't hesitate to tell me if I wasn't clear, i'm not sure of my english