reidentify - why does it find bogus lines?
Gabor Furesz wrote on Jun 06, 2006
Hi,
I try to use reidentify in the specred package to automatically identify ThAr emission lines based on a "master-reference" file. I have to do it this way since the MOS image has 240 spectra in it, with a zig-zag pattern wavelength shift between apertures (=solutions can not be traced form aperture to aperture) and I try to make an automatic reduction pipeline so the manual interaction of 'identify' should be avoided. So, here is what I try to do and what does not work:
- have a database 'id' file, what I idenified manually for a master reference ThAr exposure
- run 'reidentify' on an other ThAr exposure and specify in the reference keyword my master reference file I created before (step 1, above)
- since I want exactly the same lines in all of the solution within the multi-spectra file I specify the 'maxfeature' keyword to be equal to the number of lines I have in a specific linelist file (cropped form the IRAf supplied thar listfile), and also allow adding features in case it would not find all the lines for the first time
- allow sigma clipping and run an iteration of 5
what happens:
- maxfeat=55 but reidentify founds 56-58 lines, out of which 4-5 are bogus ones (e.g. IRAF put marks on flat part of the spectra, no lines at all there)
- the sigma clipping gets rid of these fake lines, but does not match with the thar linelist again to add features from there based on the preliminary solution --- HOWEVER if I hit manually the 'l' key it does add the missing features
- the rms of the fit is the best, and the number of features I fit equals to the required 55 only, if I do reidentify manually in th efollowing way:
get an aperture; fit; delete the sigma clipped fake lines; fit again; use the
l key to match the thar list again; fit again; quit and jump to next aperutre
which is something I can not really do in an automtic pipeline, 240 times for every image. It seems tha addfeature dos not work, and thre is no way to delete the fake lines (just ignore them, and that has different effect on the final result than deleting them and rematching the input list)
If someone could help in this that would be great - I can provie her/him with sample files.
------------------it's already too long, I'm sorry, but I found a related bad thing:------
I thought I could fix the problem above if I run first reidentify given my master referenca as reference, and than rerun reident again on the sam file, but now give the first-order result as a reference (the file itself). This does not work at all: when I call reidentify for the 2nd time (when reference is the file itself, so the first solution I just got for the file) the displayed lines are way off from the real lines: it looks it looses track of the apertures, and try to fit lines form a different aperture which is off by several tens of pixels due to the zig-zag pattern of spectral features from aperture to aperture in this spectrograph.
Anyone who could help?
Thanks in advance,
Gabor Furesz
Harvard-Smithsonian CfA
I try to use reidentify in the specred package to automatically identify ThAr emission lines based on a "master-reference" file. I have to do it this way since the MOS image has 240 spectra in it, with a zig-zag pattern wavelength shift between apertures (=solutions can not be traced form aperture to aperture) and I try to make an automatic reduction pipeline so the manual interaction of 'identify' should be avoided. So, here is what I try to do and what does not work:
- have a database 'id' file, what I idenified manually for a master reference ThAr exposure
- run 'reidentify' on an other ThAr exposure and specify in the reference keyword my master reference file I created before (step 1, above)
- since I want exactly the same lines in all of the solution within the multi-spectra file I specify the 'maxfeature' keyword to be equal to the number of lines I have in a specific linelist file (cropped form the IRAf supplied thar listfile), and also allow adding features in case it would not find all the lines for the first time
- allow sigma clipping and run an iteration of 5
what happens:
- maxfeat=55 but reidentify founds 56-58 lines, out of which 4-5 are bogus ones (e.g. IRAF put marks on flat part of the spectra, no lines at all there)
- the sigma clipping gets rid of these fake lines, but does not match with the thar linelist again to add features from there based on the preliminary solution --- HOWEVER if I hit manually the 'l' key it does add the missing features
- the rms of the fit is the best, and the number of features I fit equals to the required 55 only, if I do reidentify manually in th efollowing way:
get an aperture; fit; delete the sigma clipped fake lines; fit again; use the
l key to match the thar list again; fit again; quit and jump to next aperutre
which is something I can not really do in an automtic pipeline, 240 times for every image. It seems tha addfeature dos not work, and thre is no way to delete the fake lines (just ignore them, and that has different effect on the final result than deleting them and rematching the input list)
If someone could help in this that would be great - I can provie her/him with sample files.
------------------it's already too long, I'm sorry, but I found a related bad thing:------
I thought I could fix the problem above if I run first reidentify given my master referenca as reference, and than rerun reident again on the sam file, but now give the first-order result as a reference (the file itself). This does not work at all: when I call reidentify for the 2nd time (when reference is the file itself, so the first solution I just got for the file) the displayed lines are way off from the real lines: it looks it looses track of the apertures, and try to fit lines form a different aperture which is off by several tens of pixels due to the zig-zag pattern of spectral features from aperture to aperture in this spectrograph.
Anyone who could help?
Thanks in advance,
Gabor Furesz
Harvard-Smithsonian CfA
Francisco Valdes wrote on Jun 06, 2006
Hello Gabor,
I am not sure I fully understand what is happening. If you could supply me with sample files (the image data, the id file, and task parameters from an lpar or dpar listing) I can investigate.
I can try and make some comments. I think the "maxfeature" option is not what you think it is. It says don't *add* more than this number. It is not saying to only have this many features.
If you have found that you can always interactively do what you want, such as by always using the 'l' key, then any IRAF graphics task can be made non-interactive by redirecting cursor input from a file and redirecting graphics output to dev$null with "G> dev$null".
Frank Valdes
I am not sure I fully understand what is happening. If you could supply me with sample files (the image data, the id file, and task parameters from an lpar or dpar listing) I can investigate.
I can try and make some comments. I think the "maxfeature" option is not what you think it is. It says don't *add* more than this number. It is not saying to only have this many features.
If you have found that you can always interactively do what you want, such as by always using the 'l' key, then any IRAF graphics task can be made non-interactive by redirecting cursor input from a file and redirecting graphics output to dev$null with "G> dev$null".
Frank Valdes
Last post on Jun 06, 2006