grouping class public methods

  • grouping()
    
    grouping(IntegerVector inGroup, IntegerVector inQual)
    

    Constructors. First is the default and the second loads from an integer arrays of grouping and quality values.

  • ~grouping()
    

    Default destructor.

  • string disp() const
    

    Display grouping information. - return as a string.

  • void clear()
    

    Clear grouping information.

  • Integer read(string filename, const Integer Number, 
                 const Integer First)
    

    Read from an ascii file of grouping factors. Each line of the file should have three numbers, the start bin, end bin, and grouping factor. The input bin numbers start at First and there are Number in total.

  • void load(const Integer BinFactor, const Integer Number)
    

    Set the grouping flags for Number bins with a binning factor of BinFactor.

  • Integer load(const IntegerVector& StartBin, const IntegerVector& EndBin,
                 const IntegerVector& BinFactor, const Integer Number,
                 const Integer First)
    

    Set grouping flags from an array of binning information in the StartBin, EndBin and BinFactor arrays. The input bin numbers start at First and there are Number in total.

  • Integer loadFromVector(const IntegerVector& QualVector,
                           const IntegerVector GroupVector)
    

    Set grouping from quality and grouping vectors from a pha object.

  • template <class T>Integer loadMin(const T Minimum,
                                      const std::vector<T>& values)
    
    template <class T>Integer loadMin(const T Minimum,
                                      const std::vector<T>& Values,
                                      const Integer StartChannel,
                                      const Integer EndChannel)
    

    Set the grouping flags based on requiring a minimum value in each grouped bin when the values in each channel are those in the input Values array. Optionally only do this between the StartChannel and EndChannel channels. If StartChannel and EndChannel are identically zero then they are not used. Any channels not included in a complete bin have grouping flag set to 1 and quality flag set to 2.

  •  Integer loadOptimal(const RealVector& FWHM,
                         const IntegerVector& Counts,
                         const Integer StartChannel,
                         const Integer EndChannel,
                         const Integer minCounts)
    

    Sets grouping using optimal binning following Kaastra & Bleeker (2016, A&A 587, 151) based on the instrument FWHM. This assumes that the FWHM is that for each energy. If minCounts is non-zero then all bins must also have at least that many counts. Apply binning only between StartChannel and EndChannel unless both are zero. Any channels not included in a complete bin have grouping flag set to 1 and quality flag set to 2.

  •  Integer loadOptimalEnergy(const RealVector& FWHM, 
                               const IntegerVector& Counts)
    

    Sets grouping using optimal binning on the energy axis following Kaastra & Bleeker (2016, A&A 587, 151) based on the instrument FWHM. This assumes that the FWHM is that for each energy.

  • bool newBin(const Integer I) const
    

    Return whether I is the start of a bin.

  • bool inBin(const Integer I) const
    

    Return whether I is in a bin.

  • Integer size() const
    

    Return number of bins in grouping object.


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

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