Commit 30890779d5e7d40ee22c1e04148d5c83d66013af
1 parent
4b010e1f
Add radial acceptance model to cssrcdetect
Showing
3 changed files
with
16 additions
and
10 deletions
cscripts/cssrcdetect.par
| ... | ... | @@ -24,7 +24,7 @@ outds9file, f, a, ds9.reg,,, "Output DS9 region file" |
| 24 | 24 | # Script parameters |
| 25 | 25 | #================== |
| 26 | 26 | srcmodel, s, a, POINT,POINT,, "Source model type" |
| 27 | -bkgmodel, s, a, NONE,NONE|IRF|AEFF|CUBE,, "Background model type" | |
| 27 | +bkgmodel, s, a, NONE,NONE|IRF|AEFF|CUBE|RACC,, "Background model type" | |
| 28 | 28 | threshold, r, a, 5.0,,, "Detection threshold (Gaussian sigma)" |
| 29 | 29 | maxsrcs, i, h, 20,1,1000, "Maximum number of sources" |
| 30 | 30 | avgrad, r, h, 1.0,,, "Averaging radius (deg) for significance computation" | ... | ... |
cscripts/cssrcdetect.py
| ... | ... | @@ -271,24 +271,30 @@ class cssrcdetect(ctools.cscript): |
| 271 | 271 | Parameters |
| 272 | 272 | ---------- |
| 273 | 273 | modeltype : str |
| 274 | - Model type ('IRF', 'AEFF' or 'CUBE') | |
| 274 | + Model type ('IRF', 'AEFF', 'CUBE' or 'RACC') | |
| 275 | 275 | |
| 276 | 276 | Returns |
| 277 | 277 | ------- |
| 278 | 278 | model : `~gammalib.GModelData()` |
| 279 | 279 | Background model |
| 280 | 280 | """ |
| 281 | - # Set spectral component | |
| 282 | - spectral = gammalib.GModelSpectralPlaw(1.0, 0.0, | |
| 283 | - gammalib.GEnergy(1.0, 'TeV')) | |
| 281 | + # Pivot energy | |
| 282 | + epivot = gammalib.GEnergy(1.0, 'TeV') | |
| 284 | 283 | |
| 285 | 284 | # Set background model |
| 286 | 285 | if modeltype == 'IRF': |
| 287 | - model = gammalib.GCTAModelIrfBackground(spectral) | |
| 286 | + spectral = gammalib.GModelSpectralPlaw(1.0, 0.0, epivot) | |
| 287 | + model = gammalib.GCTAModelIrfBackground(spectral) | |
| 288 | 288 | elif modeltype == 'AEFF': |
| 289 | - model = gammalib.GCTAModelAeffBackground(spectral) | |
| 289 | + spectral = gammalib.GModelSpectralPlaw(1.0e-13, -2.5, epivot) | |
| 290 | + model = gammalib.GCTAModelAeffBackground(spectral) | |
| 290 | 291 | elif modeltype == 'CUBE': |
| 291 | - model = gammalib.GCTAModelCubeBackground(spectral) | |
| 292 | + spectral = gammalib.GModelSpectralPlaw(1.0, 0.0, epivot) | |
| 293 | + model = gammalib.GCTAModelCubeBackground(spectral) | |
| 294 | + elif modeltype == 'RACC': | |
| 295 | + radial = gammalib.GCTAModelRadialGauss(3.0) | |
| 296 | + spectral = gammalib.GModelSpectralPlaw(1.0e-4, -2.5, epivot) | |
| 297 | + model = gammalib.GCTAModelRadialAcceptance(radial, spectral) | |
| 292 | 298 | else: |
| 293 | 299 | model = None |
| 294 | 300 | ... | ... |
doc/source/users/reference_manual/cssrcdetect.rst
| ... | ... | @@ -36,13 +36,13 @@ General parameters |
| 36 | 36 | point sources with power law spectral shapes to the model definition |
| 37 | 37 | XML file. |
| 38 | 38 | |
| 39 | -``bkgmodel <NONE|IRF|AEFF|CUBE> [string]`` | |
| 39 | +``bkgmodel <NONE|IRF|AEFF|CUBE|RACC> [string]`` | |
| 40 | 40 | Background model type. Using ``NONE`` no background model will be added |
| 41 | 41 | to the model definition XML file. Using ``IRF`` a background model based |
| 42 | 42 | on the template information in the Instrument Response Function will be |
| 43 | 43 | added. Using ``AEFF`` a background model based on the shape of the effective |
| 44 | 44 | area will be added. Using ``CUBE`` a background model for stacked analysis |
| 45 | - will be added. | |
| 45 | + will be added. Using ``RACC`` a radial acceptance model will be added. | |
| 46 | 46 | |
| 47 | 47 | ``threshold [real]`` |
| 48 | 48 | Detection threshold (Gaussian sigma). Only sources above this detection | ... | ... |