normalizeImage

Return to directory of Todd's CASA extensions

Read a CASA image (or list of images), and normalize the intensity scale to a specified value (default=1.0), or round or truncate it to integer values. See also imshift and scaleImage.

Usage:

au.normalizeImage(img, value=1.0, regrid=False, newimage='', ceiling=False, 
           round=False, floor=False, flatten=False)
  • img: name of a CASA image. If a wildcard (*) is included, then process all matching files.
  • value: the value to which to normalize the peak
  • regrid: if True, then call convertImageToDirectionType after normalizing
  • newimage: output image, default=img+'.normalized'
  • ceiling: if True, then instead of normalizing, round to next highest integer
  • round: if True, then instead of normalizing, round to nearest integer
  • floor: if True, then instead of normalizing, truncate to next lowest integer
  • flatten: if True, then set all (unmasked) pixels to the specified value

Example:

CASA <2>: au.normalizeImage('PM04_BEAM_FINAL_FITS.im')
Peak =  1.00095593929
New Peak =  1.0
New image =  PM04_BEAM_FINAL_FITS.im.normalized

-- ToddHunter - 2014-03-04

This topic: ALMA > TWikiUsers > ToddHunter > CasaExtensions > NormalizeImage
Topic revision: 2015-01-22, ToddHunter
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding NRAO Public Wiki? Send feedback