grouping class public methods

  • grouping()
    
    grouping(vector<Integer> inGroup, vector<Integer> 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 vector<Integer>& StartBin, const vector<Integer>& EndBin, 
                 const vector<Integer>& 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 vector<Integer>& QualVector,
                           const vector<Integer> GroupVector)
    

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

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

    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 vector<Real>& FWHM, 
                         const vector<Integer>& Counts,
                         const Integer StartChannel = 0, 
                         const Integer EndChannel = 0
                         const Integer minCounts = 0)
    

    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 vector<Real>& FWHM, 
                         const vector<Integer>& 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, 23-Mar-2022 21:09:02 EDT