View on GitHub

IRAF Community Distribution

IRAF maintained by the community

Home | Installation | Packages | X11IRAF | PyRAF | Forum

Fitting a power law continuum to 1D spectra

Frank Valdes wrote on Mar 19, 1998


Q:  I have some spectra from the 2.1m which have flux calibration problems
redward of ~7500A.  I want to try to fix those calibration problems
by fitting the spectram blueward of this and then extrapolating redward.
My objects are BL Lacs, which are simply a power-law spectrum.  My data
are in units of f_lambda vs. wavelength; I'd like to convert it to f_nu
vs. frequency, plot it as log f_nu v. log nu, and the fit this power
law (with 'continuum'?).  Can you explain how I could do this?


A:  You can use SPLOT to convert to log F-nu.  Use the 'n' key to convert
from F-lambda to F-nu.  Then use 'f' to enter function mode and then
'l' to take the log.  Type 'q' to exit function mode and use 'i'
to save the modified spectrum.

To convert the dispersion to log-nu use DISPTRANS.

cl> disptrans <inspec> <outspec> "log hertz"


You can also do everything with SPLOT and not actually change the
data.  The sequence would be:

        cl> splot spec
        n                               # Convert to F-nu
        f                               # Enter function mode
        l                               # Take log
        q                               # Exit function mode
        :units log hertz                # Convert dispersion to log-nu
        t                               # Do fitting
        f                               # Do fit
        q                               # Quit fit (when done using ICFIT)
        :units angstrms                 # Convert back to angstroms
        f                               # Enter function mode
        d                               # Take anti-log
        q                               # Exit function mode
        l                               # Convert to F-lambda
        i                               # Save result
        
        
The t key in SPLOT calls the same ICFIT routines used by continuum.

Last post on Mar 19, 1998