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

Public Member Functions

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

Private Member Functions

def _get_parameters
 
def _get_instrument
 
def _generate_initial_model
 
def _select_events
 
def _create_nodes
 
def _generate_bkg
 
def _generate_runwise_bkg
 

Private Attributes

 _models
 
 _instrument
 

Detailed Description

Generates background model

Definition at line 29 of file csbkgmodel.py.

Constructor & Destructor Documentation

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

Definition at line 34 of file csbkgmodel.py.

Member Function Documentation

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

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

Definition at line 49 of file csbkgmodel.py.

References cscripts.csbkgmodel.csbkgmodel._instrument, and cscripts.csbkgmodel.csbkgmodel._models.

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

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

Definition at line 67 of file csbkgmodel.py.

References cscripts.csbkgmodel.csbkgmodel._instrument, and cscripts.csbkgmodel.csbkgmodel._models.

def cscripts.csbkgmodel.csbkgmodel._create_nodes (   self,
  model 
)
private
Replace spectral model by node function

Parameters
----------
model : `~gammalib.GModelData()`
    Input background model

Returns
-------
model : `~gammalib.GModelData()`
    Background model with spectral node function

Definition at line 310 of file csbkgmodel.py.

Referenced by cscripts.csbkgmodel.csbkgmodel._generate_bkg().

def cscripts.csbkgmodel.csbkgmodel._generate_bkg (   self,
  obs 
)
private
Generate background models

Parameters
----------
obs : `~gammalib.GObservations()`
    Observations container

Returns
-------
model : `~gammalib.GModelData()`
    Background model component

Definition at line 344 of file csbkgmodel.py.

References cscripts.csbkgmodel.csbkgmodel._create_nodes(), cscripts.csbkgmodel.csbkgmodel._generate_initial_model(), cscripts.csbkgmodel.csbkgmodel._select_events(), and cscripts.csbkgmodel.csbkgmodel.models().

Referenced by cscripts.csbkgmodel.csbkgmodel._generate_runwise_bkg(), and cscripts.csbkgmodel.csbkgmodel.process().

def cscripts.csbkgmodel.csbkgmodel._generate_initial_model (   self,
  sigma_min = 2.0,
  sigma_max = 1000.0 
)
private
Generate initial background model

Parameters
----------
sigma_min : float, optional
    Minimum sigma
sigma_max : float, optional
    Maximum sigma

Returns
-------
model : `~gammalib.GModelData()`
    Background model

Definition at line 154 of file csbkgmodel.py.

References cscripts.csbkgmodel.csbkgmodel._instrument.

Referenced by cscripts.csbkgmodel.csbkgmodel._generate_bkg().

def cscripts.csbkgmodel.csbkgmodel._generate_runwise_bkg (   self)
private
def cscripts.csbkgmodel.csbkgmodel._get_instrument (   self)
private
Get instrument name

Extracts the instrument name from the observation container. If there
are multiple instruments in the container then use the "instrument"
parameter to set the instrument name.

Returns
-------
instrument : str
    Instrument name

Definition at line 127 of file csbkgmodel.py.

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

Referenced by cscripts.csbkgmodel.csbkgmodel._get_parameters().

def cscripts.csbkgmodel.csbkgmodel._get_parameters (   self)
private
Get parameters from parfile

Definition at line 85 of file csbkgmodel.py.

References cscripts.csbkgmodel.csbkgmodel._get_instrument(), cscripts.csbkgmodel.csbkgmodel._instrument, ctobservation.obs(), cscripts.csobsdef.csobsdef.obs(), and cscripts.csiactobs.csiactobs.obs().

Referenced by cscripts.csmodelinfo.csmodelinfo.process(), cscripts.csobsinfo.csobsinfo.process(), cscript_base.cscript_base.process(), cscript_like.cscript_like.process(), cscript_obs.cscript_obs.process(), cscripts.csmodelmerge.csmodelmerge.process(), cscripts.csiactdata.csiactdata.process(), cscripts.cstsmapsplit.cstsmapsplit.process(), cscripts.csresmap.csresmap.process(), cscripts.cscaldb.cscaldb.process(), cscripts.csmodelsois.csmodelsois.process(), cscripts.csobsdef.csobsdef.process(), cscripts.csfindobs.csfindobs.process(), cscripts.csmodelselect.csmodelselect.process(), cscripts.csebins.csebins.process(), cscripts.cstsmapmerge.cstsmapmerge.process(), cscripts.csobsselect.csobsselect.process(), cscripts.csworkflow.csworkflow.process(), cscripts.csobs2caldb.csobs2caldb.process(), cscripts.cstsdist.cstsdist.process(), cscripts.csiactcopy.csiactcopy.process(), cscripts.cssrcdetect.cssrcdetect.process(), cscripts.cspull.cspull.process(), cscripts.csbkgmodel.csbkgmodel.process(), cscripts.csphasecrv.csphasecrv.process(), cscripts.csiactobs.csiactobs.process(), cscripts.cslightcrv.cslightcrv.process(), cscripts.csviscube.csviscube.process(), cscripts.csresspec.csresspec.process(), cscripts.csfootprint.csfootprint.process(), cscripts.csscs.csscs.process(), cscripts.csphagen.csphagen.process(), cscripts.cssens.cssens.process(), cscripts.csspec.csspec.process(), and cscripts.csroot2caldb.csroot2caldb.process().

def cscripts.csbkgmodel.csbkgmodel._select_events (   self,
  obs 
)
private
Select events within a given RoI radius

Parameters
----------
obs : `~gammalib.GObservations()`
    Observation container

Returns
-------
obs : `~gammalib.GObservations()`
    Observation container

Definition at line 276 of file csbkgmodel.py.

Referenced by cscripts.csbkgmodel.csbkgmodel._generate_bkg().

def cscripts.csbkgmodel.csbkgmodel.models (   self)
Return background models

Returns
-------
ebounds : `~gammalib.GModels()`
    Background models

Definition at line 516 of file csbkgmodel.py.

References cscripts.csbkgmodel.csbkgmodel._models.

Referenced by cscripts.csbkgmodel.csbkgmodel._generate_bkg(), and cscripts.cstsdist.cstsdist.process().

def cscripts.csbkgmodel.csbkgmodel.save (   self)
Save models

Definition at line 497 of file csbkgmodel.py.

Member Data Documentation


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