Other grouping routines

  •  template <class T> void GroupBin(const std::vector<T>& inArray,
                                      const Integer mode,
                                      const grouping& GroupInfo,
                                      std::vector<T>& outArray)
    
     template <class T> void GroupBin(const std::valarray<T>& inArray,
                                      const Integer mode,
                                      const grouping& GroupInfo,
                                      std::valarray<T>& outArray)
    

    This routine applies GroupInfo to the input inArray to create the output outArray. The behavior is determined by mode which can take five values: SumMode which adds the contents of all bins in a group; SumQuadMode which adds the bins in quadrature; MeanMode which returns the arithmetic mean of the all bins in a group; FirstEltMode which returns the value of the first bin in each group; LastEltMode which returns the value of the last bin in each group.

  •  Integer readBinFactors(string filename, IntegerVector& StartBin, 
                            IntegerVector& EndBin, IntegerVector& BinFactor)
    

    Read a file containing grouping information and place into the arrays StartBin, EndBin and BinFactor. Each line of the file should have three numbers, the start bin, end bin, and grouping factor.




HEASARC Home | Observatories | Archive | Calibration | Software | Tools | Students/Teachers/Public

Last modified: Wednesday, 28-Feb-2024 16:27:31 EST