Documentation for jbiu/

Generated by IDLdoc

single page | use frames     summary     class     fields     routine details     file attributes

astro/

mean_by_radaz.pro


top source mean_by_radaz

Astro

result = mean_by_radaz(image, rbin=rbin, ntheta=ntheta, center=center, cropcircle=cropcircle, rotation=rotation, nan=nan)

Calculates the mean value of an image in bins of both radius and pie slices of azimuthal angle.

Return value

This function returns a structure containing the inner radii of each radial bin (tagged 'RADIAL_AXIS'), the image mean within each radial bin (tagged 'RADIAL_MEAN'), the starting azimuth of each azimuthal bin (tagged 'AZIMUTHAL_AXIS'), and the image mean within each azimuthal pie slice (tagged 'AZIMUTHAL_MEAN'). Note that azimuthal angle is calculated counterclockwise starting at the x-axis (unless ROTATION is specified).

Parameters

image in

2D image array.

Keywords

rbin in

Size of radial bins (in pixels). Default: 1.

ntheta in

Number of azimuthal bins. Default: 8.

center in

Pixel co-ordinate to consider the center. May be non-integer, or even off the image (as long as /CROPCIRCLE is not set). Default: Image center.

cropcircle in

Set this keyword to crop out the corners of the image, i.e. use only those pixels within the largest circle that is fully enclosed in the image.

rotation in

Start the first azimuthal bin at an angle ROTATION (in radians) from the x-axis. Default: 0.

nan in

Set this keyword to check for NaN or Infinity when calculating the means. Any such elements are treated as missing data.

Examples

Calculate the radial and azimuthal means of some image data, cutting out the "corners" that aren't fully sampled to the same radii. Use radial bins 2 pixels wide and azimuthal bins 30 degrees wide. imagedata = dist(25,25) imagemeans = MEAN_BY_RADAZ(imagedata, RBIN=2, NTHETA=12, /CROPCIRCLE)

Author information

History:

Written by: Jeremy Bailin, in response to a question by Andy Bohn. 17 June 2008 Public release in JBIU 18 June 2008 Fixed typo in documentation

File attributes

Modification date: Wed Apr 15 16:07:44 2009
Lines: 110