Commit 79f16c8eb7d51855bb0164b635910632cdb8e75d
1 parent
8d9ce025
Add phi_first and phi_last parameters to comlixfit and comlixmap (#3912)
Showing
9 changed files
with
60 additions
and
13 deletions
ChangeLog
| 1 | -2021-09-30 | |
| 1 | +2021-11-29 | |
| 2 | 2 | |
| 3 | 3 | * Version 2.0.0 released |
| 4 | 4 | ======================== |
| 5 | 5 | |
| 6 | + Add phi_first and phi_last parameters to comlixfit and comlixmap (#3912) | |
| 6 | 7 | Add csadd2caldb script |
| 7 | 8 | Add restart of bisection in case of bad convergence in ctulimit |
| 8 | 9 | Add COMPTEL analysis scripts (#3738) | ... | ... |
NEWS
| 1 | 1 | New Features and Important Changes in ctools 2.0.0 |
| 2 | 2 | |
| 3 | -30 September 2021 | |
| 3 | +29 November 2021 | |
| 4 | 4 | |
| 5 | 5 | |
| 6 | 6 | Introduction |
| ... | ... | @@ -399,52 +399,58 @@ regions (#3248). |
| 399 | 399 | |
| 400 | 400 | comlixfit - COMPTEL maximum likelihood fitting using SRCLIX algorithm |
| 401 | 401 | --------------------------------------------------------------------- |
| 402 | -Added script (#3738) | |
| 402 | +Added phi_first and phi_last parameters to allow selection of the Phibar layers | |
| 403 | +during the maximum likelihood fit (#3912). | |
| 404 | + | |
| 405 | +Added script (#3738). | |
| 403 | 406 | |
| 404 | 407 | |
| 405 | 408 | comlixmap - Generation of COMPTEL Test Statistic map using SRCLIX algorithm |
| 406 | 409 | --------------------------------------------------------------------------- |
| 407 | -Added script (#3738) | |
| 410 | +Added phi_first and phi_last parameters to allow selection of the Phibar layers | |
| 411 | +during the maximum likelihood fit (#3912). | |
| 412 | + | |
| 413 | +Added script (#3738). | |
| 408 | 414 | |
| 409 | 415 | |
| 410 | 416 | comobsadd - Combine COMPTEL observations |
| 411 | 417 | ---------------------------------------- |
| 412 | -Added script (#3738) | |
| 418 | +Added script (#3738). | |
| 413 | 419 | |
| 414 | 420 | |
| 415 | 421 | comobsback - Generate background model for COMPTEL observations |
| 416 | 422 | --------------------------------------------------------------- |
| 417 | -Added script (#3738) | |
| 423 | +Added script (#3738). | |
| 418 | 424 | |
| 419 | 425 | |
| 420 | 426 | comobsbin - Bin COMPTEL observations |
| 421 | 427 | ------------------------------------ |
| 422 | -Added script (#3738) | |
| 428 | +Added script (#3738). | |
| 423 | 429 | |
| 424 | 430 | |
| 425 | 431 | comobsmodel - Generate model for binned COMPTEL observations |
| 426 | 432 | ------------------------------------------------------------ |
| 427 | -Added script (#3738) | |
| 433 | +Added script (#3738). | |
| 428 | 434 | |
| 429 | 435 | |
| 430 | 436 | comobsres - Generate residuals of COMPTEL observations |
| 431 | 437 | ------------------------------------------------------ |
| 432 | -Added script (#3738) | |
| 438 | +Added script (#3738). | |
| 433 | 439 | |
| 434 | 440 | |
| 435 | 441 | comobsselect - Select observations from COMPTEL database |
| 436 | 442 | -------------------------------------------------------- |
| 437 | -Added script (#3738) | |
| 443 | +Added script (#3738). | |
| 438 | 444 | |
| 439 | 445 | |
| 440 | 446 | comobssim - Simulate COMPTEL observations |
| 441 | 447 | ----------------------------------------- |
| 442 | -Added script (#3738) | |
| 448 | +Added script (#3738). | |
| 443 | 449 | |
| 444 | 450 | |
| 445 | 451 | comsrcdetect - Detect source in Test Statistic map |
| 446 | 452 | -------------------------------------------------- |
| 447 | -Added script (#3738) | |
| 453 | +Added script (#3738). | |
| 448 | 454 | |
| 449 | 455 | |
| 450 | 456 | Examples | ... | ... |
README.md
| 1 | 1 | ctools information |
| 2 | 2 | ================== |
| 3 | -* Version: 2.0.0.dev (30 September 2021) | |
| 3 | +* Version: 2.0.0.dev (29 November 2021) | |
| 4 | 4 | * GammaLib dependency: 2.0.0.dev |
| 5 | 5 | |
| 6 | 6 | [](https://cta-jenkins.irap.omp.eu/job/ctools-integrate-os/) | ... | ... |
doc/source/users/reference_manual/comlixfit.rst
| ... | ... | @@ -59,6 +59,14 @@ General parameters |
| 59 | 59 | Number of Phibar layers to exclude (relevant for ``BGDLIXA`` and ``BGDLIXE`` |
| 60 | 60 | methods). |
| 61 | 61 | |
| 62 | +``(phi_first = -1) [integer]`` | |
| 63 | + First Phibar layer for likelihood fitting, starting from 0. If -1 is specified | |
| 64 | + there is no first Phibar layer selection. | |
| 65 | + | |
| 66 | +``(phi_last = -1) [integer]`` | |
| 67 | + Last Phibar layer for likelihood fitting, starting from 0. If -1 is specified | |
| 68 | + there is no last Phibar layer selection. | |
| 69 | + | |
| 62 | 70 | |
| 63 | 71 | Standard parameters |
| 64 | 72 | ------------------- | ... | ... |
doc/source/users/reference_manual/comlixmap.rst
| ... | ... | @@ -73,6 +73,14 @@ General parameters |
| 73 | 73 | Number of Phibar layers to exclude (relevant for ``BGDLIXA`` and ``BGDLIXE`` |
| 74 | 74 | methods). |
| 75 | 75 | |
| 76 | +``(phi_first = -1) [integer]`` | |
| 77 | + First Phibar layer for likelihood fitting, starting from 0. If -1 is specified | |
| 78 | + there is no first Phibar layer selection. | |
| 79 | + | |
| 80 | +``(phi_last = -1) [integer]`` | |
| 81 | + Last Phibar layer for likelihood fitting, starting from 0. If -1 is specified | |
| 82 | + there is no last Phibar layer selection. | |
| 83 | + | |
| 76 | 84 | |
| 77 | 85 | Standard parameters |
| 78 | 86 | ------------------- | ... | ... |
modules/comscripts/comlixfit.par
| ... | ... | @@ -35,6 +35,8 @@ nrunav, i, h, 3,,, "Number of Chi/Psi bins used for running average |
| 35 | 35 | navgr, i, h, 5,,, "Number of Chi/Psi bins used for averaging" |
| 36 | 36 | nincl, i, h, 5,,, "Number of Phibar layers to include" |
| 37 | 37 | nexcl, i, h, 0,,, "Number of Phibar layers to exclude" |
| 38 | +phi_first, i, h, -1,,, "First Phibar layer for fitting (starting from 0; -1: no selection)" | |
| 39 | +phi_last, i, h, -1,,, "Last Phibar layer for fitting (starting from 0;-1: no selection)" | |
| 38 | 40 | |
| 39 | 41 | # |
| 40 | 42 | # Standard parameters | ... | ... |
modules/comscripts/comlixfit.py
| ... | ... | @@ -70,6 +70,8 @@ class comlixfit(ctools.cslikelihood): |
| 70 | 70 | navgr = self['navgr'].integer() |
| 71 | 71 | nincl = self['nincl'].integer() |
| 72 | 72 | nexcl = self['nexcl'].integer() |
| 73 | + phi_first = self['phi_first'].integer() | |
| 74 | + phi_last = self['phi_last'].integer() | |
| 73 | 75 | |
| 74 | 76 | # Check for incorrect parameters |
| 75 | 77 | if nexcl < 0 or nexcl >= nincl: |
| ... | ... | @@ -92,6 +94,14 @@ class comlixfit(ctools.cslikelihood): |
| 92 | 94 | self['outobs'].filename() |
| 93 | 95 | self['outmodel'].filename() |
| 94 | 96 | |
| 97 | + # Set Phibar layers for fitting | |
| 98 | + for obs in self.obs(): | |
| 99 | + if obs.classname() == 'GCOMObservation': | |
| 100 | + if phi_first >= 0: | |
| 101 | + obs.phi_first(phi_first) | |
| 102 | + if phi_last >= 0: | |
| 103 | + obs.phi_last(phi_last) | |
| 104 | + | |
| 95 | 105 | # Write input parameters into logger |
| 96 | 106 | self._log_parameters(gammalib.TERSE) |
| 97 | 107 | ... | ... |
modules/comscripts/comlixmap.par
| ... | ... | @@ -43,6 +43,8 @@ nrunav, i, h, 3,,, "Number of Chi/Psi bins used for running average" |
| 43 | 43 | navgr, i, h, 9,,, "Number of Chi/Psi bins used for averaging" |
| 44 | 44 | nincl, i, h, 5,,, "Number of Phibar layers to include" |
| 45 | 45 | nexcl, i, h, 0,,, "Number of Phibar layers to exclude" |
| 46 | +phi_first, i, h, -1,,, "First Phibar layer for fitting (starting from 0; -1: no selection)" | |
| 47 | +phi_last, i, h, -1,,, "Last Phibar layer for fitting (starting from 0;-1: no selection)" | |
| 46 | 48 | |
| 47 | 49 | # |
| 48 | 50 | # Standard parameters | ... | ... |
modules/comscripts/comlixmap.py
| ... | ... | @@ -84,6 +84,8 @@ class comlixmap(ctools.cslikelihood): |
| 84 | 84 | navgr = self['navgr'].integer() |
| 85 | 85 | nincl = self['nincl'].integer() |
| 86 | 86 | nexcl = self['nexcl'].integer() |
| 87 | + phi_first = self['phi_first'].integer() | |
| 88 | + phi_last = self['phi_last'].integer() | |
| 87 | 89 | |
| 88 | 90 | # Check for incorrect parameters |
| 89 | 91 | if nexcl < 0 or nexcl >= nincl: |
| ... | ... | @@ -103,6 +105,14 @@ class comlixmap(ctools.cslikelihood): |
| 103 | 105 | if self._read_ahead(): |
| 104 | 106 | self['outmap'].filename() |
| 105 | 107 | |
| 108 | + # Set Phibar layers for fitting | |
| 109 | + for obs in self.obs(): | |
| 110 | + if obs.classname() == 'GCOMObservation': | |
| 111 | + if phi_first >= 0: | |
| 112 | + obs.phi_first(phi_first) | |
| 113 | + if phi_last >= 0: | |
| 114 | + obs.phi_last(phi_last) | |
| 115 | + | |
| 106 | 116 | # Write input parameters into logger |
| 107 | 117 | self._log_parameters(gammalib.TERSE) |
| 108 | 118 | ... | ... |