Commit 1b10c9fab002c2eb4629baa52ce40f039a641c61
Merge branch '2307-bugfix-csphagen' into integration
Showing
5 changed files
with
66 additions
and
126 deletions
ChangeLog
NEWS
| 1 | -25 January 2018 | |
| 1 | +8 February 2018 | |
| 2 | 2 | |
| 3 | 3 | |
| 4 | 4 | Introduction |
| ... | ... | @@ -9,10 +9,7 @@ ctools release with respect to the precedent release. |
| 9 | 9 | |
| 10 | 10 | Configuration |
| 11 | 11 | ------------- |
| 12 | -In case of an error, test output is now written into log file (#2264). | |
| 13 | - | |
| 14 | -The cscripts::execute() method no longer creates log files, making the | |
| 15 | -cscripts behaviour compliant with that of ctools (#2182). | |
| 12 | +None | |
| 16 | 13 | |
| 17 | 14 | |
| 18 | 15 | Python interface |
| ... | ... | @@ -27,8 +24,7 @@ None |
| 27 | 24 | |
| 28 | 25 | Base classes |
| 29 | 26 | ------------ |
| 30 | -Add ctools::time_reference constant and remove ctools::time_reference() method | |
| 31 | -(#2295). | |
| 27 | +None | |
| 32 | 28 | |
| 33 | 29 | |
| 34 | 30 | ctbin - CTA event binning |
| ... | ... | @@ -43,9 +39,7 @@ None |
| 43 | 39 | |
| 44 | 40 | ctbutterfly - Generate butterfly diagrams |
| 45 | 41 | ----------------------------------------- |
| 46 | -Add "statistic" parameter to allow setting of optimizer statistic (#2237). | |
| 47 | - | |
| 48 | -Add butterfly() method to return the butterfly diagram as CSV object (#1512). | |
| 42 | +None | |
| 49 | 43 | |
| 50 | 44 | |
| 51 | 45 | ctcubemask - CTA cube filtering |
| ... | ... | @@ -60,7 +54,7 @@ None |
| 60 | 54 | |
| 61 | 55 | cterror - Likelihood profile error computation |
| 62 | 56 | ---------------------------------------------- |
| 63 | -Add "statistic" parameter to allow setting of optimizer statistic (#2237). | |
| 57 | +None | |
| 64 | 58 | |
| 65 | 59 | |
| 66 | 60 | ctexpcube - CTA exposure cube generation |
| ... | ... | @@ -70,7 +64,7 @@ None |
| 70 | 64 | |
| 71 | 65 | ctlike - Maximum likelihood fitting |
| 72 | 66 | ----------------------------------- |
| 73 | -Rename "stats" parameter to "statistic" (#2237). | |
| 67 | +None | |
| 74 | 68 | |
| 75 | 69 | |
| 76 | 70 | ctmapcube - CTA map cube generation |
| ... | ... | @@ -80,22 +74,12 @@ None |
| 80 | 74 | |
| 81 | 75 | ctmodel - CTA counts cube modelling |
| 82 | 76 | ----------------------------------- |
| 83 | -Use t-type parameters for "tmin" and "tmax" to all specifying times in various | |
| 84 | -formats (#1864). | |
| 85 | - | |
| 86 | -The tool now also checks which models actually overlap with the RoI of a given | |
| 87 | -observation and then only use these models to compute the model cube. The | |
| 88 | -parallelization of the tool has also been optimised so that diffuse models are | |
| 89 | -not loaded over and over again (#2189). | |
| 77 | +None | |
| 90 | 78 | |
| 91 | 79 | |
| 92 | 80 | ctobssim - CTA observation simulation |
| 93 | 81 | ------------------------------------- |
| 94 | -Use t-type parameters for "tmin" and "tmax" to all specifying times in various | |
| 95 | -formats (#1864). | |
| 96 | - | |
| 97 | -Set the OBS_ID keyword to the number that is used for creating the FITS file | |
| 98 | -(#1836). | |
| 82 | +None | |
| 99 | 83 | |
| 100 | 84 | |
| 101 | 85 | ctphase - Event phase computation |
| ... | ... | @@ -110,51 +94,32 @@ None |
| 110 | 94 | |
| 111 | 95 | ctpsfcube - CTA point spread function cube generation |
| 112 | 96 | ----------------------------------------------------- |
| 113 | -The chatter level is now correctly forwarded to the PSF cube fill method (#2262). | |
| 97 | +None | |
| 114 | 98 | |
| 115 | 99 | |
| 116 | 100 | ctselect - CTA event selection |
| 117 | 101 | ------------------------------ |
| 118 | -Any .gz suffix is now correctly stripped from the event filenames when creating | |
| 119 | -the output filenames (#2287). | |
| 120 | - | |
| 121 | -ctselect now informs about non-overlapping time interval; before the time interval | |
| 122 | -was set to [0,0] which was disturbing and eventually incorrect (#2272). | |
| 123 | - | |
| 124 | -Use t-type parameters for "tmin" and "tmax" to all specifying times in various | |
| 125 | -formats (#1864). | |
| 102 | +None | |
| 126 | 103 | |
| 127 | 104 | |
| 128 | 105 | ctskymap - CTA sky mapping |
| 129 | 106 | -------------------------- |
| 130 | -Header keywords informing about the dates and times covered by the observations | |
| 131 | -used to generate the skymap, as well as the event energy range, are now appended | |
| 132 | -as header keywords to the FITS file (#2194). | |
| 133 | - | |
| 134 | -Add the RING background method, which is a classical analysis methods for IACT | |
| 135 | -data analysis, for background subtraction (#2207). | |
| 107 | +None | |
| 136 | 108 | |
| 137 | 109 | |
| 138 | 110 | cttsmap - Generation of Test Statistic map |
| 139 | 111 | ------------------------------------------ |
| 140 | -Add "statistic" parameter to allow setting of optimizer statistic (#2237). | |
| 112 | +None | |
| 141 | 113 | |
| 142 | 114 | |
| 143 | 115 | ctulimit - Compute upper limit |
| 144 | 116 | ------------------------------ |
| 145 | -The tool now also computes correct upper flux limits for diffuse map cubes | |
| 146 | -for which the spectral component is a normalization of the spectral information | |
| 147 | -available in the map cube (#2298). | |
| 148 | - | |
| 149 | -Add "statistic" parameter to allow setting of optimizer statistic (#2237). | |
| 117 | +None | |
| 150 | 118 | |
| 151 | 119 | |
| 152 | 120 | support - Support classes |
| 153 | 121 | ------------------------- |
| 154 | -Change DATE_OBS, DATE_END, TIME_OBS and TIME_END FITS keywords into DATA-OBS, | |
| 155 | -DATE-END, TIME-OBS and TIME-END. | |
| 156 | - | |
| 157 | -Add ctobservation.obs() method to set an observation container. | |
| 122 | +None | |
| 158 | 123 | |
| 159 | 124 | |
| 160 | 125 | cscaldb - Inspect calibration database |
| ... | ... | @@ -189,16 +154,7 @@ None |
| 189 | 154 | |
| 190 | 155 | cslightcrv - Generate light curve |
| 191 | 156 | --------------------------------- |
| 192 | -The script now also supports the handling of On/Off observations. For that | |
| 193 | -purpose parameters were added that are needed for the execution of the | |
| 194 | -csphagen script (#2273). | |
| 195 | - | |
| 196 | -The script now derives from the csobservation base class. A "statistic" | |
| 197 | -parameter was added to allow setting the optimizer statistic for the light | |
| 198 | -curve generation (#2237). | |
| 199 | - | |
| 200 | -Use t-type parameters for "tmin" and "tmax" to all specifying times in various | |
| 201 | -formats (#1864). | |
| 157 | +None | |
| 202 | 158 | |
| 203 | 159 | |
| 204 | 160 | csmodelinfo - Return model information |
| ... | ... | @@ -218,8 +174,7 @@ None |
| 218 | 174 | |
| 219 | 175 | csmodelsois - Puts selected sources in diffuse model cube |
| 220 | 176 | --------------------------------------------------------- |
| 221 | -Add script that replaces selected models in a model container by a diffuse | |
| 222 | -map cube (#2180). | |
| 177 | +None | |
| 223 | 178 | |
| 224 | 179 | |
| 225 | 180 | csobs2caldb - Generate calibration database entry for an IACT observation |
| ... | ... | @@ -239,42 +194,22 @@ None |
| 239 | 194 | |
| 240 | 195 | csobsselect - Select observations |
| 241 | 196 | --------------------------------- |
| 242 | -Add tmin and tmax parameters to allow selection of observation by time (#2297). | |
| 197 | +None | |
| 243 | 198 | |
| 244 | 199 | |
| 245 | 200 | csphagen - Generate On/Off observations |
| 246 | 201 | --------------------------------------- |
| 247 | -The CUSTOM background method was added to allow specifying On and Off regions | |
| 248 | -from a region file or FITS WCS map. For multiple observations, a custom Off | |
| 249 | -region per observation can be specified in the observation definition XML file | |
| 250 | -using the OffRegions parameter (#2284). | |
| 251 | - | |
| 252 | -The script was added to allow the generation of PHA, ARF and RMF datasets for classical On/Off IACT analysis (#2208). | |
| 202 | +Enable using the script also for HESS, VERITAS and MAGIC observations (#2307). | |
| 253 | 203 | |
| 254 | 204 | |
| 255 | 205 | csphasecrv - Generate phase curve |
| 256 | 206 | --------------------------------- |
| 257 | -The script now also supports the handling of On/Off observations. For that | |
| 258 | -purpose parameters were added that are needed for the execution of the | |
| 259 | -csphagen script (#2273). | |
| 260 | - | |
| 261 | -The script now derives from the csobservation base class. A "statistic" | |
| 262 | -parameter was added to allow setting the optimizer statistic for the light | |
| 263 | -curve generation (#2237). | |
| 207 | +None | |
| 264 | 208 | |
| 265 | 209 | |
| 266 | 210 | cspull - Generate pull distributions |
| 267 | 211 | ------------------------------------ |
| 268 | -The script now handles On/Off observation. The parameters "onsrc" and "onrad" | |
| 269 | -were added to allow specifying the On region test source and On region radius | |
| 270 | -(#2260). | |
| 271 | - | |
| 272 | -The script now derives from the csobservation base class. A "statistic" | |
| 273 | -parameter was added to allow setting the optimizer statistic for the pull | |
| 274 | -distribution generation (#2237). | |
| 275 | - | |
| 276 | -Use t-type parameters for "tmin" and "tmax" to all specifying times in various | |
| 277 | -formats (#1864). | |
| 212 | +None | |
| 278 | 213 | |
| 279 | 214 | |
| 280 | 215 | csresmap - Generate residual map |
| ... | ... | @@ -284,7 +219,7 @@ None |
| 284 | 219 | |
| 285 | 220 | csresspec - Generate residual spectrum |
| 286 | 221 | -------------------------------------- |
| 287 | -Add script to generate a residual spectrum (#2289) | |
| 222 | +None | |
| 288 | 223 | |
| 289 | 224 | |
| 290 | 225 | csroot2caldb - Generates calibration database from ROOT file |
| ... | ... | @@ -294,25 +229,12 @@ None |
| 294 | 229 | |
| 295 | 230 | cssens - Computes sensitivity curve |
| 296 | 231 | ----------------------------------- |
| 297 | -The script now derived from the csobservation base class. A "statistic" | |
| 298 | -parameter was added to allow setting the optimizer statistic for the sensitivity | |
| 299 | -computation (#2237). | |
| 232 | +None | |
| 300 | 233 | |
| 301 | 234 | |
| 302 | 235 | csspec - Generates Spectral Energy Distribution |
| 303 | 236 | ----------------------------------------------- |
| 304 | -The script now derives from the csobservation base class. A "statistic" | |
| 305 | -parameter was added to allow setting the optimizer statistic for the spectrum | |
| 306 | -generation (#2237). | |
| 307 | - | |
| 308 | -The script now can also handle On/Off spectra for SED generation (#2231). | |
| 309 | - | |
| 310 | -The script now can also handle non-CTA data. For that purpose a "method" | |
| 311 | -parameter has been introduced that allows to selected between slicing of the data | |
| 312 | -(method="SLICE"), which is only supported for CTA observations, and replacing of | |
| 313 | -the spectral model by a node function (method="NODES"). If method="AUTO" the tool | |
| 314 | -will use "SLICE" for observations containing only CTA data and "NODES" for observations | |
| 315 | -containing other data (#1927). | |
| 237 | +None | |
| 316 | 238 | |
| 317 | 239 | |
| 318 | 240 | cssrcdetect - Detects sources in sky map |
| ... | ... | @@ -322,18 +244,7 @@ None |
| 322 | 244 | |
| 323 | 245 | cstsdist - Computes Test Statistic distribution |
| 324 | 246 | ----------------------------------------------- |
| 325 | -The script now derives from the csobservation base class. A "statistic" | |
| 326 | -parameter was added to allow setting the optimizer statistic for the Test | |
| 327 | -Statistic distribution generation (#2237). | |
| 328 | - | |
| 329 | -The parameter interface was considerably revised, in particular the following | |
| 330 | -parameters were removed: "ra", "dec", "rad", "coordsys", "proj", "emin", | |
| 331 | -"emax", "enumbins", "tmin", "tmax", "npix" and "binsz". The "inobs" parameter | |
| 332 | -is now always queried. The script now reads in an observation or an observation | |
| 333 | -container and derives the TS distribution for a source based on that observation | |
| 334 | -container. So far the script supports unbinned, binned and stacked observations. | |
| 335 | -If an observation definition XML file is specified the script assumes that all | |
| 336 | -observations are event lists (#1567). | |
| 247 | +None | |
| 337 | 248 | |
| 338 | 249 | |
| 339 | 250 | cstsmapmerge - Merge Test Statistic maps |
| ... | ... | @@ -343,14 +254,12 @@ None |
| 343 | 254 | |
| 344 | 255 | cstsmapsplit - Prepare split Test Statistic computation |
| 345 | 256 | ------------------------------------------------------- |
| 346 | -A "statistic" parameter was added to allow setting the optimizer statistic for | |
| 347 | -the TS map generation (#2237). | |
| 257 | +None | |
| 348 | 258 | |
| 349 | 259 | |
| 350 | 260 | csviscube - Generate visibility cube |
| 351 | 261 | ------------------------------------ |
| 352 | -Use t-type parameters for "tmin" and "tmax" to all specifying times in various | |
| 353 | -formats (#1864). | |
| 262 | +None | |
| 354 | 263 | |
| 355 | 264 | |
| 356 | 265 | csworkflow - Execute workflow | ... | ... |
cscripts/csphagen.py
| ... | ... | @@ -123,7 +123,8 @@ class csphagen(ctools.csobservation): |
| 123 | 123 | # Off region region the parameter 'bkgregfile' for all CTA observations |
| 124 | 124 | # without Off region |
| 125 | 125 | for obs in self.obs(): |
| 126 | - if obs.instrument() == 'CTA': | |
| 126 | + #if obs.instrument() == 'CTA': | |
| 127 | + if obs.classname() == 'GCTAObservation': | |
| 127 | 128 | if obs.off_regions().is_empty(): |
| 128 | 129 | filename = self['bkgregfile'].filename() |
| 129 | 130 | regions = gammalib.GSkyRegions(filename) |
| ... | ... | @@ -263,8 +264,8 @@ class csphagen(ctools.csobservation): |
| 263 | 264 | """ |
| 264 | 265 | Set models in observation container |
| 265 | 266 | |
| 266 | - The method replaces all "CTA" background models by "CTAOnOff" | |
| 267 | - background models. | |
| 267 | + The method replaces all "CTA", "HESS", "VERITAS", and "MAGIC" | |
| 268 | + background models by "CTAOnOff" background models. | |
| 268 | 269 | |
| 269 | 270 | Parameters |
| 270 | 271 | ---------- |
| ... | ... | @@ -279,11 +280,15 @@ class csphagen(ctools.csobservation): |
| 279 | 280 | # Initialise model container |
| 280 | 281 | models = gammalib.GModels() |
| 281 | 282 | |
| 282 | - # Loop over all models and replace CTA background model by CTAOnOff | |
| 283 | - # background model | |
| 283 | + # Loop over all models and replace CTA/HESS/VERITAS/MAGIC background | |
| 284 | + # models by CTAOnOff background model | |
| 284 | 285 | for model in self.obs().models(): |
| 285 | - if 'GCTA' in model.classname() and 'CTA' in model.instruments(): | |
| 286 | - model.instruments('CTAOnOff') | |
| 286 | + if 'GCTA' in model.classname(): | |
| 287 | + if 'CTA' in model.instruments() or \ | |
| 288 | + 'HESS' in model.instruments() or \ | |
| 289 | + 'VERITAS' in model.instruments() or \ | |
| 290 | + 'MAGIC' in model.instruments(): | |
| 291 | + model.instruments('CTAOnOff') | |
| 287 | 292 | models.append(model) |
| 288 | 293 | |
| 289 | 294 | # Append model to observation container |
| ... | ... | @@ -399,7 +404,8 @@ class csphagen(ctools.csobservation): |
| 399 | 404 | for obs in self.obs(): |
| 400 | 405 | |
| 401 | 406 | # Skip non CTA observations |
| 402 | - if obs.instrument() != 'CTA': | |
| 407 | + #if obs.instrument() != 'CTA': | |
| 408 | + if obs.classname() != 'GCTAObservation': | |
| 403 | 409 | self._log_string(gammalib.NORMAL, 'Skip %s observation "%s"' % \ |
| 404 | 410 | (obs.instrument(), obs.id())) |
| 405 | 411 | continue | ... | ... |
doc/source/admin/release_history/1.5.1.rst
0 → 100644
| 1 | +.. _1.5.1: | |
| 2 | + | |
| 3 | +ctools 1.5.1 release | |
| 4 | +==================== | |
| 5 | + | |
| 6 | +Overview | |
| 7 | +-------- | |
| 8 | + | |
| 9 | +ctools 1.5.1 is a bug fix release for ctools release 1.5. | |
| 10 | + | |
| 11 | +The following bugs were fixed: | |
| 12 | + | |
| 13 | +* ... | |
| 14 | + | |
| 15 | +The following improvements were made: | |
| 16 | + | |
| 17 | +* [`2307 <https://cta-redmine.irap.omp.eu/issues/2307>`_] - | |
| 18 | + Enable using :ref:`csphagen` for HESS, VERITAS and MAGIC observations | ... | ... |