AS - Average images - find variance

(09/25/06)

PURPOSE

Adds 2 or more files, computing several measures of variance (per point, total, etc.). The sum and the variance images are stored in separate output files. The command works for, 2D, 3D, real or complex data. WARNING: See Note 3 below if you want a better variance measure! Use of this command for variances is no longer recommended!   Example.

SEE ALSO

AS F [Average images - find statistics & ''Q'' factor map ||]
AS R [Average image/volume series, optional subset]

USAGE

.OPERATION: AS [avgoff]
[The optional register variable (named [avgooff] in this example) receives the value of the average offset.]

.INPUT FILE TEMPLATE (EG. PIC****): PIC***
[Enter prefix of images to be added.]

.FILE NUMBERS OR SELECTION DOC. FILE NAME: : 1-10,12
[Enter numbers of files within a series to be added.]

.ALL, ODD-EVEN (A/O): O
['A '- all images will be added, 'O' - two subaverages will be calculated: one for odd-numbered images and one for even numbered images. For this option the next two questions will appear twice.]

.AVERAGE FILE: AVG001
[Enter name of output file receiving average.]

.VARIANCE FILE: VAR001
[Enter name of output file receiving variance map.]

[Questions for average and variance files are repeated if option 'O' was chosen.]

The following values are then printed out:

Number of images
Number of elements
Total variance
Total std. deviation
Variance per point
Std. deviation per point
Average offset
Variance of average image

NOTES

  1. The average file will be normalized so that its mean pixel value is equal to 0. To "restore" MIN and MAX values comparable to those of the input files, use 'AR'. For example, if the average offset was 0.00131, you would have ((P1+0.00131)*1.), with P1 as the input average file. This is important if you intend to contour the average using 'FC', since negative values in the file will give a nonsense result.

  2. If the optional register (e.g. [avgoff]) is used, 'AR' can be used with the formula ((P1+[var])*1.). If you calculate an average in more than one step, each average-offset is independent. To get the correct average-offset of the complete image, the average of the subaverage average-offsets has to be used.

  3. This version of 'AS' subtracts the average from each image during the calculation of global average and variance. Thus, this operation gives a variance estimator which is usually far 'too optimistic' - the variance obtained is too small and cannot be used for statistical tests. Use 'AS R'. instead.

SUBROUTINES

ADDS

CALLER

UTIL2

© Copyright Notice /       Enquiries: spider@wadsworth.org