quickPlot (version 0.1.4rc)
index

Plots DS9 field of view of the Fermi LAT data analysis results.
 
This module generates the residual and significance maps starting
from the count and model maps (created and used in the likelihood 
analysis of the Fermi LAT data). All the maps are then plotted using 
DS9 for an easy comparison.
 
There are two ways to run this module: from within python or from 
the command line.  The simplest way to run it is from the command line.
 
First, generate a default config file:
 
quickPlot (-i|--initialize)
 
Then edit the config file to match your specific analysis by filling
out the various options.  Next, run the command again:
 
quickPlot (-p|--plot) (-n |--basename=)<basename>
 
where <basename> is the prefix you've chosen to use; usually the name
of your source of interest but not necessarily so.
 
If you want to run this from within python, you'll need to first
create a quickPlot object and then you can use the various
functions below.  See the documentation for the individual functions
for more details.
 
This module logs all of the steps to a file called
<basename>_quickPlot.log as well as to the screen.

 
Modules
       
ConfigParser
StringIO
array
commands
logging
math
numpy
os
pyfits
shlex
subprocess
sys
time
xpa

 
Classes
       
quickPlot

 
class quickPlot
    This is the base class.  If you want to use this, you first
need to create an object from this method:
 
>>> qP = quickPlot('example_name', configFile = True)
 
will create an object called qP with the <basename> of
'example_name' and will read in all of the options from the config
file.  You can create an example config file 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, plotConfig={'binfactor': 0, 'colorframe1': 'aips0', 'colorframe2': 'a', 'colorframe3': 'aips0', 'colorframe4': 'aips0', 'grid': 'yes', 'gridcolor': 'black', 'gridfont': 14, 'labelcolor': 'black', 'labelfont': 'helvetica 10 bold', ...}, likelihoodConfig={'drmtol': 0.10000000000000001, 'mintol': 0.0001, 'model': 'MySource_model.xml', 'sourcename': 'Source Name'}, 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})
createCMAP(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.
createModelMap(self, modelFile='', run=True)
Wrapper for the model map routine in quickUtils
createResidMap(self, run=True)
Generates a residual map
createSigMap(self, run=True)
Generates a significance map.
plotMaps(self, run=True)
"Uses ds9 to plot the count, model, residual and significance maps
rebinMap(self, filebase, run=True, method='adapt')
Rebins the maps so that the resulting images are easier to see.
Can either do a flat rebinning (pass 'rebin' to the method) or
adaptive smoothing to use fadapt.
runAll(self, modelFile='', run=True)
Generates the model, residual and significance maps and
plot them together with the input count map.  This is the 
function called when this module is run from the command 
line.  <basename> is a user defined prefix (usually 
the source name but not necessarily).
writeConfig(self)
Writes all of the initialization variables to the config
file called <basename>.cfg.

 
Functions
       
acos(...)
acos(x)
 
Return the arc cosine (measured in radians) of x.
acosh(...)
acosh(x)
 
Return the hyperbolic arc cosine (measured in radians) of x.
asin(...)
asin(x)
 
Return the arc sine (measured in radians) of x.
asinh(...)
asinh(x)
 
Return the hyperbolic arc sine (measured in radians) of x.
atan(...)
atan(x)
 
Return the arc tangent (measured in radians) of x.
atan2(...)
atan2(y, x)
 
Return the arc tangent (measured in radians) of y/x.
Unlike atan(y/x), the signs of both x and y are considered.
atanh(...)
atanh(x)
 
Return the hyperbolic arc tangent (measured in radians) of x.
ceil(...)
ceil(x)
 
Return the ceiling of x as a float.
This is the smallest integral value >= x.
cli()
Command-line interface.  Call this without any options for usage notes.
copysign(...)
copysign(x,y)
 
Return x with the sign of y.
cos(...)
cos(x)
 
Return the cosine of x (measured in radians).
cosh(...)
cosh(x)
 
Return the hyperbolic cosine of x.
degrees(...)
degrees(x) -> converts angle x from radians to degrees
exp(...)
exp(x)
 
Return e raised to the power of x.
fabs(...)
fabs(x)
 
Return the absolute value of the float x.
factorial(...)
factorial(x) -> Integral
 
Find x!. Raise a ValueError if x is negative or non-integral.
floor(...)
floor(x)
 
Return the floor of x as a float.
This is the largest integral value <= x.
fmod(...)
fmod(x,y)
 
Return fmod(x, y), according to platform C.  x % y may differ.
frexp(...)
frexp(x)
 
Return the mantissa and exponent of x, as pair (m, e).
m is a float and e is an int, such that x = m * 2.**e.
If x is 0, m and e are both 0.  Else 0.5 <= abs(m) < 1.0.
fsum(...)
sum(iterable)
 
Return an accurate floating point sum of values in the iterable.
Assumes IEEE-754 floating point arithmetic.
hypot(...)
hypot(x,y)
 
Return the Euclidean distance, sqrt(x*x + y*y).
isinf(...)
isinf(x) -> bool
Checks if float x is infinite (positive or negative)
isnan(...)
isnan(x) -> bool
Checks if float x is not a number (NaN)
ldexp(...)
ldexp(x, i) -> x * (2**i)
log(...)
log(x[, base]) -> the logarithm of x to the given base.
If the base not specified, returns the natural logarithm (base e) of x.
log10(...)
log10(x) -> the base 10 logarithm of x.
log1p(...)
log1p(x)
 
Return the natural logarithm of 1+x (base e).
      The result is computed in a way which is accurate for x near zero.
modf(...)
modf(x)
 
Return the fractional and integer parts of x.  Both results carry the sign
of x and are floats.
pow(...)
pow(x,y)
 
Return x**y (x to the power of y).
radians(...)
radians(x) -> converts angle x from degrees to radians
sin(...)
sin(x)
 
Return the sine of x (measured in radians).
sinh(...)
sinh(x)
 
Return the hyperbolic sine of x.
sqrt(...)
sqrt(x)
 
Return the square root of x.
tan(...)
tan(x)
 
Return the tangent of x (measured in radians).
tanh(...)
tanh(x)
 
Return the hyperbolic tangent of x.
trunc(...)
trunc(x:Real) -> Integral
 
Truncates x to the nearest Integral toward 0. Uses the __trunc__ magic method.

 
Data
        TsMap = <GtApp.GtApp object>
__author__ = 'Davide Donato (FSSC)'
__version__ = '0.1.4rc'
addCubes = <GtApp.GtApp object>
counts_map = <GtApp.GtApp object>
diffResps = <GtApp.GtApp object>
e = 2.7182818284590451
evtbin = <GtApp.GtApp object>
expCube = <GtApp.GtApp object>
expMap = <GtApp.GtApp object>
filter = <GtApp.GtApp object>
gtexpcube2 = <GtApp.GtApp object>
like = <GtApp.GtApp object>
maketime = <GtApp.GtApp object>
model_map = <GtApp.GtApp object>
obsSim = <GtApp.GtApp object>
pi = 3.1415926535897931
rspgen = <GtApp.GtApp object>
srcMaps = <GtApp.GtApp object>

 
Author
        Davide Donato (FSSC)