Return to directory of Todd's CASA extensions

Computes the image statistics and the center of mass (centroid) using scipy's center_of_mass function. See also imagePeak.


au.imageCentroid(imgfile, threshold=0, axis3channel=None, axis4channel=None, 
       fractionalThreshold=None, aperture=None, crpixOffset=None, 
       verbose=False, normalize=False, radec=False, blc=None, trc=None,
       keepThresholdImage=False, sigmaThreshold=None, applyMask=True)
  • threshold: ignore pixel values below this (positive) level when computing the centroid
  • axis3channel: which channel to use on 3rd axis (default=all)
  • axis4channel: which channel to use on 4th axis (default=all)
  • fractionalThreshold: sets the threshold with respect to the peak pixel value of the image
  • axis3channel: which channel to use on 3rd axis (default=all)
  • axis4channel: which channel to use on 4th axis (default=all)
  • aperture: diameter in arcsec within which to measure flux density
  • crpixOffset: compute offset from ref pixel in units: 'pixel', 'arcsec', or 'rad'
  • verbose: if True, print all flux stats
  • normalize: if threshold is set, then set all pixel values to 1.0
  • radec: if True, return the RA and Dec instead of the pixel coordinates
  • blc,trc: define the region to assess sigma for sigmaThreshold option
  • keepThresholdImage: write a new image corresponding to the threshold
  • radialThreshold: maximum radius in pixels from image center to consider when threshold is set (use this to avoid distant noise spikes)
  • applyMask: ignores masked pixels in the calculations


CASA <3>: au.imageCentroid('')
Image statistics: mean=0.010070 median=0.000000 max=1.155239 min=-0.034252
  Out[3]: (47.189305839062037, 48.143440396198635)

-- ToddHunter - 2013-11-03
Topic revision: r5 - 2015-02-05, 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