linearmosaic¶
-
class
linearmosaic
[source]¶ combining images in a weighted fashion
The
linearmosaic
tool (lm
) provides a toolkit for stitching images in a weighted fashion.The default linear mosaic equation is defined by Equation (6) in Cornwell, Holdaway et al (Astronomy and Astrophysics, Vol. 271, p. 697 (1993)).
\[I^{lm}( heta)={{\sum\_p A\_p( heta)(I\_p( heta)A\_p( heta))w\_p}\over{\sum\_p A\_p^2( heta)w\_p}}\]where \(A\_p( heta)\) is the primary beam (PB) of a given pointing \(p\), \(w\_p\) is a sensitivity weight and the image of that pointing is \(I\_p( heta)\); the linear mosaic being \(I^{lm}( heta)\)
Methods Summary
Set the output direction image parameters and name
Construct a linearmosaic tool
mosaic images in a weighted fashion onto ouput image
Use this function to create a Sault-weighted image
Use this function to set if you want to mosaic in flatnoise domain
Use this function to mosaic on an existing image and weight image
-
defineoutputimage
(nx=128, ny=- 1, cellx='1.0', celly='', imagecenter='0', outputimage='', outputweight='')[source]¶ Set the output direction image parameters and name
Define the direction axes output image parameters. The output image will get the same number of spectral and polarization planes as the input images. This function create a fresh new output image. If an image of the same name exist on disk it will be erased. The spectral and polarization part of the image will be identical to the images that are being mosaiced.
The output image will by default be flux correct and the weight image will be ${sum_p A_p^2( heta)}$ where the primary beam is $ A_p( heta)$
Parameters
nx (int=128)
- Total number of spatial pixels in xny (int=-1)
- Total number of spatial pixels in ycellx (variant='1.0')
- Cellsize in x (e.g. ‘1arcsec’)celly (variant='')
- Cellsize in y (e.g. ‘1arcsec’)imagecenter (variant='0')
- Direction of phase center as a diretion measureoutputimage (string='')
- output image nameoutputweight (string='')
- output weight image name
-
makemosaic
(images='', weightimages='', imageweighttype=1, weighttype=1)[source]¶ mosaic images in a weighted fashion onto ouput image
Put the list of images onto the mosaic image using the weight images
Parameters
images (variant='')
- Name of images to mosaicweightimages (variant='')
- Name of images to mosaicimageweighttype (int=1)
- what kind of weight is already applied to image0: flux correct
1: Primary beam equivalent weight
2: PB^2 equivalent
weighttype (int=1)
- what kind of weight image it is1: Primary beam equivalent weight
2: PB^2 equivalent
-
saultweightimage
(outputimage='', fracpeak=0.1)[source]¶ Use this function to create a Sault-weighted image
“Sault weighted” image is one which is more pleasant to view (without high noise at the edges of mosaic images), it is flux correct upto a where the beam coverage becomes low and is tapered off onwards just to keep the noise from rising in the overall image(see Eq[2] from Sault, Staveley-Smith and Brouw (1996), Astron. Astrophys. Suppl, 120, 375)
Parameters
outputimage (string='')
- Name of image to create the Sault-Weighted imagefracpeak (double=0.1)
- Upto what fraction of peak of coverage should the image be flux correct
-
setlinmostype
(linmostype='optimal')[source]¶ Use this function to set if you want to mosaic in flatnoise domain
Use this function if the mosaicing is to be done using a non optimal weighting mode.
For now { t optimal} (which is the default) follows this equation egin{equation} I^{lm}( heta)={{sum_p A_p( heta)(I_p( heta)A_p( heta))w_p}over{sum_p A_p^2( heta)w_p}} end{equation}
And { t pbweight} follows this one egin{equation} I^{lm}( heta)={{sum_p (I_p( heta)A_p( heta))w_p}over{sum_p A_p( heta)w_p}} end{equation}
where $A_p( heta)$ is the primary beam (PB) of a given pointing $p$, $w_p$ is a sensitivity weight and the image of that pointing is $I_p( heta)$; the linear mosaic being $I^{lm}( heta)$ For now $w_p=1$
Parameters
linmostype (string='optimal')
- Type of weighting for linear mosaic
-
setoutputimage
(outputimage='', outputweight='', imageweighttype=1, weighttype=1)[source]¶ Use this function to mosaic on an existing image and weight image
Use this function if the mosaicing is to be done onto a previous mosaic or image. For now the stokes and spectral characteristic of the images to be mosaic and the output image has to be similar (i.e the user has to regrid them prior to linearmosaic if necessary). The weightimage represents the sensitivity image of the image (for example the weighted primary beam coverage of a mosaic)
{ t imageweighttype} parameter:
If the image is of the type that has been normalized to be flux correct then the imageweighttype should 0. If the image has been apodized by a primary beam then imageweighttype should be 1 and if the image is multiplied by $PB^2$ then it should be 2.
{ t weighttype} parameter: This should be 1 if the weight image is the sum of Primary beams or equivalent and it should be 2 if it is the sum of of $PB^2$
Parameters
outputimage (string='')
- Existing mosaic imagenameoutputweight (string='')
- Existing weight image for mosaicimageweighttype (int=1)
- what kind of weight was already applied to image0: flux correct
1: Primary beam equivalent weight
2: $PB^2$ equivalent weight
weighttype (int=1)
- what kind of weight is weight image1: Primary beam equivalent weight
2: $PB^2$ equivalent
-