Commit df5e50cb89918d7406983e1ec76087d8a9907ea4

Authored by Jürgen Knödlseder
1 parent 462d3c8e

Complement Doxygen documentation of GSkymap::flux() methods.

Add a warning that the method should not be used during setup.
Showing 1 changed file with 25 additions and 1 deletions
src/sky/GSkyMap.cpp
... ... @@ -1252,7 +1252,24 @@ GSkyPixel GSkyMap::dir2pix(const GSkyDir& dir) const
1252 1252 * @exception GException::invalid_value
1253 1253 * No valid sky projection found.
1254 1254 *
1255   - * Returns the flux in the pixel with the specified @p index.
  1255 + * Returns the flux in the pixel with the specified @p index. The flux is
  1256 + * computed by integrating the intensity over the solid angle subtended by
  1257 + * the pixel.
  1258 + * Integration is done by dividing the pixel into wedges, computing the
  1259 + * intensitites at the cornes of each wedge, averaging these intensities,
  1260 + * and multiplying it with the solid angle of each wedge. This provides an
  1261 + * approximation of the true pixel flux which is accurate to better than
  1262 + * about 5%.
  1263 + *
  1264 + * For a HealPix pixelisation, the pixel is divided into 12 wedges. For a
  1265 + * WCS pixelisation, the pixel is divided into 8 wedges.
  1266 + *
  1267 + * @warning
  1268 + * This method only returns correct values once the skymap is completely
  1269 + * setup with values. Do not use this method during a setup operation as
  1270 + * the method uses neighboring pixels for interpolation. If the map is not
  1271 + * completely setup the neighboring pixels may still be empty, hence the
  1272 + * flux interpolation will be wrong.
1256 1273 ***************************************************************************/
1257 1274 double GSkyMap::flux(const int& index, const int& map) const
1258 1275 {
... ... @@ -1290,6 +1307,13 @@ double GSkyMap::flux(const int& index, const int& map) const
1290 1307 *
1291 1308 * For a HealPix pixelisation, the pixel is divided into 12 wedges. For a
1292 1309 * WCS pixelisation, the pixel is divided into 8 wedges.
  1310 + *
  1311 + * @warning
  1312 + * This method only returns correct values once the skymap is completely
  1313 + * setup with values. Do not use this method during a setup operation as
  1314 + * the method uses neighboring pixels for interpolation. If the map is not
  1315 + * completely setup the neighboring pixels may still be empty, hence the
  1316 + * flux interpolation will be wrong.
1293 1317 ***************************************************************************/
1294 1318 double GSkyMap::flux(const GSkyPixel& pixel, const int& map) const
1295 1319 {
... ...