Commit 2b7910765167cf16b09aa8a335d35bfc5d61c521
1 parent
0e596d40
Correctly access map of 3D map cubes in flux() method.
Before, always the first map has been accessed.
Showing
1 changed file
with
22 additions
and
22 deletions
src/sky/GSkymap.cpp
| ... | ... | @@ -1317,19 +1317,19 @@ double GSkymap::flux(const GSkyPixel& pixel, const int& map) const |
| 1317 | 1317 | std::vector<GSkyDir> boundaries = healpix->boundaries(pixel, 3); |
| 1318 | 1318 | |
| 1319 | 1319 | // Compute intensities |
| 1320 | - double i0 = this->operator()(centre); | |
| 1321 | - double i1 = this->operator()(boundaries[0]); | |
| 1322 | - double i2 = this->operator()(boundaries[4]); | |
| 1323 | - double i3 = this->operator()(boundaries[8]); | |
| 1324 | - double i4 = this->operator()(boundaries[1]); | |
| 1325 | - double i5 = this->operator()(boundaries[5]); | |
| 1326 | - double i6 = this->operator()(boundaries[9]); | |
| 1327 | - double i7 = this->operator()(boundaries[2]); | |
| 1328 | - double i8 = this->operator()(boundaries[6]); | |
| 1329 | - double i9 = this->operator()(boundaries[10]); | |
| 1330 | - double i10 = this->operator()(boundaries[3]); | |
| 1331 | - double i11 = this->operator()(boundaries[7]); | |
| 1332 | - double i12 = this->operator()(boundaries[11]); | |
| 1320 | + double i0 = this->operator()(centre, map); | |
| 1321 | + double i1 = this->operator()(boundaries[0], map); | |
| 1322 | + double i2 = this->operator()(boundaries[4], map); | |
| 1323 | + double i3 = this->operator()(boundaries[8], map); | |
| 1324 | + double i4 = this->operator()(boundaries[1], map); | |
| 1325 | + double i5 = this->operator()(boundaries[5], map); | |
| 1326 | + double i6 = this->operator()(boundaries[9], map); | |
| 1327 | + double i7 = this->operator()(boundaries[2], map); | |
| 1328 | + double i8 = this->operator()(boundaries[6], map); | |
| 1329 | + double i9 = this->operator()(boundaries[10], map); | |
| 1330 | + double i10 = this->operator()(boundaries[3], map); | |
| 1331 | + double i11 = this->operator()(boundaries[7], map); | |
| 1332 | + double i12 = this->operator()(boundaries[11], map); | |
| 1333 | 1333 | |
| 1334 | 1334 | // Compute fluxes in wedges |
| 1335 | 1335 | double flux1 = gammalib::onethird * (i0 + i1 + i2) * |
| ... | ... | @@ -1385,15 +1385,15 @@ double GSkymap::flux(const GSkyPixel& pixel, const int& map) const |
| 1385 | 1385 | GSkyDir boundary8 = pix2dir(GSkyPixel(pixel.x()-0.5, pixel.y())); |
| 1386 | 1386 | |
| 1387 | 1387 | // Compute intensities |
| 1388 | - double i0 = this->operator()(centre); | |
| 1389 | - double i1 = this->operator()(boundary1); | |
| 1390 | - double i2 = this->operator()(boundary2); | |
| 1391 | - double i3 = this->operator()(boundary3); | |
| 1392 | - double i4 = this->operator()(boundary4); | |
| 1393 | - double i5 = this->operator()(boundary5); | |
| 1394 | - double i6 = this->operator()(boundary6); | |
| 1395 | - double i7 = this->operator()(boundary7); | |
| 1396 | - double i8 = this->operator()(boundary8); | |
| 1388 | + double i0 = this->operator()(centre, map); | |
| 1389 | + double i1 = this->operator()(boundary1, map); | |
| 1390 | + double i2 = this->operator()(boundary2, map); | |
| 1391 | + double i3 = this->operator()(boundary3, map); | |
| 1392 | + double i4 = this->operator()(boundary4, map); | |
| 1393 | + double i5 = this->operator()(boundary5, map); | |
| 1394 | + double i6 = this->operator()(boundary6, map); | |
| 1395 | + double i7 = this->operator()(boundary7, map); | |
| 1396 | + double i8 = this->operator()(boundary8, map); | |
| 1397 | 1397 | |
| 1398 | 1398 | // Compute fluxes |
| 1399 | 1399 | double flux1 = gammalib::onethird * (i1 + i2 + i0) * | ... | ... |