threeML.utils.OGIP.pha module

class threeML.utils.OGIP.pha.PHAII(instrument_name: str, telescope_name: str, tstart: ndarray, telapse: ndarray, channel: ndarray, rate: ndarray, quality: ndarray, grouping: ndarray, exposure: ndarray, backscale: ndarray, respfile: ndarray, ancrfile: ndarray, back_file: Optional[ndarray] = None, sys_err: Optional[ndarray] = None, stat_err: Optional[ndarray] = None, is_poisson: bool = False)[source]

Bases: FITSFile

classmethod from_fits_file(fits_file) FITSFile[source]
classmethod from_time_series(time_series, use_poly=False) PHAII[source]
property instrument
class threeML.utils.OGIP.pha.PHAWrite(*ogiplike)[source]

Bases: object

write(outfile_name: str, overwrite: bool = True, force_rsp_write: bool = False) None[source]

Write a PHA Type II and BAK file for the given OGIP plugin. Automatically determines if BAK files should be generated.

  • outfile_name – string (excluding .pha) of the PHA to write

  • overwrite – (optional) bool to overwrite existing file

  • force_rsp_write – force the writing of an RSP


class threeML.utils.OGIP.pha.SPECTRUM(tstart, telapse, channel, rate, quality, grouping, exposure, backscale, respfile, ancrfile, back_file=None, sys_err=None, stat_err=None, is_poisson=False)[source]

Bases: FITSExtension