Commit 1ff542edb7defea420ffc73ec6d9b78b5832c2cf
1 parent
7c26ef50
update license information
Showing
2 changed files
with
31 additions
and
5 deletions
include/GResponse.hpp
| @@ -4,10 +4,18 @@ | @@ -4,10 +4,18 @@ | ||
| 4 | * copyright (C) 2008-2011 by Jurgen Knodlseder * | 4 | * copyright (C) 2008-2011 by Jurgen Knodlseder * |
| 5 | * ----------------------------------------------------------------------- * | 5 | * ----------------------------------------------------------------------- * |
| 6 | * * | 6 | * * |
| 7 | - * This program is free software; you can redistribute it and/or modify * | ||
| 8 | - * it under the terms of the GNU General Public License as published by * | ||
| 9 | - * the Free Software Foundation; either version 2 of the License, or * | ||
| 10 | - * (at your option) any later version. * | 7 | + * This program is free software: you can redistribute it and/or modify * |
| 8 | + * it under the terms of the GNU General Public License as published by * | ||
| 9 | + * the Free Software Foundation, either version 3 of the License, or * | ||
| 10 | + * (at your option) any later version. * | ||
| 11 | + * * | ||
| 12 | + * This program is distributed in the hope that it will be useful, * | ||
| 13 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of * | ||
| 14 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * | ||
| 15 | + * GNU General Public License for more details. * | ||
| 16 | + * * | ||
| 17 | + * You should have received a copy of the GNU General Public License * | ||
| 18 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. * | ||
| 11 | * * | 19 | * * |
| 12 | ***************************************************************************/ | 20 | ***************************************************************************/ |
| 13 | /** | 21 | /** |
src/obs/GResponse.cpp
| @@ -271,6 +271,24 @@ double GResponse::irf_diffuse(const GInstDir& obsDir, | @@ -271,6 +271,24 @@ double GResponse::irf_diffuse(const GInstDir& obsDir, | ||
| 271 | 271 | ||
| 272 | 272 | ||
| 273 | /***********************************************************************//** | 273 | /***********************************************************************//** |
| 274 | + * @brief Return maximum IRF radius (in radians) | ||
| 275 | + * | ||
| 276 | + * @param[in] srcEng True energy of photon. | ||
| 277 | + * | ||
| 278 | + * This method returns the radius beyond which the IRF can be assumed to be | ||
| 279 | + * zero. By default this method returns pi (hence no limiting IRF radius). | ||
| 280 | + * Implementing a maximum IRF radius helps the convergence of the Npred | ||
| 281 | + * integration routine, and brings down computation time to an affordable | ||
| 282 | + * amount. | ||
| 283 | + ***************************************************************************/ | ||
| 284 | +double GResponse::irf_max_radius(const GEnergy& srcEng) const | ||
| 285 | +{ | ||
| 286 | + // Return pi | ||
| 287 | + return pi; | ||
| 288 | +} | ||
| 289 | + | ||
| 290 | + | ||
| 291 | +/***********************************************************************//** | ||
| 274 | * @brief Return data space integral of instrument response function | 292 | * @brief Return data space integral of instrument response function |
| 275 | * | 293 | * |
| 276 | * @param[in] model Source model. | 294 | * @param[in] model Source model. |
| @@ -345,7 +363,7 @@ double GResponse::npred_extended(const GModelExtendedSource& model, | @@ -345,7 +363,7 @@ double GResponse::npred_extended(const GModelExtendedSource& model, | ||
| 345 | { | 363 | { |
| 346 | // Initialise Npred value | 364 | // Initialise Npred value |
| 347 | double npred = 0.0; | 365 | double npred = 0.0; |
| 348 | - | 366 | + |
| 349 | // Compute rotation matrix to convert from native coordinates given by | 367 | // Compute rotation matrix to convert from native coordinates given by |
| 350 | // (theta,phi) into celestial coordinates. | 368 | // (theta,phi) into celestial coordinates. |
| 351 | GMatrix ry; | 369 | GMatrix ry; |