stix2xspec.write_spectrum2fits module
- stix2xspec.write_spectrum2fits.make_rate_header(rate_header, spec, respfile=None)
Make the header for the Rate HDU. Translation of _stx_rate_header.pro_. :param rate_header: Default header for the Rate HDU. :type rate_header: astropy.header :param spec: Input spectrogram to make FITS headers for. :type spec: stix2xspec.Spectrogram :param respfile: Defaults to None. Response file name. :type respfile: str, optional
- Returns
FITS header.
- Return type
astropy.header
- stix2xspec.write_spectrum2fits.make_stix_header(spec, hdr=None, primary=False, respfile=None, extname='')
Make the primary header and default headers for all HDUs.
- Parameters
spec (stix2xspec.Spectrogram) – Input spectrogram to make FITS headers for.
hdr (astropy.header, optional) – Defaults to None. Input header to modify.
primary (bool, optional) – Defaults to False. True if the desired header is the primary header.
respfile (str, optional) – Response file name.
extname (str, optional) – Defaults to empty string. Name of the FITS extension.
- Returns
FITS header.
- Return type
astropy.header
- stix2xspec.write_spectrum2fits.ogip_time_calcs(spec)
Calculate time parameters to be written into the FITS file.
- Parameters
spec (stix2xspec.Spectrogram) – Input spectrogram to make FITS headers for.
- Returns
Dictionary containing the calculated values.
- Return type
dict