|
ctools 2.1.0
|
Public Member Functions | |
| __init__ (self, *argv) | |
| __getstate__ (self) | |
| __setstate__ (self, state) | |
| process (self) | |
| save (self) | |
| models (self) | |
Protected Member Functions | |
| _get_parameters (self) | |
| _get_instrument (self) | |
| _generate_initial_model (self, sigma_min=2.0, sigma_max=1000.0) | |
| _select_events (self, obs) | |
| _create_nodes (self, model) | |
| _generate_bkg (self, obs) | |
| _generate_runwise_bkg (self) | |
Protected Attributes | |
| _models | |
| _instrument | |
Generates background model
Definition at line 29 of file csbkgmodel.py.
| cscripts.csbkgmodel.csbkgmodel.__init__ | ( | self, | |
| * | argv ) |
Constructor
Definition at line 34 of file csbkgmodel.py.
| 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, cscripts.csbkgmodel.csbkgmodel._models, cscripts.csiactobs.csiactobs._models, cscripts.csmodelinfo.csmodelinfo._models, cscripts.csmodelmerge.csmodelmerge._models, cscripts.csmodelselect.csmodelselect._models, cscripts.csmodelsois.csmodelsois._models, cscripts.csphagen.csphagen._models, cscripts.cssens.cssens._models, and cscripts.cssrcdetect.cssrcdetect._models.
| 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, cscripts.csbkgmodel.csbkgmodel._models, cscripts.csiactobs.csiactobs._models, cscripts.csmodelinfo.csmodelinfo._models, cscripts.csmodelmerge.csmodelmerge._models, cscripts.csmodelselect.csmodelselect._models, cscripts.csmodelsois.csmodelsois._models, cscripts.csphagen.csphagen._models, cscripts.cssens.cssens._models, and cscripts.cssrcdetect.cssrcdetect._models.
|
protected |
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().
|
protected |
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().
|
protected |
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().
|
protected |
Generate background models
Definition at line 427 of file csbkgmodel.py.
References cscripts.csbkgmodel.csbkgmodel._generate_bkg(), cscripts.csbkgmodel.csbkgmodel._models, cscripts.csiactobs.csiactobs._models, cscripts.csmodelinfo.csmodelinfo._models, cscripts.csmodelmerge.csmodelmerge._models, cscripts.csmodelselect.csmodelselect._models, cscripts.csmodelsois.csmodelsois._models, cscripts.csphagen.csphagen._models, cscripts.cssens.cssens._models, cscripts.cssrcdetect.cssrcdetect._models, cscripts.csiactobs.csiactobs.obs(), cscripts.csobsdef.csobsdef.obs(), ctobservation.obs(), and ctobservation.obs().
Referenced by cscripts.csbkgmodel.csbkgmodel.process().
|
protected |
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 cscripts.csiactobs.csiactobs.obs(), cscripts.csobsdef.csobsdef.obs(), ctobservation.obs(), and ctobservation.obs().
Referenced by cscripts.csbkgmodel.csbkgmodel._get_parameters().
|
protected |
Get parameters from parfile
Definition at line 85 of file csbkgmodel.py.
References cscripts.csbkgmodel.csbkgmodel._get_instrument(), cscripts.csbkgmodel.csbkgmodel._instrument, cscripts.csiactobs.csiactobs.obs(), cscripts.csobsdef.csobsdef.obs(), ctobservation.obs(), and ctobservation.obs().
Referenced by cscripts.csadd2caldb.csadd2caldb.process(), cscripts.csbkgmodel.csbkgmodel.process(), cscripts.cscaldb.cscaldb.process(), cscripts.csebins.csebins.process(), cscripts.csfindobs.csfindobs.process(), cscripts.csfootprint.csfootprint.process(), cscripts.csiactcopy.csiactcopy.process(), cscripts.csiactdata.csiactdata.process(), cscripts.csiactobs.csiactobs.process(), cscripts.cslightcrv.cslightcrv.process(), cscripts.csmodelinfo.csmodelinfo.process(), cscripts.csmodelmerge.csmodelmerge.process(), cscripts.csmodelselect.csmodelselect.process(), cscripts.csmodelsois.csmodelsois.process(), cscripts.csobs2caldb.csobs2caldb.process(), cscripts.csobsdef.csobsdef.process(), cscripts.csobsinfo.csobsinfo.process(), cscripts.csobsselect.csobsselect.process(), cscripts.csphagen.csphagen.process(), cscripts.csphasecrv.csphasecrv.process(), cscripts.cspull.cspull.process(), cscripts.csresmap.csresmap.process(), cscripts.csresspec.csresspec.process(), cscripts.csroot2caldb.csroot2caldb.process(), cscripts.csscs.csscs.process(), cscripts.cssens.cssens.process(), cscripts.csspec.csspec.process(), cscripts.cssrcdetect.cssrcdetect.process(), cscripts.cstsdist.cstsdist.process(), cscripts.cstsmapmerge.cstsmapmerge.process(), cscripts.cstsmapsplit.cstsmapsplit.process(), cscripts.csviscube.csviscube.process(), and cscripts.csworkflow.csworkflow.process().
|
protected |
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().
| 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, cscripts.csiactobs.csiactobs._models, cscripts.csmodelinfo.csmodelinfo._models, cscripts.csmodelmerge.csmodelmerge._models, cscripts.csmodelselect.csmodelselect._models, cscripts.csmodelsois.csmodelsois._models, cscripts.csphagen.csphagen._models, cscripts.cssens.cssens._models, and cscripts.cssrcdetect.cssrcdetect._models.
Referenced by cscripts.csbkgmodel.csbkgmodel._generate_bkg(), and cscripts.cstsdist.cstsdist.process().
| cscripts.csbkgmodel.csbkgmodel.process | ( | self | ) |
Process the script
Definition at line 459 of file csbkgmodel.py.
References cscripts.csbkgmodel.csbkgmodel._generate_bkg(), cscripts.csbkgmodel.csbkgmodel._generate_runwise_bkg(), cscripts.csadd2caldb.csadd2caldb._get_parameters(), cscripts.csbkgmodel.csbkgmodel._get_parameters(), cscripts.cscaldb.cscaldb._get_parameters(), cscripts.csebins.csebins._get_parameters(), cscripts.csfindobs.csfindobs._get_parameters(), cscripts.csfootprint.csfootprint._get_parameters(), cscripts.csiactcopy.csiactcopy._get_parameters(), cscripts.csiactdata.csiactdata._get_parameters(), cscripts.csiactobs.csiactobs._get_parameters(), cscripts.cslightcrv.cslightcrv._get_parameters(), cscripts.csmodelinfo.csmodelinfo._get_parameters(), cscripts.csmodelmerge.csmodelmerge._get_parameters(), cscripts.csmodelselect.csmodelselect._get_parameters(), cscripts.csmodelsois.csmodelsois._get_parameters(), cscripts.csobs2caldb.csobs2caldb._get_parameters(), cscripts.csobsdef.csobsdef._get_parameters(), cscripts.csobsinfo.csobsinfo._get_parameters(), cscripts.csobsselect.csobsselect._get_parameters(), cscripts.csphagen.csphagen._get_parameters(), cscripts.csphasecrv.csphasecrv._get_parameters(), cscripts.cspull.cspull._get_parameters(), cscripts.csresmap.csresmap._get_parameters(), cscripts.csresspec.csresspec._get_parameters(), cscripts.csroot2caldb.csroot2caldb._get_parameters(), cscripts.csscs.csscs._get_parameters(), cscripts.cssens.cssens._get_parameters(), cscripts.csspec.csspec._get_parameters(), cscripts.cssrcdetect.cssrcdetect._get_parameters(), cscripts.cstsdist.cstsdist._get_parameters(), cscripts.cstsmapmerge.cstsmapmerge._get_parameters(), cscripts.cstsmapsplit.cstsmapsplit._get_parameters(), cscripts.csviscube.csviscube._get_parameters(), cscripts.csworkflow.csworkflow._get_parameters(), cscripts.csbkgmodel.csbkgmodel._instrument, cscripts.csbkgmodel.csbkgmodel._models, cscripts.csiactobs.csiactobs._models, cscripts.csmodelinfo.csmodelinfo._models, cscripts.csmodelmerge.csmodelmerge._models, cscripts.csmodelselect.csmodelselect._models, cscripts.csmodelsois.csmodelsois._models, cscripts.csphagen.csphagen._models, cscripts.cssens.cssens._models, cscripts.cssrcdetect.cssrcdetect._models, cscripts.csiactobs.csiactobs.obs(), cscripts.csobsdef.csobsdef.obs(), ctobservation.obs(), and ctobservation.obs().
| cscripts.csbkgmodel.csbkgmodel.save | ( | self | ) |
Save models
Definition at line 497 of file csbkgmodel.py.
References cscripts.csbkgmodel.csbkgmodel._models, cscripts.csiactobs.csiactobs._models, cscripts.csmodelinfo.csmodelinfo._models, cscripts.csmodelmerge.csmodelmerge._models, cscripts.csmodelselect.csmodelselect._models, cscripts.csmodelsois.csmodelsois._models, cscripts.csphagen.csphagen._models, cscripts.cssens.cssens._models, cscripts.cssrcdetect.cssrcdetect._models, and cscripts.csbkgmodel.csbkgmodel.save().
Referenced by cscripts.csbkgmodel.csbkgmodel.save().
|
protected |
Definition at line 43 of file csbkgmodel.py.
Referenced by cscripts.csbkgmodel.csbkgmodel.__getstate__(), cscripts.csbkgmodel.csbkgmodel.__setstate__(), cscripts.csbkgmodel.csbkgmodel._generate_initial_model(), cscripts.csbkgmodel.csbkgmodel._get_parameters(), and cscripts.csbkgmodel.csbkgmodel.process().
|
protected |
Definition at line 42 of file csbkgmodel.py.
Referenced by cscripts.csbkgmodel.csbkgmodel.__getstate__(), cscripts.csphagen.csphagen.__getstate__(), cscripts.cssens.cssens.__getstate__(), cscripts.csbkgmodel.csbkgmodel.__setstate__(), cscripts.csphagen.csphagen.__setstate__(), cscripts.cssens.cssens.__setstate__(), cscripts.cssrcdetect.cssrcdetect._add_model(), cscripts.csiactobs.csiactobs._append_inmodels(), cscripts.cssens.cssens._e_bin(), cscripts.csmodelsois.csmodelsois._gen_cubemodel(), cscripts.csbkgmodel.csbkgmodel._generate_runwise_bkg(), cscripts.csmodelinfo.csmodelinfo._get_parameters(), cscripts.csmodelselect.csmodelselect._get_parameters(), cscripts.csphagen.csphagen._get_parameters(), cscripts.csphagen.csphagen._get_parameters_bkgmethod_custom(), cscripts.csphagen.csphagen._get_parameters_bkgmethod_off(), cscripts.csphagen.csphagen._process_observation(), cscripts.csphagen.csphagen._set_models(), cscripts.csbkgmodel.csbkgmodel.models(), cscripts.csmodelsois.csmodelsois.models(), cscripts.cssrcdetect.cssrcdetect.models(), cscripts.csiactobs.csiactobs.obs(), cscripts.csbkgmodel.csbkgmodel.process(), cscripts.csiactobs.csiactobs.process(), cscripts.csmodelinfo.csmodelinfo.process(), cscripts.csmodelmerge.csmodelmerge.process(), cscripts.csmodelselect.csmodelselect.process(), cscripts.cssens.cssens.process(), cscripts.cssrcdetect.cssrcdetect.process(), cscripts.csbkgmodel.csbkgmodel.save(), cscripts.csiactobs.csiactobs.save(), cscripts.csmodelinfo.csmodelinfo.save(), cscripts.csmodelmerge.csmodelmerge.save(), and cscripts.csmodelsois.csmodelsois.save().