ctools  2.0.0
 All Classes Namespaces Files Functions Variables Macros Pages
cscripts.cspull.cspull Class Reference
Inheritance diagram for cscripts.cspull.cspull:

Public Member Functions

def __init__
 
def __getstate__
 
def __setstate__
 
def process
 
def models
 
def save
 
def pull_distribution
 

Private Member Functions

def _get_parameters
 
def _obs_string
 
def _trial
 
def _create_fits
 

Private Attributes

 _fits
 
 _nthreads
 

Detailed Description

Generates pull distributions for a model

Definition at line 32 of file cspull.py.

Constructor & Destructor Documentation

def cscripts.cspull.cspull.__init__ (   self,
  argv 
)
Constructor

Definition at line 37 of file cspull.py.

Member Function Documentation

def cscripts.cspull.cspull.__getstate__ (   self)
Extend ctools.csobservation getstate method to include some members

Returns
-------
state : dict
    Pickled instance

Definition at line 52 of file cspull.py.

References cscripts.cspull.cspull._fits, cscripts.csphasecrv.csphasecrv._fits, cscripts.cslightcrv.cslightcrv._fits, cscripts.cspull.cspull._nthreads, cscripts.csphagen.csphagen._nthreads, cscripts.csphasecrv.csphasecrv._nthreads, and cscripts.cslightcrv.cslightcrv._nthreads.

def cscripts.cspull.cspull.__setstate__ (   self,
  state 
)
Extend ctools.csobservation setstate method to include some members

Parameters
----------
state : dict
    Pickled instance

Definition at line 69 of file cspull.py.

References cscripts.cspull.cspull._fits, cscripts.csphasecrv.csphasecrv._fits, cscripts.cslightcrv.cslightcrv._fits, cscripts.cspull.cspull._nthreads, cscripts.csphagen.csphagen._nthreads, cscripts.csphasecrv.csphasecrv._nthreads, and cscripts.cslightcrv.cslightcrv._nthreads.

def cscripts.cspull.cspull._create_fits (   self,
  results 
)
private
Create FITS file from results

Parameters
----------
results : list of dict
    List of result dictionaries

Definition at line 346 of file cspull.py.

References cscripts.cspull.cspull._fits, cscripts.csphasecrv.csphasecrv._fits, and cscripts.cslightcrv.cslightcrv._fits.

Referenced by cscripts.cstsdist.cstsdist.process(), cscripts.cspull.cspull.process(), cscripts.cssens.cssens.process(), and cscripts.csspec.csspec.process().

def cscripts.cspull.cspull._obs_string (   self,
  obs 
)
private
Generate summary string for observation

Parameters
----------
obs : `~gammalib.GCTAObservation`
    Observation

Returns
-------
text : str
    Summary string

Definition at line 143 of file cspull.py.

Referenced by cscripts.cspull.cspull._trial().

def cscripts.cspull.cspull._trial (   self,
  seed 
)
private
Compute the pull for a single trial

Parameters
----------
seed : int
    Random number generator seed

Returns
-------
result : dict
    Dictionary of results

Definition at line 181 of file cspull.py.

References cscripts.cspull.cspull._obs_string(), cscripts.cspull.cspull.models(), ctobservation.obs(), cscripts.csobsdef.csobsdef.obs(), and cscripts.csiactobs.csiactobs.obs().

Referenced by cscripts.cstsdist.cstsdist.process(), and cscripts.cspull.cspull.process().

def cscripts.cspull.cspull.models (   self,
  models 
)
Set model

Parameters
----------
models : `~gammalib.GModels`
    Set model container

Definition at line 493 of file cspull.py.

References ctobservation.obs(), cscripts.csobsdef.csobsdef.obs(), and cscripts.csiactobs.csiactobs.obs().

Referenced by cscripts.cspull.cspull._get_parameters(), cscripts.cspull.cspull._trial(), and cscripts.cstsdist.cstsdist.process().

def cscripts.cspull.cspull.process (   self)
def cscripts.cspull.cspull.pull_distribution (   self)
Return pull distribution FITS file

Returns:
    FITS file containing pull distribution

Definition at line 530 of file cspull.py.

References cscripts.cspull.cspull._fits, cscripts.csphasecrv.csphasecrv._fits, and cscripts.cslightcrv.cslightcrv._fits.

def cscripts.cspull.cspull.save (   self)

Member Data Documentation


The documentation for this class was generated from the following file: