Skip to content

Instantly share code, notes, and snippets.

View jzuhone's full-sized avatar

John ZuHone jzuhone

View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import numpy as np
import astropy.io.fits as pyfits
def write_simput_file(ra, dec, energy, emin, emax, flux, prefix, sky_center=None,
clobber=False):
r"""
Write events to a SIMPUT file that may be read by the SIMX instrument
simulator. See the SIMPUT definition for reference:
http://hea-www.harvard.edu/heasarc/formats/simput-1.1.0.pdf

There are several different styles of projections that can be made either when creating a projection with ds.proj() or when making a ProjectionPlot.

"integrate": This is the default projection style. It simply integrates the requested field f(\textbf{x}) along a line of sight \textbf{\hat{n}}, given by the axis parameter:

g(\textbf{X}) = {\Big\int\ {f(\textbf{r})\textbf{\hat{n}}\cdot{\mathrm{d\textbf{x}}}}}

The units of the projected field g(\textbf{X}) will be the units of the unprojected field f(\textbf{x}) multiplied by the appropriate length unit, e.g., density in \mathrm{g\ cm^{-3}} will be projected to \mathrm{g\ cm^{-2}}. When using this style, a "weight_field" argument may also be specified, which will produce a weighted projection by

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.