View on GitHub

IRAF Community Distribution

IRAF maintained by the community

Home | Installation | Packages | X11IRAF | PyRAF | Forum

Two qesitons about flux scales and arithmetic with the wavelengths

Frank Valdes wrote on Jun 09, 1999

Q:  Here is the quickest steps I can seem to find
to do the conversion from F-lambda to magnitude.
Are these correct?

sarith l//@objects fnu "" n//@objects
hedit n//@objects ylabel "Intensity (erg/cm2/s/Hz)" ver-
sarith n//@objects / 3.68e-20 o//@objects
sarith o//@objects mag "" m//@objects
hedit m//@objects ylabel  "Intensity (magnitude)" ver-
imdel o//@objects


A: I had forgotten that SARITH had an "fnu" option.  Your recipe is fine.
I'm not sure what you mean by quickest.  If you mean can you reduce any
steps the only suggestion is that the task IMEXPR can do the division
and magnitude conversion in one step.  It is a complex task with a
syntax to be learned but it is worth the effort for future situations.
It does not have access to the world coordinate array, that is the
wavelengths, but it can use the pixel number as a computation
quantity.  Thus, if you had a linear wavelength scale and can compute
the wavelength from the pixel number then IMEXPR could do all the
operations in one step (other than the header updates).

Last post on Jun 09, 1999