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

Public Member Functions

def __init__
 
def process
 
def save
 
def models
 

Private Member Functions

def _get_parameters
 
def _detect_sources
 
def _find_maximum
 
def _remove_maximum
 
def _map_moments
 
def _add_model
 
def _set_bkg
 
def _set_ptsrc
 
def _smooth_skymap
 
def _load_skymap
 
def _cache_map_dirs
 

Private Attributes

 _map
 
 _models
 
 _map_dirs
 

Detailed Description

Detects sources in a sky map

Definition at line 31 of file cssrcdetect.py.

Constructor & Destructor Documentation

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

Definition at line 37 of file cssrcdetect.py.

Member Function Documentation

def cscripts.cssrcdetect.cssrcdetect._add_model (   self,
  pos,
  name 
)
private
Add model to model container

Parameters
----------
pos : `~gammalib.GSkyDir()`
    Sky direction of model
name : str
    Model name

Definition at line 258 of file cssrcdetect.py.

References cscripts.cssrcdetect.cssrcdetect._set_ptsrc().

Referenced by cscripts.cssrcdetect.cssrcdetect._detect_sources().

def cscripts.cssrcdetect.cssrcdetect._cache_map_dirs (   self,
  skymap 
)
private
Cache map pixel positions to save some computation time

Definition at line 413 of file cssrcdetect.py.

References cscripts.cssrcdetect.cssrcdetect._map_dirs.

Referenced by cscripts.cssrcdetect.cssrcdetect.process().

def cscripts.cssrcdetect.cssrcdetect._detect_sources (   self,
  counts 
)
private
def cscripts.cssrcdetect.cssrcdetect._find_maximum (   self,
  skymap 
)
private
Find maximum in a sky map

Parameters
----------
skymap : `~gammalib.GSkyMap()`
    Sky map

Returns
-------
value, pos : tuple of float and `~gammalib.GSkyDir()`
    Maximum sky map value and corresponding sky direction

Definition at line 150 of file cssrcdetect.py.

References cscripts.cssrcdetect.cssrcdetect._map_dirs.

Referenced by cscripts.cssrcdetect.cssrcdetect._detect_sources().

def cscripts.cssrcdetect.cssrcdetect._load_skymap (   self)
private
Load sky map

Returns
-------
skymap : `~gammalib.GSkyMap()`
    Sky map

Definition at line 388 of file cssrcdetect.py.

Referenced by cscripts.cssrcdetect.cssrcdetect.process().

def cscripts.cssrcdetect.cssrcdetect._map_moments (   self,
  skymap,
  radius 
)
private
Determine moments of sky map pixels

Parameters
----------
skymap : `~gammalib.GSkyMap()`
    Sky map
radius : float
    radius (deg) for pixel consideration

Returns
-------
mean, std : tuple of GSkyMap
    Mean and standard deviation of pixel values within a given radius

Definition at line 212 of file cssrcdetect.py.

Referenced by cscripts.cssrcdetect.cssrcdetect._detect_sources().

def cscripts.cssrcdetect.cssrcdetect._remove_maximum (   self,
  skymap,
  pos,
  value = 0.0,
  radius = 0.1 
)
private
Remove maximum from sky map by replacing pixels with a given value

Parameters
----------
skymap : `~gammalib.GSkyMap()`
    Sky map
pos : `~gammalib.GSkyDir()`
    Sky direction of maximum
value : float, optional
    Replacement value
radius : float, optional
    Radius within which pixel values are replaced

Returns
-------
skymap : `~gammalib.GSkyMap()`
    Sky map with maximum removed

Definition at line 177 of file cssrcdetect.py.

References cscripts.cssrcdetect.cssrcdetect._map_dirs.

Referenced by cscripts.cssrcdetect.cssrcdetect._detect_sources().

def cscripts.cssrcdetect.cssrcdetect._set_bkg (   self,
  modeltype 
)
private
Set background model

