On this page:
Basic Usage: The default fit
Beyond the default fit:
High Redshift Sources
Error output
Plotting the fit
Basic Usage: The default fit
First, read the Caveats regarding the interpretation of results produced by DecompIR.
Download the latest version of the DecompIR from the Downloads page.
The first thing to note is that DecompIR requires a number of other IDL procedures to run, specifically those contained as part of mpfit (available here) and the IDL astronomy library (available here). Before you can run DecompIR you will need to download these procedures and place them in your IDL path (if you don't already have them).
As the host-galaxy and AGN templates that DecompIR uses currently span the rest-frame 6-1000 um infrared wavelengths, only spectra and photometry points within this range will be considered by the fitting routine.
Because DecompIR uses chi2 minimisation to fit the input data the minimum amount of input requires a wavelength array, a flux array and an error array. If, for some reason, you don't have a good understing of the proper errors associated with each bin you can set all the errors to be the same sensible value (e.g., 10% of the minimum flux) to get a reasonable fit; although, obviously, any errors on the fitted parameters (see later) will be meaningless.
In its default mode, DecompIR will attempt to fit the input data by only varying the normalisation of a host galaxy component and the average AGN component, described as (i.e., Eqn. 1 in Mullaney et al, 2011; see also Templates page):
If no host-galaxy component is specified then SB2 from Mullaney et al (2011) is used. However, because there is no one standard host-galaxy SED, we suggest that any infrared photometry and/or spectrum be fitted using all supplied host-galaxy templates separately. This is the recommended procedure to take when only a small number (i.e., <6) of photometry points are available as there will not be enough independent data-points effectively constrain any more parameters.
The calling sequence for such an example would be:
wav = [12., 25., 60., 100.]
flux = [12., 25., 60., 100.]
err = [12., 25., 60., 100.]
output = decompir(wav, flux, err, host_choice='SB1')
where output is a structure containing all the fit parameters and a number of useful values derived from the fit (a list of all tags in the output structure is given at the bottom of this page). Note that, since the AGN and host templates are in units of specific flux (specifically F\nu; e.g., Jy, ergs/s/cm/Hz, etc), then the input flux and errors should also be in units of specific flux.
DecompIR contains the filter response curves for the IRAS, Spitzer and Herschel missions. It will automatically identify which filter response curve to use from the wavelength array. As such, the provided wavelengths must be in the Observed Frame (see section on High Redshift Sources below for how to fit such cases).
The following response curves are included (all wavelengths in um):
IRAS: 12, 25, 60, 100
Spitzer: 8, 16 (IRS peakup), 24, 70, 160
Herschel: 71, 101, 161, 250, 350, 500
***Note the +1 for the PACS filters to distinguish between the filters on the Spitzer and IRAS missions***
Beyond the default fit:
The flexibility of the fit can be increased with larger numbers of data points. For example, at the other extreme when fitting infrared spectra (i.e., many bins), parameters such as the spectral indices describing the MIR AGN SED can be adjusted. A call to DecompIR in which all parameters are allowed to vary would be:
output = decompir(wav, flux, err, host_choice='SB1', /fit_ind1, /fit_ind2, /fit_break, /fit_peak, /fit_si, /agn_abs, /host_abs, /no_agn, /no_host)
where:
/fit_ind1: allow the AGN component spectral index at (wavelengths < break) to vary.
/fit_ind2: allow the AGN component spectral index at (wavelengths > break) to vary.
/fit_break: allow break wavelength in the AGN component to vary.
/fit_peak: allow the peak of the AGN component to vary. Beyond the peak, the AGN component falls as a modified black body at longer wavelengths.
/fit_si: fit any Silicate emission components
/agn_abs: model absorption of the AGN component using a Draine (2003) profile.
/host_abs: model absorption of the host-galaxy component using a Draine (2003) profile.
/no_agn: switches off the AGN component entirely.
/no_host: switches off the host component entirely.
If you wish to keep any of the parameters describing the AGN component fixed to a particular value, then instead of using /fit_*, simply set the parameter name to equal the desired value, e.g., ..., ind1 = 1.9, ind2 = 1.2, ..., etc. The last two switches (/no_agn, /no_host) turn off either the AGN component or host component entirely. This is useful if you want to check how necessary each component is to the fit (using, e.g., a delta Chi2 test).
High Redshift Sources
When fitting the SEDs of high redshift sources, care must be taken to ensure that any k-correction is properly taken into account. To ensure that this is the case, DecompIR performs the fit in the observed frame by shifting the fitted SED and integrating over the observed-frame filter response functions. To be able to do this, you must tell DecompIR the redshift of the source, e.g.,:
output = decompir(wav, flux, err, z=0.8)
All parameters can be changed or fixed to user-defined values in the high redshift cases.
Error output
As with any chi2 fit, errors on the fitted parameters can be obtained if the errors on the input data are well-known and well-defined. The errors on every fit parameter can be obtained using the calling sequence:
output = decompir(wav, flux, err, z=0.8, error=output_err)
here, output_err will contain a structure similar to output (i.e., largely the same tag names) with error estimates for each of the varied parameters. The output_err and output structures do not have exactly the same tag names as there are some values in output that do not have associated error values (such as the 'SB' and 'EXT' tags).
Plotting the fit
When writing DecompIR, I wanted the fitting routine to output only the fitted parameter values (and associated errors, if requested). However, in most cases, a plot of the fit to the data is desirable. To produce such a plot, I have written an accompanying routine, decompir_buildfit, to take the output from DecompIR and return a set of arrays that can be plotted onto your data.
decompir_buildfit requires just two inputs; a wavelength array and the output structure from DecompIR. In this respect, decompir_buildfit is similar to the polynomial procedure in the IDL standard library. For example:
x = 10.^(alog10(6.) + 0.004*findgen(512))
fit = decompir_buildfit(x, output)
(Note that, here, x is a logarithmic array, but could take any monotonic form)
here, fit is an IDL structure with 8 tags: wav, all, agn, agn_unabs, sb, sb_unabs, si, lines.
wav: the wavelength array
all: the total fit containing all components
agn: only the (absorbed) fitted AGN component
agn_unext: only the fitted AGN component, not including any absorption
host: only the (absorbed) fitted host-galaxy component
host_unext: only the fitted host-galaxy component, not including any absorption
si: only the silicate emission features
lines: currently not used
The data and fit can now be easily plotted together using:
plot, wav, flux, psym=1
oplot, fit.wav, fit.all
oplot, fit.wav, fit.agn
Output structure tags:
ITER: Number of iterations in fit
CHISQ: Chisq of fit
HOST: Host galaxy template name
EXT: Extinction template name
HOST_NORM: Normalisation of host template
HOST_EXT: Level of host galaxy extinction
AGN_NORM: Normalisation of agn component
AGN_IND1: AGN component spectral index at wavelengths < break
AGN_IND2: AGN component spectral index at wavelengths > break
AGN_BREAK: Break wavelength
AGN_BBPEAK: Peak AGN wavelength. Longwards of this wavelength the AGN component falls as a modified blackbody.
AGN_EXT: Level of AGN component extinction
SI_10_NORM: Normalisation of 10um silicate emission feature
SI_10_SIG: Width of 10um silicate emission feature (um)
SI_10_POS: Central wavelength of 10um silicate emission feature (um)
SI_18_NORM: Normalisation of 18um silicate emission feature
SI_18_SIG: Width of 18um silicate emission feature (um)
SI_18_POS: Central wavelength of 18um silicate emission feature (um)
TOTAL: Total flux of 8-1000um SED (units: input units * Hz).
For high-z sources, this is the REST FRAME 8-1000um flux (assuming that the redshift is provided when DECOMPIR is called, as should always be the case).
To calculate the rest frame 8-1000um luminosity, multiply output.total by [4*Pi*R2/(1+z)2], where R is the luminosity distance to the galaxy and z is the redshift.
HOST_PERC: Percentage of total flux that comes from the host galaxy.
AGN_PERC: Percentage of total flux that comes from AGN.
SI_PERC: Percentage of total flux that comes from Si feature.
TOTAL_EXT: Total after taking extinction into account (i.e., total_ext < total).
HOST_EXT_PERC: As above but after taking extinction into account
AGN_EXT_PERC: As above but after taking extinction into account
SI_EXT_PERC: As above but after taking extinction into account
MIR_TOTAL: As above but flux calculated for: 8-35um
MIR_HOST_PERC: As above but for: 8-35um
MIR_AGN_PERC: As above but for: 8-35um
MIR_SI_PERC: As above but for: 8-35um
MIR_TOTAL_EXT: As above but for: 8-35um
MIR_HOST_EXT_PERC: As above but for: 8-35um
MIR_AGN_EXT_PERC: As above but for: 8-35um
MIR_SI_EXT_PERC: As above but for: 8-35um
HOST_PERC_19UM: Fraction of 19um flux emitted by host.
AGN_PERC_19UM: Fraction of 19um flux emitted by AGN.
SI_PERC_19UM: Fraction of 19um flux emitted by Si.
AGN_FLUX_12UM: AGN flux at 12um.
LI_FWHM: FWHM of all emission lines (if fitted, not currently implemented)
LI_VEL: Velocity offset of all emission lines (if fitted, not currently implemented)
AR_II_NORM: [Ar II] line normalisation (if fitted, not currently implemented)
NE_VI_NORM: [Ne VI] line normalisation (if fitted, not currently implemented)
AR_III_NORM: [Ar III] line normalisation (if fitted, not currently implemented)
S_IV_NORM: [S IV] line normalisation (if fitted, not currently implemented)
NE_II_NORM: [Ne II] line normalisation (if fitted, not currently implemented)
H2_NORM: H2 line normalisation (if fitted, not currently implemented)
MN_II_NORM: [Mn II] line normalisation (if fitted, not currently implemented)
FE_VII_NORM: [Fe VII] line normalisation (if fitted, not currently implemented)
NI_VI_NORM: [Ni VI] line normalisation (if fitted, not currently implemented)
NE_V_NORM: [Ne V] line normalisation (if fitted, not currently implemented)
NE_III_NORM: [Ne III] line normalisation (if fitted, not currently implemented)