View on GitHub

IRAF Community Distribution

IRAF maintained by the community

Home | Installation | Packages | X11IRAF | PyRAF | Forum

Automatic extraction with apall

Tommi Vornanen wrote on Jan 13, 2009

Hi,
I have a little problem using the apall routine in e.g. the apextract package. I want to extract spectra automatically. This doesn't sound like a big problem but I'm reducing spectropolarimetric data and I have two spectra in each image. I want to extract the spectrum on the left hand side from the image (and the right spectrum from another image). However, the automatic finding always finds the highest peak if I want ot find just one spectrum. This highest peak is sometimes the left spectrum and sometimes the right one.
Another possibility would be to find two peaks but then the task wants to extract them both.
So, I would like to know how to extract the spectrum with lowest (or highest) x-axis position instead of the highest count or choose to extract only the first (or second) spectrum from two automatically found spectra.

Your help would be much appreciated.

James Turner wrote on Jan 13, 2009

I notice that apall has the following parameter:
apertures = ""
Apertures to recenter, resize, trace, and extract. This only
applies to apertures read from the input or reference
database. Any new apertures defined with the automatic finding
algorithm or interactively are always selected. The syntax is
a list comma separated ranges where a range can be a single
aperture number, a hyphen separated range of aperture numbers,
or a range with a step specified by "x<step>"; for example,
"1,3-5,9-12x2".

It's a bit inefficient, but perhaps you could try tracing both apertures once, then repeat the extraction, using the first attempt as a reference and specifying apertures="1" or "2"? Not 100% sure whether that will do what you want and Mike or Frank might have better ideas...

James.

Tommi Vornanen wrote on Jan 13, 2009

Thank you for your help. It seems to work, although the data has to be reduced completely to be sure. This has saved me a lot of time.

Last post on Jan 13, 2009