Y_AVERAGE [2] $SSW/smm/gen/idl/graphics/y_average.pro
[Previous] [Next]
 PROJECT:
	SDAC
 NAME:
	Y_AVERAGE

 PURPOSE:
       Get the average value of an array of displayed y values during a selected
	interval.

 CATEGORY:
       UTILITY, GEN, GRAPHICS

 CALLING SEQUENCE:
       Y_AVERAGE, Tarray, Yarray, Average

 CALLS: ***
	ATIME [1], ATIME [2], GETUTBASE [1], GETUTBASE [2], MARK_REGION [1]
	MARK_REGION [2]
 INPUTS:
       Tarray:		X-axis array
	Yarray:		Y-axis array

 OUTPUTS:
       Average:	Average of y values in specified interval.
	More outputs in keyword format.

 KEYWORDS:
       STIME_STR:      Interval starting time string: 'dd-Mon-yy hh:mm:ss.xxx'
	ETIME_STR:	Interval ending time string: 'dd-Mon-yy hh:mm:ss.xxx'
	WMESSAGE:       If set, instructions on marking using mouse with
			non-X device will be displayed.
	ERROR:          0 if no error, 1 if error.

 PROCEDURE:
	y_average gets the average value of an array of y values during a 
	specified interval.  Assumes that a time plot has been drawn.  
	mark_region is called to bring up cursor to allow user to specify 
	start and end time of region. Result is returned in average.

 MODIFICATION HISTORY:
       Written by ??
	Mod. 08/13/96 by RCJ. Added documentation.