First off, apologies if this question appears trivial or it has been previously answered (although I could not find this on the forum or the web).
I am trying to reduce (several) longslit spectra from GMOS data. All the spectra have the target of interest very close to the slit center. I am developing iraf code to do this for all spectra automatically and it all appears to run fine, except for the last gsextract step. During this last step, gsextract attempts to automatically identify the trace from the brightest pixel. However this goes wrong several times due to cosmic rays and/or faint trace. What I would like to do is restrict the automatic aperture finding routine to the central regions of the spectrum only.
Is there a specific parameter in gsextract I can use to do this?
Personally, I would just turn on the fl_inter flag for gsextract and do it all manually. 🙂
But I consulted with my colleagues anyway to try to find you a more satisfying answer. We are not 100% sure what will definitely work for your data but here are some suggestions for what to try next.
Possibly the easiest thing to try is increasing the value of “tnsum”. Yes, it seems like it is just for the trace, but it is in fact also used in the “apall” call which is the task that finds the apertures. If your target is faint, this might help by summing more pixels.
The solution most likely to work, I think, would be do the first spectrum manually with “fl_inter=yes”, then use that file as the aperture reference for the others. Since you say the spectrum is always in the same position, it might be your best way out. The parameter to use to specify the reference aperture is “refimages”. We are not sure whether “recenter” should be set to “yes” or “no”. Maybe try both to see.
Maybe someone else reading this post has had the same issue as you and has a better or more detailed solution.