Commit 01c053e7b1bf2f9b7f328758395553ac7150e07a
1 parent
db226c73
Rename counts map to counts cube.
Showing
4 changed files
with
34 additions
and
34 deletions
doc/source/fhelp/ctbin.html
| ... | ... | @@ -13,7 +13,7 @@ likelihood analysis.</p> |
| 13 | 13 | <br> |
| 14 | 14 | <p class="Title">Synopsis</p> |
| 15 | 15 | <p style="padding-top: 0pt; text-align: left;" class="Body">This |
| 16 | -tool computes the counts maps for use in a binned likelihood analysis. | |
| 16 | +tool computes the counts cube for use in a binned likelihood analysis. | |
| 17 | 17 | The maps are data cubes in Right Ascension or Galactic longitude, |
| 18 | 18 | Declination or Galactic latitude, and log(energy).</p> |
| 19 | 19 | <br> |
| ... | ... | @@ -51,7 +51,7 @@ definition XML file.</td> |
| 51 | 51 | <tr> |
| 52 | 52 | <td width="50"> </td> |
| 53 | 53 | <td width="25"> </td> |
| 54 | -<td width="525">Output counts map or observation definition XML file.</td> | |
| 54 | +<td width="525">Output counts cube file.</td> | |
| 55 | 55 | </tr> |
| 56 | 56 | <tr> |
| 57 | 57 | <td width="50"> </td> |
| ... | ... | @@ -66,7 +66,7 @@ definition XML file.</td> |
| 66 | 66 | <tr> |
| 67 | 67 | <td width="50"> </td> |
| 68 | 68 | <td width="25"> </td> |
| 69 | -<td width="525">Prefix for counts maps in observation definition file.</td> | |
| 69 | +<td width="525">Prefix for counts maps (no longer used).</td> | |
| 70 | 70 | </tr> |
| 71 | 71 | <tr> |
| 72 | 72 | <td width="50"> </td> | ... | ... |
doc/source/user_manual/getting_started/quickstart.rst
| ... | ... | @@ -212,8 +212,8 @@ information to the console using |
| 212 | 212 | Binning CTA data |
| 213 | 213 | ~~~~~~~~~~~~~~~~ |
| 214 | 214 | |
| 215 | -As next analysis step you will bin the data in a counts map using the | |
| 216 | -executable ctbin. A counts map is a 3 dimensional data cube, spanned by | |
| 215 | +As next analysis step you will bin the data in a counts cube using the | |
| 216 | +executable ctbin. A counts cube is a 3 dimensional data cube, spanned by | |
| 217 | 217 | Right Ascension (or Galactic longitude), Declination (or Galactic latitude), |
| 218 | 218 | and the logarithm (base 10) of energy. |
| 219 | 219 | |
| ... | ... | @@ -225,29 +225,29 @@ ctbin is executed by typing: |
| 225 | 225 | Input event list or observation definition file [test/data/crab_events.fits.gz] events.fits |
| 226 | 226 | First coordinate of image center in degrees (RA or galactic l) [83.63] |
| 227 | 227 | Second coordinate of image center in degrees (DEC or galactic b) [22.01] |
| 228 | - Algorithm for defining energy bins (FILE|LIN|LOG) [LOG] | |
| 229 | - Start value for first energy bin in TeV [0.1] | |
| 230 | - Stop value for last energy bin in TeV [100.0] | |
| 231 | - Number of energy bins [20] | |
| 232 | 228 | Projection method e.g. AIT|AZP|CAR|MER|STG|TAN (AIT|AZP|CAR|MER|STG|TAN) [CAR] |
| 233 | 229 | Coordinate system (CEL - celestial, GAL - galactic) (CEL|GAL) [CEL] |
| 234 | 230 | Image scale (in degrees/pixel) [0.02] |
| 235 | 231 | Size of the X axis in pixels [200] |
| 236 | 232 | Size of the Y axis in pixels [200] |
| 237 | - Output counts map or observation definition file [cntmap.fits] | |
| 233 | + Algorithm for defining energy bins (FILE|LIN|LOG) [LOG] | |
| 234 | + Start value for first energy bin in TeV [0.1] | |
| 235 | + Stop value for last energy bin in TeV [100.0] | |
| 236 | + Number of energy bins [20] | |
| 237 | + Output counts cube [cntmap.fits] | |
| 238 | 238 | |
| 239 | 239 | In this example we adjust the event data file name and accept all the |
| 240 | 240 | remaining parameter defaults as they perfectly satisfy our needs. The counts |
| 241 | -map will be centred on the location of the Crab (Right Ascension 83.63 degrees, | |
| 241 | +cube will be centred on the location of the Crab (Right Ascension 83.63 degrees, | |
| 242 | 242 | Declination 22.01 degrees) and will be aligned in celestial coordinates. A |
| 243 | -cartesian projection has been selected. The counts map has 200 x 200 spatial | |
| 243 | +cartesian projection has been selected. The counts cube has 200 x 200 spatial | |
| 244 | 244 | pixels of 0.02 x 0.02 degrees in size, hence it covers a total area of 4 x 4 |
| 245 | 245 | degrees. |
| 246 | 246 | |
| 247 | -A set of 20 counts maps will be created, which are logarithmically spaced | |
| 247 | +The counts cube will contain 20 maps, which are logarithmically spaced | |
| 248 | 248 | in energy, and which cover the energy range from 0.1 TeV to 100 TeV. In this |
| 249 | -example, the counts map will be saved as ``cntmap.fits`` in the working | |
| 250 | -directory. In addition to the counts map, that is stored as the primary | |
| 249 | +example, the counts cube will be saved as ``cntmap.fits`` in the working | |
| 250 | +directory. In addition to the counts cube, that is stored as the primary | |
| 251 | 251 | image extension, the FITS file also contains an extension named ``EBOUNDS`` |
| 252 | 252 | that defines the energy boundaries that were used, and an extension ``GTI`` |
| 253 | 253 | that defines the Good Time Intervals that have been used. The following |
| ... | ... | @@ -258,7 +258,7 @@ the start and stop time of the simulated data. |
| 258 | 258 | .. figure:: cntmap-fits.jpg |
| 259 | 259 | :width: 100% |
| 260 | 260 | |
| 261 | - *Counts map FITS file* | |
| 261 | + *Counts cube FITS file* | |
| 262 | 262 | |
| 263 | 263 | |
| 264 | 264 | An image of the first bin, covering the energy range 100 - 141 GeV, is |
| ... | ... | @@ -267,7 +267,7 @@ shown below: |
| 267 | 267 | .. figure:: cntmap-map.jpg |
| 268 | 268 | :width: 50% |
| 269 | 269 | |
| 270 | - *Counts map for first energy bin* | |
| 270 | + *Counts cube for first energy bin* | |
| 271 | 271 | |
| 272 | 272 | |
| 273 | 273 | For illustration, the last few lines of the log file ``ctbin.log`` are |
| ... | ... | @@ -311,8 +311,8 @@ reproduced below: |
| 311 | 311 | 2014-01-09T21:16:18: Application "ctbin" terminated after 37 wall clock seconds, consuming 0.242495 seconds of CPU time. |
| 312 | 312 | |
| 313 | 313 | From the 6141 events that have been simulated and stored in the |
| 314 | -``events.fits`` file, 5542 lie within the map boundaries and are thus put | |
| 315 | -into the resulting counts map. The counts map is stored in a cartesian | |
| 314 | +``events.fits`` file, 5542 lie within the cube boundaries and are thus put | |
| 315 | +into the resulting counts cube. The counts cube is stored in a cartesian | |
| 316 | 316 | projection in a World Coordinate System (WCS) compliant format. |
| 317 | 317 | |
| 318 | 318 | |
| ... | ... | @@ -329,17 +329,17 @@ do the fit by typing: |
| 329 | 329 | .. code-block:: bash |
| 330 | 330 | |
| 331 | 331 | $ ctlike |
| 332 | - Event list, counts map or observation definition file [test/data/crab_events.fits.gz] cntmap.fits | |
| 332 | + Event list, counts cube or observation definition file [test/data/crab_events.fits.gz] cntmap.fits | |
| 333 | 333 | Calibration database [test/irf] $GAMMALIB/share/caldb/cta |
| 334 | 334 | Instrument response function [cta_dummy_irf] |
| 335 | 335 | Source model [test/data/crab.xml] $GAMMALIB/share/models/crab.xml |
| 336 | 336 | Source model output file [crab_results.xml] |
| 337 | 337 | |
| 338 | 338 | Fitting of the data is done in *binned* mode, which means that the events |
| 339 | -have been binned into a counts map and the fit computes the log-likelihood | |
| 340 | -function by summing over all 200 x 200 x 20 bins of the counts map. There is | |
| 339 | +have been binned into a counts cube and the fit computes the log-likelihood | |
| 340 | +function by summing over all 200 x 200 x 20 bins of the counts cube. There is | |
| 341 | 341 | an alternative method, the so called *unbinned* mode, where the events are |
| 342 | -not binned into a counts map and the log-likelihood is computed directly by | |
| 342 | +not binned into a counts cube and the log-likelihood is computed directly by | |
| 343 | 343 | summing over all events. We will explore the *unbinned* mode later. |
| 344 | 344 | |
| 345 | 345 | One of the parameters given to ctlike is a source model output file |
| ... | ... | @@ -468,17 +468,17 @@ are not too far of the best fitting values). |
| 468 | 468 | Doing an unbinned analysis |
| 469 | 469 | ~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 470 | 470 | |
| 471 | -As gamma-ray events are rare, the counts maps generated by ctbin will in | |
| 471 | +As gamma-ray events are rare, the counts cubes generated by ctbin will in | |
| 472 | 472 | general be sparse, having many empty pixels, in particular at high energies. |
| 473 | 473 | An alternative analysis technique consists of working directly on the event |
| 474 | -list without binning the events in a counts map. We will see the benefit of | |
| 474 | +list without binning the events in a counts cube. We will see the benefit of | |
| 475 | 475 | such an analysis later once you re-run ctlike in unbinned mode. |
| 476 | 476 | |
| 477 | 477 | For unbinned analysis you first have to define the data space region over |
| 478 | 478 | which the analysis is done. This is similiar to the ctbin step in binned |
| 479 | -analysis where you defined the size of the counts map, the energy range, and | |
| 479 | +analysis where you defined the size of the counts cube, the energy range, and | |
| 480 | 480 | the time interval. For unbinned analysis you have no such thing as a counts |
| 481 | -map, but you have to define over which region of the data space the selected | |
| 481 | +cube, but you have to define over which region of the data space the selected | |
| 482 | 482 | events are spread (because the ctools have to integrate over this region to |
| 483 | 483 | compute the total number of predicted events in the data space that you |
| 484 | 484 | analyse). Furthermore, you have to define what energy range is covered, and |
| ... | ... | @@ -542,12 +542,12 @@ part: |
| 542 | 542 | |
| 543 | 543 | Now that you have selected the events of interest, you can run ctlike in |
| 544 | 544 | unbinned mode. To do this you have to specify the selected event list |
| 545 | -instead of the counts map: | |
| 545 | +instead of the counts cube: | |
| 546 | 546 | |
| 547 | 547 | .. code-block:: bash |
| 548 | 548 | |
| 549 | 549 | $ ctlike |
| 550 | - Event list, counts map or observation definition file [cntmap.fits] selected_events.fits | |
| 550 | + Event list, counts cube or observation definition file [cntmap.fits] selected_events.fits | |
| 551 | 551 | Calibration database [$GAMMALIB/share/caldb/cta] |
| 552 | 552 | Instrument response function [cta_dummy_irf] |
| 553 | 553 | Source model [$GAMMALIB/share/models/crab.xml] |
| ... | ... | @@ -555,7 +555,7 @@ instead of the counts map: |
| 555 | 555 | |
| 556 | 556 | You will recognise that ctlike runs much faster in unbinned mode compared |
| 557 | 557 | to binned mode. This is understandable as the selected event list contains |
| 558 | -only 6127 events, while the binned counts map we used before had | |
| 558 | +only 6127 events, while the binned counts cube we used before had | |
| 559 | 559 | 200 x 200 x 20 = 800000 pixels. As unbinned maximum likelihood fitting loops |
| 560 | 560 | over the events (while binned maximum likelihood loops over the pixels), |
| 561 | 561 | there are much less operations to perform in unbinned than in binned mode |
| ... | ... | @@ -570,7 +570,7 @@ Below you see the corresponding output from the ctlike.log file. The fitted |
| 570 | 570 | parameters are essentially identical to the ones found in binned mode. |
| 571 | 571 | The slight difference with respect to the binned analysis may be explained |
| 572 | 572 | by the different event sample that has been used for the analysis: while |
| 573 | -binned likelihood works on rectangular counts maps, unbinned likelihood works | |
| 573 | +binned likelihood works on rectangular counts cubes, unbinned likelihood works | |
| 574 | 574 | on circular event selection regions. It is thus not possible to select exactly |
| 575 | 575 | the same events for both analyses. |
| 576 | 576 | ... | ... |
src/ctbin/ctbin.par
| ... | ... | @@ -18,8 +18,8 @@ |
| 18 | 18 | # General parameters |
| 19 | 19 | #=================== |
| 20 | 20 | evfile, f, a, "events.fits",,,"Input event list or observation definition file" |
| 21 | -outfile, f, a, "cntmap.fits",,, "Output counts map or observation definition file" | |
| 22 | -prefix, s, h, "cntmap_",,,"Prefix for counts maps in observation definition file" | |
| 21 | +outfile, f, a, "cntmap.fits",,, "Output counts cube" | |
| 22 | +prefix, s, h, "cntmap_",,,"Prefix (no longer used)" | |
| 23 | 23 | # |
| 24 | 24 | # Energy binning parameters |
| 25 | 25 | #========================== | ... | ... |
src/ctlike/ctlike.par
| ... | ... | @@ -17,7 +17,7 @@ |
| 17 | 17 | # |
| 18 | 18 | # General parameters |
| 19 | 19 | #=================== |
| 20 | -infile, f, a, "events.fits",,, "Event list, counts map or observation definition file" | |
| 20 | +infile, f, a, "events.fits",,, "Event list, counts cube or observation definition file" | |
| 21 | 21 | stat, s, h, "POISSON",,, "Optimization statistics" |
| 22 | 22 | edisp, b, h, no,,, "Apply energy dispersion?" |
| 23 | 23 | refit, b, h, no,,, "Do refitting?" | ... | ... |