Commit 9bf0d2f7b3bae2fcf4af87c387500cf49de7ceea
1 parent
a3ed1fd1
Correct bug in CTA King point spread function
Showing
1 changed file
with
6 additions
and
6 deletions
inst/cta/src/GCTAPsfKing.cpp
| ... | ... | @@ -195,18 +195,18 @@ double GCTAPsfKing::operator()(const double& delta, |
| 195 | 195 | const double& azimuth, |
| 196 | 196 | const bool& etrue) const |
| 197 | 197 | { |
| 198 | - #if defined(G_SMOOTH_PSF) | |
| 199 | - // Set ramp down radius | |
| 200 | - static const double ramp_down = 0.95 * m_par_rmax; | |
| 201 | - static const double norm_down = 1.0 / (m_par_rmax - ramp_down); | |
| 202 | - #endif | |
| 203 | - | |
| 204 | 198 | // Initialise PSF value |
| 205 | 199 | double psf = 0.0; |
| 206 | 200 | |
| 207 | 201 | // Update the parameter cache |
| 208 | 202 | update(logE, theta); |
| 209 | 203 | |
| 204 | + #if defined(G_SMOOTH_PSF) | |
| 205 | + // Set ramp down radius | |
| 206 | + double ramp_down = 0.95 * m_par_rmax; | |
| 207 | + double norm_down = 1.0 / (m_par_rmax - ramp_down); | |
| 208 | + #endif | |
| 209 | + | |
| 210 | 210 | // Continue only if delta is smaller than PSF radius |
| 211 | 211 | if (delta <= m_par_rmax) { |
| 212 | 212 | ... | ... |