PHA routines

  •  int ReadPHAtypeI(char *filename, long PHAnumber, struct PHA *phastruct)
    

    Read the type I SPECTRUM extension from a FITS file - if there are multiple SPECTRUM extensions then read the one with EXTVER=PHAnumber.

  •  int ReadPHAtypeII(char *filename, long PHAnumber, long NumberSpectra,
                       long *SpectrumNumber, struct PHA **phastructs)
    

    Read the type II SPECTRUM extension from a FITS file - if there are multiple SPECTRUM extensions then read the one with EXTVER=PHAnumber. Within the SPECTRUM extension reads the spectra listed in the SpectrumNumber vector.

  •  int WritePHAtypeI(char *filename, struct PHA *phastruct)
    

    Write the spectrum to a type I SPECTRUM extension in a FITS file.

  •  int WritePHAtypeII(char *filename, long NumberSpectra, 
                        struct PHA **phastructs)
    

    Write the multiple spectra to a type II SPECTRUM extension in a FITS file.

  •  int ReturnPHAtype(char *filename, long PHAnumber)
    

    Return the type of the SPECTRUM extension with EXTVER=PHAnumber.

  •  void DisplayPHAtypeI(struct PHA *phastruct)
    

    Write information about the spectrum to stdout.

  •  void DisplayPHAtypeII(long NumberSpectra, struct PHA **phastructs)
    

    Write information about multiple spectra to stdout.

  •  int RebinPHA(struct PHA *phastruct, struct BinFactors *bin)
    

    Rebin spectrum.

  •  int CheckPHAcounts(char *filename, long PHAnumber)
    

    Return 0 if COUNTS column exists and is integer or COUNTS column does not exist.

  •  long ReturnNumberofSpectra(char *filename, long PHAnumber)
    

    Return the number of spectra in the type II SPECTRUM extension which has EXTVER equal to PHAnumber.




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

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