drizzle_2d_spectrum

grizli.multifit.drizzle_2d_spectrum(beams, data=None, wlimit=[1.05, 1.75], dlam=50, spatial_scale=1, NY=10, pixfrac=0.6, kernel='square', convert_to_flambda=True, fcontam=0.2, fill_wht=False, ds9=None, mask_segmentation=True)[source]

Drizzle 2D spectrum from a list of beams

Parameters:
beams : list of BeamCutout objects
data : None or list

optionally, drizzle data specified in this list rather than the contamination-subtracted arrays from each beam.

wlimit : [float, float]

Limits on the wavelength array to drizzle ([wlim, wmax])

dlam : float

Delta wavelength per pixel

spatial_scale : float

Relative scaling of the spatial axis (1 = native pixels)

NY : int

Size of the cutout in the spatial dimension, in output pixels

pixfrac : float

Drizzle PIXFRAC (for kernel = ‘point’)

kernel : str, (‘square’ or ‘point’)

Drizzle kernel to use

convert_to_flambda : bool, float

Convert the 2D spectrum to physical units using the sensitivity curves and if float provided, scale the flux densities by that value

fcontam: float

Factor by which to scale the contamination arrays and add to the pixel variances.

fill_wht: bool

Fill wht==0 pixels of the beam weights with the median nonzero value.

ds9: `~grizli.ds9.DS9`

Show intermediate steps of the drizzling

Returns:
hdu : HDUList

FITS HDUList with the drizzled 2D spectrum and weight arrays