Parameters
----------
modeltype : str
    Model type ('IRF', 'AEFF', 'CUBE' or 'RACC')

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

Definition at line 281 of file cssrcdetect.py.

Referenced by cscripts.cssrcdetect.cssrcdetect.process().

def cscripts.cssrcdetect.cssrcdetect._set_ptsrc (   self,
  pos 
)
private
Set point source model

Parameters
----------
pos : `~gammalib.GSkyDir()`
    Sky direction of model

Returns
-------
model : `~gammalib.GModelSky()`
    Point source model

Definition at line 322 of file cssrcdetect.py.

Referenced by cscripts.cssrcdetect.cssrcdetect._add_model().

def cscripts.cssrcdetect.cssrcdetect._smooth_skymap (   self,
  skymap 
)
private
Smooth the input sky map if a valid kernel was supplied

Parameters
----------
skymap : `~gammalib.GSkyMap()`
    Sky map

Definition at line 364 of file cssrcdetect.py.

Referenced by cscripts.cssrcdetect.cssrcdetect.process().

def cscripts.cssrcdetect.cssrcdetect.process (   self)
Process the script

Definition at line 425 of file cssrcdetect.py.

References cscripts.cssrcdetect.cssrcdetect._cache_map_dirs(), cscripts.cssrcdetect.cssrcdetect._detect_sources(), cscripts.csobsselect.csobsselect._get_parameters(), cscripts.csadd2caldb.csadd2caldb._get_parameters(), cscripts.csebins.csebins._get_parameters(), cscripts.csmodelselect.csmodelselect._get_parameters(), cscripts.csroot2caldb.csroot2caldb._get_parameters(), cscripts.csresmap.csresmap._get_parameters(), cscripts.csresspec.csresspec._get_parameters(), cscripts.csmodelinfo.csmodelinfo._get_parameters(), cscripts.csmodelmerge.csmodelmerge._get_parameters(), cscripts.csobsinfo.csobsinfo._get_parameters(), cscripts.csfindobs.csfindobs._get_parameters(), cscripts.csiactdata.csiactdata._get_parameters(), cscripts.csiactcopy.csiactcopy._get_parameters(), cscripts.cssrcdetect.cssrcdetect._get_parameters(), cscripts.cscaldb.cscaldb._get_parameters(), cscripts.csmodelsois.csmodelsois._get_parameters(), cscripts.csobs2caldb.csobs2caldb._get_parameters(), cscripts.csbkgmodel.csbkgmodel._get_parameters(), cscripts.cspull.cspull._get_parameters(), cscripts.csfootprint.csfootprint._get_parameters(), cscripts.csiactobs.csiactobs._get_parameters(), cscripts.csobsdef.csobsdef._get_parameters(), cscripts.csspec.csspec._get_parameters(), cscripts.cssens.cssens._get_parameters(), cscripts.csphasecrv.csphasecrv._get_parameters(), cscripts.cslightcrv.cslightcrv._get_parameters(), cscripts.csscs.csscs._get_parameters(), cscripts.csphagen.csphagen._get_parameters(), cscripts.cssrcdetect.cssrcdetect._load_skymap(), cscripts.cssrcdetect.cssrcdetect._map, cscripts.csbkgmodel.csbkgmodel._models, cscripts.csmodelselect.csmodelselect._models, cscripts.csmodelinfo.csmodelinfo._models, cscripts.csmodelmerge.csmodelmerge._models, cscripts.csphagen.csphagen._models, cscripts.cssrcdetect.cssrcdetect._models, cscripts.csiactobs.csiactobs._models, cscripts.csmodelsois.csmodelsois._models, cscripts.cssens.cssens._models, cscripts.cssrcdetect.cssrcdetect._set_bkg(), and cscripts.cssrcdetect.cssrcdetect._smooth_skymap().

Member Data Documentation

cscripts.cssrcdetect.cssrcdetect._map
private
cscripts.cssrcdetect.cssrcdetect._models
private

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