CWTKernels¶
-
class
gammapy.detect.
CWTKernels
(n_scale, min_scale, step_scale, old=False)[source]¶ Bases:
object
Conduct arrays of kernels and scales for CWT algorithm.
Parameters: - n_scale : int
Number of scales.
- min_scale : float
First scale used.
- step_scale : float
Base scaling factor.
- old : boolean (default False)
DEBUG attribute. If False, use astropy MaxicanHat kernels for kernel_base.
Examples
>>> from gammapy.detect import CWTKernels >>> kernels = CWTKernels(n_scale=3, min_scale=2.0, step_scale=2.6) >>> print (kernels.info_table) Name Source ---------------------------------- ---------------------- Number of scales 3 Minimal scale 2.0 Step scale 2.6 Scales [ 2. 5.2 13.52] Kernels approx width 280 Kernels approx sum 0.99986288557 Kernels approx max 0.00012877518599 Kernels base width for 2.0 scale 40 Kernels base sum for 2.0 scale 0.000305108917065 Kernels base max for 2.0 scale 0.0315463182128 Kernels base width for 5.2 scale 107 Kernels base sum for 5.2 scale 0.000158044776015 Kernels base max for 5.2 scale 0.0050152112595 Kernels base width for 13.52 scale 280 Kernels base sum for 13.52 scale 0.000137114430344 Kernels base max for 13.52 scale 0.000740731187317
Attributes: - n_scale : int
Number of scales considered.
- min_scale : float
First scale used.
- step_scale : float
Base scaling factor.
- scales :
ndarray
Grid of scales.
- kern_base : dict
Dictionary of scale powers as keys and 2D kernel arrays. (mexican hat) as values
- kern_approx :
ndarray
2D Gaussian kernel array from maximum scale.
Attributes Summary
info_table
Summary info table about the object. Attributes Documentation