OSISMEAN
Name
osismean
Purpose
Compute mean of a set of OSIRIS XD spectra.
Description
Given a set of spectra, this will perform a straight average of the
provided spectra. First, the relative signal level (relsig) is
computed between all members of the set. This relative level is
normalized to 1.0 for the individual spectrum with the highest
signal level. Then, only those spectra with relsig >= 0.8 will be
used for the set mean. If there aren't 4 spectra in this clase, then
the brightest 4 spectra will be used, unless there aren't 4 spectra.
In this latter case, all spectra will be averaged.
Category
Spectroscopy
Calling Sequence
osismean,spec,bad,specmean
Inputs
spec - Input spectrum to be cleaned up.
bad - Array of flags for each point. 0=good, 1=bad.
Optional Input Parameters
Keyword Input Parameters
REF - If provided, the relative signal levels are measure relative to
this spectrum out of the stack.
ALL - Flag, if true, forces averaging all spectra regardless of relsig.
NORMALIZE - Flag, if true, will renormalize all the spectra to REF prior to
averaging.
Outputs
relsig - Relative signal levels among set of input spectra.
specmean - Average spectrum from the set of spectra.
badmean - Bad flag vector for the average spectrum.
Keyword Output Parameters
SIGMA - Uncertainty of final weighted average output points. Note, any
uncertainty of zero means there is no uncertainty. This will
coincide mostly with points that aren't marked bad.
Common Blocks
Side Effects
Restrictions
Procedure
Modification History
98/08/13, Written by Marc W. Buie, Lowell Observatory
2000/10/1, MWB, added SIGMA keyword (calculation patterned after MEANERR2)