| |
- quickAnalysis
class quickAnalysis |
|
This is the base class. If you want to use this, you first
need to create an object from this method:
>>> qA = quickAnalysis('example_name', configFile = True)
will create an object called qA with the <basename> of
'example_name' and will read in all of the options from the config
file. You can create an example config frile via the writeConfig
function or via the command line with the -c option. You can also
pass all of the variables via the intial object initialiation
function (see below). Once you've created this object, you can
just execute the runAll function to execute all of the steps, or
use the functions individually as needed. |
|
Methods defined here:
- __init__(self, base='MySource', configFile=False, analysisConfig={'binsize': 0.10000000000000001, 'dec': 0, 'emax': 300000, 'emin': 100, 'ra': 0, 'rad': 10, 'tmax': 'INDEF', 'tmin': 'INDEF', 'zmax': 100}, commonConfig={'base': 'MySource', 'binned': False, 'eventclass': 2, 'irfs': 'P7SOURCE_V6', 'verbosity': 0})
- generateXMLmodel(self)
- Calls the quickUtils function to make an XML model of your
region based on the 2FGL. make2FGLXml.py needs to be in your
python path. This needs to have the galactic and isotropic
diffuse models in your working directory as well as the 2FGL
catalog in FITS format. See the corresponding function in
quickUtils for more details.
- runAll(self, run=True)
- Does a full event selection and exposure calculation. This
is the function called when this module is run from the
command line. You need to have two files to start with:
<basename>.list and <basename>_SC.fits. The first one is just
a text file with a list of the raw data files (one per line)
and the other is the spacecraft file. <basename> is a user
defined prefix (usually the source name but not necissarily).
Returns an exception if any of the files are not found.
- runCCUBE(self, run=True, nbins=30)
- Generates a counts cube. The dimensions of which are the
largest square subtended by the ROI. Note that if the ROI is
exceptionally small or the bin size exceptionally large, the
square might not be the largest posible since the npix
calculation floors the calculated value. The number of energy
bins is logarithmic and is defined by the nbins variable.
- runCMAP(self, run=True)
- Generates a counts map. The dimensions of which are the
largest square subtended by the ROI. Note that if the ROI is
exceptionally small or the bin size exceptionally large, the
square might not be the largest posible since the npix
calculation floors the calculated value.
- runExpCube(self, run=True, nbins=30)
- Generates a binned exposure map that is 20 degrees larger
than the ROI. The binned exposure map needs to take into
account the exposure on sources outside of the ROI. 20
degrees is the size of the PSF at low energies plus an extra
10 degrees for security. The energy binning is logarithmic
and the number of energy bins is defined by the nbins
variable.
- runExpMap(self, run=True)
- Generates an exposure map that is 10 degrees larger than
the ROI and has 120 pixels in each direction.
- runGTI(self, run=True, filterString='(DATA_QUAL>0)&&(LAT_CONFIG==1)', roi='yes')
- Executes gtmktime with the given filter
- runLTCube(self, run=True, zmax=180)
- Generates a livetime cube
- runModel(self, run=True)
- Wrapper for the same function in quickUtils
- runSelect(self, run=True, convtype=-1)
- Runs gtselect on the data using the initialization
parameters. User selected parameters include the conversion
type and the eventclass.
- runSrcMaps(self, run=True)
- Generates a source map for your region. Checks to make
sure that there's an XML model to be had and if not, creates
one from the 2FGL.
- writeConfig(self)
- Writes all of the initialization variables to the config
file called <basename>.cfg.
| |