feather_simple

uvcombine.feather_simple(hires, lores, highresextnum=0, lowresextnum=0, highresscalefactor=1.0, lowresscalefactor=1.0, pbresponse=None, lowresfwhm=None, lowpassfilterSD=False, replace_hires=False, deconvSD=False, return_hdu=False, return_regridded_lores=False, match_units=True, weights=None)[source]

Fourier combine two single-plane images. This follows the CASA approach, as far as it is discernable. Both images should be actual images of the sky in the same units, not fourier models or deconvolved images.

The default parameters follow Equation 11 in section 5.2 of http://esoads.eso.org/abs/2002ASPC..278..375S very closely, except the interferometric data are not re-convolved with the interferometric beam. It seems that S5.2 of Stanimirovic et al 2002 actually wants the deconvolved model data, not the deconvolved clean data, as input, which would explain their equation. This may be a different use of the same words. lowresscalefactor corresponds to their f parameter.

There is a remaining question: does CASA-feather re-weight the SD image by its beam, as suggested in https://science.nrao.edu/science/meetings/2016/vla-data-reduction/DR2016imaging_jott.pdf page 24, or does it leave the single-dish image unweighted (assuming its beam size is the same as the effective beam size of the image) as inferred from the Feather source code?

Parameters:
highresfitsfilestr

The high-resolution FITS file

lowresfitsfilestr

The low-resolution (single-dish) FITS file

highresextnumint

The extension number to use from the high-res FITS file

lowresextnumint

The extension number to use from the low-res FITS file

highresscalefactorfloat

A factor to multiply the high-resolution data by to match the low- or high-resolution data

lowresscalefactorfloat

A factor to multiply the low-resolution data by to match the low- or high-resolution data

pbresponsendarray

The primary beam response of the high-resolution data. When given, highresfitsfile should not be primary-beam corrected. pbresponse will be multiplied with lowresfitsfile, and the feathered image will be divided by pbresponse to create the final image.

lowresfwhmastropy.units.Quantity

The full-width-half-max of the single-dish (low-resolution) beam; or the scale at which you want to try to match the low/high resolution data

lowpassfilterSD: bool or str

Re-convolve the SD image with the beam? If True, the SD image will be weighted by the beam, which effectively means it will be convolved with the beam before merging with the interferometer data. This isn’t really the right behavior; it should be filtered with the deconvolved beam, but in the current framework that effectively means “don’t weight the single dish data”. See http://keflavich.github.io/blog/what-does-feather-do.html for further details about what feather does and how this relates.

replace_hires: Quantity or False

If set, will simply replace the fourier transform of the single-dish data with the fourier transform of the interferometric data above the specified kernel level. Can be used in conjunction with either lowpassfilterSD or deconvSD. Must be set to a floating-point threshold value; this threshold will be applied to the single-dish kernel.

deconvSD: bool

Deconvolve the single-dish data before adding in fourier space? This “deconvolution” is a simple division of the fourier transform of the single dish image by its fourier transformed beam

return_hdubool

Return an HDU instead of just an image. It will contain two image planes, one for the real and one for the imaginary data.

return_regridded_loresbool

Return the 2nd image regridded into the pixel space of the first?

match_unitsbool

Attempt to match the flux units between the files before combining? See match_flux_units.

weightsndarray, optional

Provide an array of weights with the spatial shape of the high-res data. This is useful when either of the data have emission at the map edge, which will lead to ringing in the Fourier transform. A weights array can be provided to smoothly taper the edges of each map to avoid this issue. This will be applied to both the low and high resolution images!

Returns:
comboimage

The image of the combined low and high resolution data sets

combo_hdufits.PrimaryHDU

(optional) the image encased in a FITS HDU with the relevant header