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 :
ndarrayA 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
ndarrayAlternative to
error_scaling. A cube of errors the same size as the image_cube.pixelfitter :
PixelFitteror NoneAn instance of the
PixelFitterclass 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 :
HDUListHDUlists incorporating the best-fit values as the
PrimaryHDUimage and the errors asImageHDUs in the first (ERROR) extensionint_hdu :
PrimaryHDU(optional) An HDU containing an image of the integral in \(erg/s/cm^2\)