/* @file pmConceptsAverage.h
 * @brief Average the values of multiple concepts
 *
 * @author Paul Price, IfA
 *
 * @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
 * @date $Date: 2007-01-24 02:54:14 $
 * Copyright 2005-2006 Institute for Astronomy, University of Hawaii
 */

#ifndef PM_CONCEPTS_AVERAGE_H
#define PM_CONCEPTS_AVERAGE_H

/// @addtogroup Concepts Data Abstraction Concepts
/// @{

#include <pslib.h>
#include "pmFPA.h"

/// Set a variety of concepts in a cell by averaging over several
///
/// In some instances, we want to combine the values of a concept for several cells into a single concept for
/// a single cell (e.g., when mosaicking multiple cells into a chip with one "cell").  This function averages
/// the values of various concepts:
/// - CELL.GAIN
/// - CELL.READNOISE
/// - CELL.EXPOSURE
/// - CELL.DARKTIME
/// - CELL.TIME
/// For other concepts, it ensures the values are consistent:
/// - CELL.READDIR
/// - CELL.TIMESYS
/// And for others, it takes the "worst" possible value:
/// - CELL.SATURATION
/// - CELL.BAD
bool pmConceptsAverageCells(pmCell *target,///< Target cell
                            psList *sources, ///< List of source cells
                            psRegion *trimsec, ///< The new trim section
                            psRegion *biassec ///< The new bias section
                           );

/// @}
#endif
