Image Statistics and Histograms

- Task histo
is a fairly commonly used task, giving a number of
image statistics and a simple histogram. Apart from the input image
(keyword
`in`), it can take a region of interest (`region`), a range to determine the histogram over (`range`), and the number of bins in the histogram (`nbins`).**HISTO**in=vela.imap Input image region Select region of interest range=-0.1,1 Range for histogram. Default is image min and max. nbins=# Number of bins in the histogram Unset for default of 20 - If you do not like histo, or you would like a PGPLOT plot of
the histogram, you could use the task imhist
instead. This task
will also optionally draw, on the histogram, a Gaussian with the same
mean, rms and integral as the actual histogram. This task, and its
friend imstat
use the
`options`keyword atypically to input numeric (rather than just logical) information - see the help file and the example below.Here we plot the histogram with 20 bins with a connected line style. We also do not allow any values below zero to contribute to this histogram.

**IMHIST**in=vela.imap Input image region=# Select region of interest options=nbin,20,style,connect Specify desired options cutoff=0.0 Discard negative pixels device=/xs Plot on X window - Complementing imhist
is imstat. This task gives you
statistics about your image in the selected region. It computes the
statistic either over a row or a plane of data.
- For example, let us look at the rms value of a cube computed over each
RA-DEC plane. Note that it does
not matter what order the cube is in. For example, it might be in vxy
order. imstat
will average over the xy planes regardless.
**IMSTAT**in=zeeman.vcub Input image cube region=image(50,450) Select region of interest plot=rms Plot rms options Unset axes=ra,dec Compute statistic over RA-DEC plane cutoff Unset device=/xs Plot on X window log=numbers.log Write numbers to log file - By setting the
`axes`keyword to a single axis, imstat will compute the statistic over a single row. Be warned that this can produce a lot of output. For example, if you wanted to see the sum along the velocity axis plotted as a function of RA and DEC position in your cube you could do**IMSTAT**in=zeeman.vcub Input image cube plot=sum Compute the sum. axes=velocity Compute statistic over the velocity axis. device=/xs

- For example, let us look at the rms value of a cube computed over each
RA-DEC plane. Note that it does
not matter what order the cube is in. For example, it might be in vxy
order. imstat
will average over the xy planes regardless.
- You may wish to integrate your image in concentric ellipses, thus
producing an azimuthally averaged profile. You can do this with
ellint. Each plane of a cube is integrated separately. There is
no graphical output, just some tables of numbers which you can
optionally write to a log file and plot with your favourite plotting
program. In this example, we integrate 10 circular rings from 0 to
100 arcsec centred on a pixel offset from the reference pixel by -5
and 10.3 arcsec in RA and DEC. We also make a primary beam correction
and write the results to a log file.
**ELLINT**in=ngc1313.mom0 Input image region Full region center=-5,10.3 Offset from reference pixel pa Unset for face-on incline circular rings radius=0,100,10 Radii of rings options=pbcorr Correct for primary beam log=rings.1313 Write the results to log file

2016-06-21