ctools 2.1.0.dev
|
Public Member Functions | |
__init__ (self, *argv) | |
__getstate__ (self) | |
__setstate__ (self, state) | |
process (self) | |
models (self, models) | |
save (self) | |
ts_distribution (self) | |
Protected Member Functions | |
_get_parameters (self) | |
_sim (self, seed) | |
_trial (self, seed) | |
_create_fits (self, results) | |
Protected Attributes | |
_srcname | |
_fits | |
_log_clients | |
_model | |
_nthreads | |
Generates Test Statistic distribution for a model
Definition at line 33 of file cstsdist.py.
cscripts.cstsdist.cstsdist.__init__ | ( | self, | |
* | argv ) |
Constructor
Definition at line 39 of file cstsdist.py.
cscripts.cstsdist.cstsdist.__getstate__ | ( | self | ) |
Extend ctools.csobservation getstate method to include some members Returns ------- state : dict Pickled instance
Definition at line 57 of file cstsdist.py.
References cscripts.cslightcrv.cslightcrv._fits, cscripts.csphasecrv.csphasecrv._fits, cscripts.cspull.cspull._fits, cscripts.csresspec.csresspec._fits, cscripts.csscs.csscs._fits, cscripts.cssens.cssens._fits, cscripts.csspec.csspec._fits, cscripts.cstsdist.cstsdist._fits, cscripts.cssens.cssens._log_clients, cscripts.cstsdist.cstsdist._log_clients, cscripts.cstsdist.cstsdist._model, cscripts.cslightcrv.cslightcrv._nthreads, cscripts.csphagen.csphagen._nthreads, cscripts.csphasecrv.csphasecrv._nthreads, cscripts.cspull.cspull._nthreads, cscripts.csscs.csscs._nthreads, cscripts.cssens.cssens._nthreads, cscripts.csspec.csspec._nthreads, cscripts.cstsdist.cstsdist._nthreads, cscripts.cslightcrv.cslightcrv._srcname, cscripts.csphagen.csphagen._srcname, cscripts.csphasecrv.csphasecrv._srcname, cscripts.cssens.cssens._srcname, cscripts.cstsdist.cstsdist._srcname, and cscripts.cstsmapsplit.cstsmapsplit._srcname.
cscripts.cstsdist.cstsdist.__setstate__ | ( | self, | |
state ) |
Extend ctools.csobservation setstate method to include some members Parameters ---------- state : dict Pickled instance
Definition at line 77 of file cstsdist.py.
References cscripts.cslightcrv.cslightcrv._fits, cscripts.csphasecrv.csphasecrv._fits, cscripts.cspull.cspull._fits, cscripts.csresspec.csresspec._fits, cscripts.csscs.csscs._fits, cscripts.cssens.cssens._fits, cscripts.csspec.csspec._fits, cscripts.cstsdist.cstsdist._fits, cscripts.cssens.cssens._log_clients, cscripts.cstsdist.cstsdist._log_clients, cscripts.cstsdist.cstsdist._model, cscripts.cslightcrv.cslightcrv._nthreads, cscripts.csphagen.csphagen._nthreads, cscripts.csphasecrv.csphasecrv._nthreads, cscripts.cspull.cspull._nthreads, cscripts.csscs.csscs._nthreads, cscripts.cssens.cssens._nthreads, cscripts.csspec.csspec._nthreads, cscripts.cstsdist.cstsdist._nthreads, cscripts.cslightcrv.cslightcrv._srcname, cscripts.csphagen.csphagen._srcname, cscripts.csphasecrv.csphasecrv._srcname, cscripts.cssens.cssens._srcname, cscripts.cstsdist.cstsdist._srcname, and cscripts.cstsmapsplit.cstsmapsplit._srcname.
|
protected |
Create FITS file from results Parameters ---------- results : list of dict List of result dictionaries
Definition at line 287 of file cstsdist.py.
References cscripts.cslightcrv.cslightcrv._fits, cscripts.csphasecrv.csphasecrv._fits, cscripts.cspull.cspull._fits, cscripts.csresspec.csresspec._fits, cscripts.csscs.csscs._fits, cscripts.cssens.cssens._fits, cscripts.csspec.csspec._fits, and cscripts.cstsdist.cstsdist._fits.
Referenced by cscripts.csphasecrv.csphasecrv._save_fits(), cscripts.csphasecrv.csphasecrv.process(), cscripts.cspull.cspull.process(), cscripts.cssens.cssens.process(), cscripts.csspec.csspec.process(), and cscripts.cstsdist.cstsdist.process().
|
protected |
Get parameters from parfile and setup the observation
Definition at line 97 of file cstsdist.py.
References cscripts.cslightcrv.cslightcrv._nthreads, cscripts.csphagen.csphagen._nthreads, cscripts.csphasecrv.csphasecrv._nthreads, cscripts.cspull.cspull._nthreads, cscripts.csscs.csscs._nthreads, cscripts.cssens.cssens._nthreads, cscripts.csspec.csspec._nthreads, cscripts.cstsdist.cstsdist._nthreads, cscripts.cslightcrv.cslightcrv._srcname, cscripts.csphagen.csphagen._srcname, cscripts.csphasecrv.csphasecrv._srcname, cscripts.cssens.cssens._srcname, cscripts.cstsdist.cstsdist._srcname, cscripts.cstsmapsplit.cstsmapsplit._srcname, cscripts.cstsdist.cstsdist.models(), 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 |
Return a simulated observation container Parameters ---------- seed : int Random number generator seed Returns ------- sim : `~gammalib.GObservations` Simulated observation container
Definition at line 133 of file cstsdist.py.
References cscripts.cssens.cssens._log_clients, cscripts.cstsdist.cstsdist._log_clients, cscripts.cstsdist.cstsdist._model, cscripts.csiactobs.csiactobs.obs(), cscripts.csobsdef.csobsdef.obs(), ctobservation.obs(), and ctobservation.obs().
Referenced by cscripts.cstsdist.cstsdist._trial().
|
protected |
Create the TS for a single trial Parameters ---------- seed : int Random number generator seed Returns ------- result : dict Result dictionary
Definition at line 187 of file cstsdist.py.
References cscripts.cstsdist.cstsdist._sim(), cscripts.cslightcrv.cslightcrv._srcname, cscripts.csphagen.csphagen._srcname, cscripts.csphasecrv.csphasecrv._srcname, cscripts.cssens.cssens._srcname, cscripts.cstsdist.cstsdist._srcname, cscripts.cstsmapsplit.cstsmapsplit._srcname, and cscripts.cstsdist.cstsdist.models().
Referenced by cscripts.cspull.cspull.process(), and cscripts.cstsdist.cstsdist.process().
cscripts.cstsdist.cstsdist.models | ( | self, | |
models ) |
Set model Parameters ---------- models : `~gammalib.GModels` Model container
Definition at line 412 of file cstsdist.py.
References cscripts.cstsdist.cstsdist.models(), cscripts.csiactobs.csiactobs.obs(), cscripts.csobsdef.csobsdef.obs(), ctobservation.obs(), and ctobservation.obs().
Referenced by cscripts.cstsdist.cstsdist._get_parameters(), cscripts.cstsdist.cstsdist._trial(), cscripts.cstsdist.cstsdist.models(), and cscripts.cstsdist.cstsdist.process().
cscripts.cstsdist.cstsdist.process | ( | self | ) |
Process the script
Definition at line 358 of file cstsdist.py.
References cscripts.csphasecrv.csphasecrv._create_fits(), cscripts.cspull.cspull._create_fits(), cscripts.cssens.cssens._create_fits(), cscripts.csspec.csspec._create_fits(), cscripts.cstsdist.cstsdist._create_fits(), 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.cslightcrv.cslightcrv._nthreads, cscripts.csphagen.csphagen._nthreads, cscripts.csphasecrv.csphasecrv._nthreads, cscripts.cspull.cspull._nthreads, cscripts.csscs.csscs._nthreads, cscripts.cssens.cssens._nthreads, cscripts.csspec.csspec._nthreads, cscripts.cstsdist.cstsdist._nthreads, cscripts.cslightcrv.cslightcrv._srcname, cscripts.csphagen.csphagen._srcname, cscripts.csphasecrv.csphasecrv._srcname, cscripts.cssens.cssens._srcname, cscripts.cstsdist.cstsdist._srcname, cscripts.cstsmapsplit.cstsmapsplit._srcname, cscripts.cspull.cspull._trial(), cscripts.cstsdist.cstsdist._trial(), cscripts.csbkgmodel.csbkgmodel.models(), cscripts.cslightcrv.cslightcrv.models(), cscripts.csmodelsois.csmodelsois.models(), cscripts.cspull.cspull.models(), cscripts.csresmap.csresmap.models(), cscripts.csspec.csspec.models(), cscripts.cssrcdetect.cssrcdetect.models(), cscripts.cstsdist.cstsdist.models(), ctbkgcube.models(), ctmapcube.models(), ctmodel.models(), ctobssim.models(), cscripts.csiactobs.csiactobs.obs(), cscripts.csobsdef.csobsdef.obs(), ctobservation.obs(), and ctobservation.obs().
cscripts.cstsdist.cstsdist.save | ( | self | ) |
Save TS distribution FITS file
Definition at line 427 of file cstsdist.py.
References cscripts.cslightcrv.cslightcrv._fits, cscripts.csphasecrv.csphasecrv._fits, cscripts.cspull.cspull._fits, cscripts.csresspec.csresspec._fits, cscripts.csscs.csscs._fits, cscripts.cssens.cssens._fits, cscripts.csspec.csspec._fits, and cscripts.cstsdist.cstsdist._fits.
cscripts.cstsdist.cstsdist.ts_distribution | ( | self | ) |
Return TS distribution FITS file Returns: FITS file containing TS distribution
Definition at line 449 of file cstsdist.py.
References cscripts.cslightcrv.cslightcrv._fits, cscripts.csphasecrv.csphasecrv._fits, cscripts.cspull.cspull._fits, cscripts.csresspec.csresspec._fits, cscripts.csscs.csscs._fits, cscripts.cssens.cssens._fits, cscripts.csspec.csspec._fits, and cscripts.cstsdist.cstsdist._fits.
|
protected |
Definition at line 48 of file cstsdist.py.
Referenced by cscripts.cslightcrv.cslightcrv.__getstate__(), cscripts.csphasecrv.csphasecrv.__getstate__(), cscripts.cspull.cspull.__getstate__(), cscripts.csscs.csscs.__getstate__(), cscripts.cssens.cssens.__getstate__(), cscripts.csspec.csspec.__getstate__(), cscripts.cstsdist.cstsdist.__getstate__(), cscripts.cslightcrv.cslightcrv.__setstate__(), cscripts.csphasecrv.csphasecrv.__setstate__(), cscripts.cspull.cspull.__setstate__(), cscripts.csscs.csscs.__setstate__(), cscripts.cssens.cssens.__setstate__(), cscripts.csspec.csspec.__setstate__(), cscripts.cstsdist.cstsdist.__setstate__(), cscripts.csphasecrv.csphasecrv._create_fits(), cscripts.cspull.cspull._create_fits(), cscripts.cssens.cssens._create_fits(), cscripts.csspec.csspec._create_fits(), cscripts.cstsdist.cstsdist._create_fits(), cscripts.csscs.csscs._get_skymap(), cscripts.csphasecrv.csphasecrv._save_fits(), cscripts.csscs.csscs.fits(), cscripts.cslightcrv.cslightcrv.lightcurve(), cscripts.cslightcrv.cslightcrv.process(), cscripts.csresspec.csresspec.process(), cscripts.csscs.csscs.process(), cscripts.cslightcrv.cslightcrv.publish(), cscripts.csphasecrv.csphasecrv.publish(), cscripts.csspec.csspec.publish(), cscripts.cspull.cspull.pull_distribution(), cscripts.csresspec.csresspec.resspec(), cscripts.cslightcrv.cslightcrv.save(), cscripts.cspull.cspull.save(), cscripts.csresspec.csresspec.save(), cscripts.csscs.csscs.save(), cscripts.cssens.cssens.save(), cscripts.csspec.csspec.save(), cscripts.cstsdist.cstsdist.save(), cscripts.cssens.cssens.sensitivity(), cscripts.csspec.csspec.spectrum(), and cscripts.cstsdist.cstsdist.ts_distribution().
|
protected |
Definition at line 49 of file cstsdist.py.
Referenced by cscripts.cssens.cssens.__getstate__(), cscripts.cstsdist.cstsdist.__getstate__(), cscripts.cssens.cssens.__setstate__(), cscripts.cstsdist.cstsdist.__setstate__(), cscripts.cssens.cssens._get_sensitivity(), cscripts.cstsdist.cstsdist._sim(), and cscripts.cssens.cssens._simulate_events().
|
protected |
Definition at line 50 of file cstsdist.py.
Referenced by cscripts.cstsdist.cstsdist.__getstate__(), cscripts.cstsdist.cstsdist.__setstate__(), and cscripts.cstsdist.cstsdist._sim().
|
protected |
Definition at line 51 of file cstsdist.py.
Referenced by cscripts.cslightcrv.cslightcrv.__getstate__(), cscripts.csphagen.csphagen.__getstate__(), cscripts.csphasecrv.csphasecrv.__getstate__(), cscripts.cspull.cspull.__getstate__(), cscripts.csscs.csscs.__getstate__(), cscripts.cssens.cssens.__getstate__(), cscripts.csspec.csspec.__getstate__(), cscripts.cstsdist.cstsdist.__getstate__(), cscripts.cslightcrv.cslightcrv.__setstate__(), cscripts.csphagen.csphagen.__setstate__(), cscripts.csphasecrv.csphasecrv.__setstate__(), cscripts.cspull.cspull.__setstate__(), cscripts.csscs.csscs.__setstate__(), cscripts.cssens.cssens.__setstate__(), cscripts.csspec.csspec.__setstate__(), cscripts.cstsdist.cstsdist.__setstate__(), cscripts.csspec.csspec._fit_energy_bins(), cscripts.cslightcrv.cslightcrv._get_parameters(), cscripts.csphagen.csphagen._get_parameters(), cscripts.csphasecrv.csphasecrv._get_parameters(), cscripts.cspull.cspull._get_parameters(), cscripts.csscs.csscs._get_parameters(), cscripts.cssens.cssens._get_parameters(), cscripts.csspec.csspec._get_parameters(), cscripts.cstsdist.cstsdist._get_parameters(), cscripts.cslightcrv.cslightcrv.process(), cscripts.csphagen.csphagen.process(), cscripts.csphasecrv.csphasecrv.process(), cscripts.cspull.cspull.process(), cscripts.csscs.csscs.process(), cscripts.cssens.cssens.process(), and cscripts.cstsdist.cstsdist.process().
|
protected |
Definition at line 47 of file cstsdist.py.
Referenced by cscripts.cslightcrv.cslightcrv.__getstate__(), cscripts.csphagen.csphagen.__getstate__(), cscripts.csphasecrv.csphasecrv.__getstate__(), cscripts.cssens.cssens.__getstate__(), cscripts.cstsdist.cstsdist.__getstate__(), cscripts.cslightcrv.cslightcrv.__setstate__(), cscripts.csphagen.csphagen.__setstate__(), cscripts.csphasecrv.csphasecrv.__setstate__(), cscripts.cssens.cssens.__setstate__(), cscripts.cstsdist.cstsdist.__setstate__(), cscripts.cslightcrv.cslightcrv._adjust_model_pars(), cscripts.cstsmapsplit.cstsmapsplit._compute_null_hypothesis(), cscripts.cslightcrv.cslightcrv._compute_ulimit(), cscripts.csphasecrv.csphasecrv._create_fits(), cscripts.cssens.cssens._create_fits(), cscripts.cslightcrv.cslightcrv._create_fits_table(), cscripts.csphasecrv.csphasecrv._create_fits_table(), cscripts.cslightcrv.cslightcrv._get_free_par_names(), cscripts.csphasecrv.csphasecrv._get_free_par_names(), cscripts.cslightcrv.cslightcrv._get_parameters(), cscripts.csphagen.csphagen._get_parameters(), cscripts.csphasecrv.csphasecrv._get_parameters(), cscripts.cstsdist.cstsdist._get_parameters(), cscripts.cstsmapsplit.cstsmapsplit._get_parameters(), cscripts.cssens.cssens._get_sensitivity(), cscripts.csphagen.csphagen._process_observation(), cscripts.cssens.cssens._set_source(), cscripts.cssens.cssens._set_src_prefactor(), cscripts.cssens.cssens._sim_evt_excess(), cscripts.cslightcrv.cslightcrv._timebin(), cscripts.cstsdist.cstsdist._trial(), cscripts.cssens.cssens.process(), cscripts.cstsdist.cstsdist.process(), and cscripts.cstsmapsplit.cstsmapsplit.process().