fit_modified_blackbody_to_imagecube¶
-
higal_sedfitter.fit.
fit_modified_blackbody_to_imagecube
(image_cube, outheader, wavelengths=[70, 160, 250, 350, 500], error_scaling=0.2, error_cube=None, pixelfitter=None, ncores=4, clobber=True, integral=False, out_prefix='')[source]¶ Fit a modified blackbody to each pixel in an image cube. Writes the results to files of the form
{out_prefix}+T.fits
,{out_prefix}+beta.fits
,{out_prefix}+N.fits
, and optionally{out_prefix}+integral.fits
.Parameters: image_cube :
ndarray
A cube constructed from the individual wavelengths of the Herschel image. Should have units of MJy (not MJy/sr).
wavelengths : list
The wavelengths, in microns, to include in the fit
error_scaling : float or None
The amount to scale the input fluxes by to determine the errors
error_cube : None or
ndarray
Alternative to
error_scaling
. A cube of errors the same size as the image_cube.pixelfitter :
PixelFitter
or NoneAn instance of the
PixelFitter
class to use for the fitting (this is how guesses are specified). If None, will use defaults.ncores : int
OPTIONAL / NOT PRESENTLY IMPLEMENTED Allows parallelization
clobber : bool
Overwrite existing output files?
integral : bool
Also include the integral of the modified blackbody, e.g. for luminosity determination? This increases the execution time by a factor of 2
out_prefix : str
A prefix to prepend to the output file names
Returns: t_hdu,b_hdu,n_hdu :
HDUList
HDUlists incorporating the best-fit values as the
PrimaryHDU
image and the errors asImageHDU
s in the first (ERROR) extensionint_hdu :
PrimaryHDU
(optional) An HDU containing an image of the integral in \(erg/s/cm^2\)