ctools
2.0.0
|
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 | |
Generates background model
Definition at line 29 of file csbkgmodel.py.
def cscripts.csbkgmodel.csbkgmodel.__init__ | ( | self, | |
argv | |||
) |
Constructor
Definition at line 34 of file csbkgmodel.py.
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.
|
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().
|
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().
|
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().
|
private |
Generate background models
Definition at line 427 of file csbkgmodel.py.
References cscripts.csbkgmodel.csbkgmodel._generate_bkg(), ctobservation.obs(), cscripts.csobsdef.csobsdef.obs(), and cscripts.csiactobs.csiactobs.obs().
Referenced by cscripts.csbkgmodel.csbkgmodel.process().
|
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().
|
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().
|
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.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.csbkgmodel.csbkgmodel._instrument, cscripts.csbkgmodel.csbkgmodel._models, ctobservation.obs(), cscripts.csobsdef.csobsdef.obs(), and cscripts.csiactobs.csiactobs.obs().
def cscripts.csbkgmodel.csbkgmodel.save | ( | self | ) |
Save models
Definition at line 497 of file csbkgmodel.py.
|
private |
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().
|
private |
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.cssens.cssens.__setstate__(), cscripts.csphagen.csphagen.__setstate__(), cscripts.cssens.cssens._e_bin(), cscripts.csmodelsois.csmodelsois._gen_cubemodel(), cscripts.csmodelselect.csmodelselect._get_parameters(), cscripts.csmodelinfo.csmodelinfo._get_parameters(), cscripts.csphagen.csphagen._get_parameters(), cscripts.csphagen.csphagen._process_observation(), cscripts.csphagen.csphagen._set_models(), cscripts.csmodelsois.csmodelsois.models(), cscripts.csbkgmodel.csbkgmodel.models(), cscripts.cssrcdetect.cssrcdetect.models(), cscripts.csiactobs.csiactobs.obs(), cscripts.csmodelinfo.csmodelinfo.process(), cscripts.csmodelmerge.csmodelmerge.process(), cscripts.csmodelselect.csmodelselect.process(), cscripts.cssrcdetect.cssrcdetect.process(), cscripts.csbkgmodel.csbkgmodel.process(), cscripts.cssens.cssens.process(), cscripts.csmodelsois.csmodelsois.save(), cscripts.csmodelinfo.csmodelinfo.save(), and cscripts.cssrcdetect.cssrcdetect.save().