Event Lists API¶
Classes for generating lists of detected events
- class pyxsim.event_list.EventList(filespec)[source]¶
-
- write_fits_file(fitsfile, fov, nx, overwrite=False)[source]¶
Write events to a FITS binary table file. The result is an “event file” which can be opened in ds9, binned into a spectrum, etc., but NOTE that this does NOT represent an actual observation since no instrumental effects are included.
- Parameters:
fitsfile (string) – The name of the event file to write.
fov (float, (value, unit) tuple, unyt_quantity, or Quantity) – The field of view of the event file. If units are not provided, they are assumed to be in arcminutes.
nx (integer) – The resolution of the image (number of pixels on a side).
overwrite (boolean, optional) – Set to True to overwrite a previous file.
- write_fits_image(imagefile, fov, nx, emin=None, emax=None, overwrite=False)[source]¶
Generate an image by binning X-ray counts and write it to a FITS file.
- Parameters:
imagefile (string) – The name of the image file to write.
fov (float, (value, unit) tuple, unyt_quantity, or Quantity) – The field of view of the image. If units are not provided, they are assumed to be in arcminutes.
nx (integer) – The resolution of the image (number of pixels on a side).
emin (float, optional) – The minimum energy of the photons to put in the image, in keV.
emax (float, optional) – The maximum energy of the photons to put in the image, in keV.
overwrite (boolean, optional) – Set to True to overwrite a previous file.
- write_spectrum(specfile, emin, emax, nchan, overwrite=False)[source]¶
Bin observer-frame event energies into a spectrum and write it to a FITS binary table. This is for an unconvolved spectrum.
- Parameters:
specfile (string) – The name of the FITS file to be written.
emin (float) – The minimum energy of the spectral bins in keV.
emax (float) – The maximum energy of the spectral bins in keV.
nchan (integer) – The number of channels.
overwrite (boolean, optional) – Set to True to overwrite a previous file.
- write_to_simput(prefix, overwrite=False)[source]¶
Write events to a SIMPUT catalog that may be utilized by various instrument simulators.
- Parameters:
prefix (string) – The filename prefix. The files to be written have the signature: f”{prefix}_simput.fits”, f”{prefix}_phlist.fits”, etc.
overwrite (boolean, optional) – Set to True to overwrite previous files.