Commit 2ed111ceea44076ce0b9a9f95ce4f26b4fbe23e5
1 parent
4dd8af23
Do some minor code formatting
Showing
6 changed files
with
50 additions
and
51 deletions
inst/cta/include/GCTAPsf2D.hpp
| 1 | 1 | /*************************************************************************** |
| 2 | 2 | * GCTAPsf2D.hpp - CTA 2D point spread function class * |
| 3 | 3 | * ----------------------------------------------------------------------- * |
| 4 | - * copyright (C) 2012-2013 by Juergen Knoedlseder * | |
| 4 | + * copyright (C) 2012-2014 by Juergen Knoedlseder * | |
| 5 | 5 | * ----------------------------------------------------------------------- * |
| 6 | 6 | * * |
| 7 | 7 | * This program is free software: you can redistribute it and/or modify * | ... | ... |
inst/cta/include/GCTAPsfKing.hpp
| 1 | 1 | /*************************************************************************** |
| 2 | 2 | * GCTAPsfKing.hpp - King profile CTA point spread function class * |
| 3 | 3 | * ----------------------------------------------------------------------- * |
| 4 | - * copyright (C) 2013 by Michael Mayer * | |
| 4 | + * copyright (C) 2013-2014 by Michael Mayer * | |
| 5 | 5 | * ----------------------------------------------------------------------- * |
| 6 | 6 | * * |
| 7 | 7 | * This program is free software: you can redistribute it and/or modify * | ... | ... |
inst/cta/pyext/GCTAPsf2D.i
| 1 | 1 | /*************************************************************************** |
| 2 | 2 | * GCTAPsf2D.i - CTA 2D point spread function class * |
| 3 | 3 | * ----------------------------------------------------------------------- * |
| 4 | - * copyright (C) 2012 by Juergen Knoedlseder * | |
| 4 | + * copyright (C) 2012-2014 by Juergen Knoedlseder * | |
| 5 | 5 | * ----------------------------------------------------------------------- * |
| 6 | 6 | * * |
| 7 | 7 | * This program is free software: you can redistribute it and/or modify * | ... | ... |
inst/cta/pyext/GCTAPsfKing.i
| 1 | 1 | /*************************************************************************** |
| 2 | 2 | * GCTAPsfKing.i - King profile CTA point spread function class * |
| 3 | 3 | * ----------------------------------------------------------------------- * |
| 4 | - * copyright (C) 2013 by Michael Mayer * | |
| 4 | + * copyright (C) 2013-2014 by Michael Mayer * | |
| 5 | 5 | * ----------------------------------------------------------------------- * |
| 6 | 6 | * * |
| 7 | 7 | * This program is free software: you can redistribute it and/or modify * | ... | ... |
inst/cta/src/GCTAPsf2D.cpp
| ... | ... | @@ -268,6 +268,7 @@ GCTAPsf2D* GCTAPsf2D::clone(void) const |
| 268 | 268 | return new GCTAPsf2D(*this); |
| 269 | 269 | } |
| 270 | 270 | |
| 271 | + | |
| 271 | 272 | /***********************************************************************//** |
| 272 | 273 | * @brief Read PSF from FITS file |
| 273 | 274 | * |
| ... | ... | @@ -305,7 +306,21 @@ void GCTAPsf2D::read(const GFits& fits) |
| 305 | 306 | } |
| 306 | 307 | |
| 307 | 308 | |
| 309 | +/***********************************************************************//** | |
| 310 | + * @brief Write CTA PSF table into FITS binary table object. | |
| 311 | + * | |
| 312 | + * @param[in] hdu FITS binary table. | |
| 313 | + * | |
| 314 | + * @todo Add necessary keywords. | |
| 315 | + ***************************************************************************/ | |
| 316 | +void GCTAPsf2D::write(GFitsBinTable& hdu) const | |
| 317 | +{ | |
| 318 | + // Write background table | |
| 319 | + m_psf.write(hdu); | |
| 308 | 320 | |
| 321 | + // Return | |
| 322 | + return; | |
| 323 | +} | |
| 309 | 324 | |
| 310 | 325 | |
| 311 | 326 | /***********************************************************************//** |
| ... | ... | @@ -337,21 +352,6 @@ void GCTAPsf2D::load(const std::string& filename) |
| 337 | 352 | return; |
| 338 | 353 | } |
| 339 | 354 | |
| 340 | -/***********************************************************************//** | |
| 341 | - * @brief Write CTA PSF table into FITS binary table object. | |
| 342 | - * | |
| 343 | - * @param[in] hdu FITS binary table. | |
| 344 | - * | |
| 345 | - * @todo Add necessary keywords. | |
| 346 | - ***************************************************************************/ | |
| 347 | -void GCTAPsf2D::write(GFitsBinTable& hdu) const | |
| 348 | -{ | |
| 349 | - // Write background table | |
| 350 | - m_psf.write(hdu); | |
| 351 | - | |
| 352 | - // Return | |
| 353 | - return; | |
| 354 | -} | |
| 355 | 355 | |
| 356 | 356 | /***********************************************************************//** |
| 357 | 357 | * @brief Save PSF table into FITS file | ... | ... |
inst/cta/src/GCTAPsfKing.cpp
| ... | ... | @@ -271,35 +271,6 @@ GCTAPsfKing* GCTAPsfKing::clone(void) const |
| 271 | 271 | |
| 272 | 272 | |
| 273 | 273 | /***********************************************************************//** |
| 274 | - * @brief Load point spread function from binary table | |
| 275 | - * | |
| 276 | - * @param[in] filename Performance table file name. | |
| 277 | - * | |
| 278 | - * @exception GCTAExceptionHandler::file_open_error | |
| 279 | - * File could not be opened for read access. | |
| 280 | - * | |
| 281 | - * This method loads the point spread function information from a PSF | |
| 282 | - * response table. | |
| 283 | - ***************************************************************************/ | |
| 284 | -void GCTAPsfKing::load(const std::string& filename) | |
| 285 | -{ | |
| 286 | - // Open PSF FITS file | |
| 287 | - GFits file(filename); | |
| 288 | - | |
| 289 | - // Read fits file | |
| 290 | - read(file); | |
| 291 | - | |
| 292 | - // Close PSF FITS file | |
| 293 | - file.close(); | |
| 294 | - | |
| 295 | - // Store filename | |
| 296 | - m_filename = filename; | |
| 297 | - | |
| 298 | - // Return | |
| 299 | - return; | |
| 300 | -} | |
| 301 | - | |
| 302 | -/***********************************************************************//** | |
| 303 | 274 | * @brief Read PSF from FITS file |
| 304 | 275 | * |
| 305 | 276 | * @param[in] fits FITS file pointer. |
| ... | ... | @@ -333,6 +304,7 @@ void GCTAPsfKing::read(const GFits& fits) |
| 333 | 304 | return; |
| 334 | 305 | } |
| 335 | 306 | |
| 307 | + | |
| 336 | 308 | /***********************************************************************//** |
| 337 | 309 | * @brief Write CTA PSF table into FITS binary table object. |
| 338 | 310 | * |
| ... | ... | @@ -349,6 +321,36 @@ void GCTAPsfKing::write(GFitsBinTable& hdu) const |
| 349 | 321 | return; |
| 350 | 322 | } |
| 351 | 323 | |
| 324 | + | |
| 325 | +/***********************************************************************//** | |
| 326 | + * @brief Load point spread function from binary table | |
| 327 | + * | |
| 328 | + * @param[in] filename Performance table file name. | |
| 329 | + * | |
| 330 | + * @exception GCTAExceptionHandler::file_open_error | |
| 331 | + * File could not be opened for read access. | |
| 332 | + * | |
| 333 | + * This method loads the point spread function information from a PSF | |
| 334 | + * response table. | |
| 335 | + ***************************************************************************/ | |
| 336 | +void GCTAPsfKing::load(const std::string& filename) | |
| 337 | +{ | |
| 338 | + // Open PSF FITS file | |
| 339 | + GFits file(filename); | |
| 340 | + | |
| 341 | + // Read fits file | |
| 342 | + read(file); | |
| 343 | + | |
| 344 | + // Close PSF FITS file | |
| 345 | + file.close(); | |
| 346 | + | |
| 347 | + // Store filename | |
| 348 | + m_filename = filename; | |
| 349 | + | |
| 350 | + // Return | |
| 351 | + return; | |
| 352 | +} | |
| 353 | + | |
| 352 | 354 | /***********************************************************************//** |
| 353 | 355 | * @brief Save PSF table into FITS file |
| 354 | 356 | * |
| ... | ... | @@ -376,9 +378,6 @@ void GCTAPsfKing::save(const std::string& filename, const bool& clobber) const |
| 376 | 378 | } |
| 377 | 379 | |
| 378 | 380 | |
| 379 | - | |
| 380 | - | |
| 381 | - | |
| 382 | 381 | /***********************************************************************//** |
| 383 | 382 | * @brief Simulate PSF offset (radians) |
| 384 | 383 | * | ... | ... |