Commit cc6116bdc11045c7a2de7df8feaa1cbd37e0157a
1 parent
b5029daa
added basic test to check that containment radius is > 0.0 and < 1e6
Showing
1 changed file
with
7 additions
and
0 deletions
inst/cta/test/test_CTA.cpp
| ... | ... | @@ -390,6 +390,12 @@ void TestGCTAResponse::test_response_psf(void) |
| 390 | 390 | gammalib::deg2rad; |
| 391 | 391 | } |
| 392 | 392 | test_value(sum, 1.0, 0.001, "PSF integration for "+eng.print()); |
| 393 | + | |
| 394 | + // test containment radii | |
| 395 | + for ( double f = 0.01 ; f < 1.0 ; f += 0.07 ) { | |
| 396 | + double radius = rsp.psf()->containment_radius( f, eng.log10TeV() ) ; | |
| 397 | + test_assert( radius>0.0 && radius < 1e6 , "PSF containment radius for fraction="+gammalib::str(f) ) ; | |
| 398 | + } | |
| 393 | 399 | } |
| 394 | 400 | |
| 395 | 401 | // Return |
| ... | ... | @@ -428,6 +434,7 @@ void TestGCTAResponse::test_response_psf_king(void) |
| 428 | 434 | gammalib::deg2rad; |
| 429 | 435 | } |
| 430 | 436 | test_value(sum, 1.0, 0.001, "PSF integration for "+eng.print()); |
| 437 | + | |
| 431 | 438 | } |
| 432 | 439 | |
| 433 | 440 | // Return | ... | ... |