Commit fba08ce0e9aa10d73986c6c516ffdf873787cf6a
1 parent
223e9811
Always recompute DETX and DETY in ctmodel::fill_cube (#2694)
Showing
1 changed file
with
3 additions
and
6 deletions
src/ctmodel/ctmodel.cpp
| ... | ... | @@ -902,12 +902,9 @@ void ctmodel::fill_cube(const GCTAObservation* obs, GModels& models) |
| 902 | 902 | continue; |
| 903 | 903 | } |
| 904 | 904 | |
| 905 | - // Get instrument direction for spatial pixel. Compute DETX and DETY | |
| 906 | - // if they are not provided | |
| 907 | - GCTAInstDir dir = m_dir[i]; | |
| 908 | - if (!dir.has_detx() || !dir.has_dety()) { | |
| 909 | - dir = pnt.instdir(dir.dir()); | |
| 910 | - } | |
| 905 | + // Get instrument direction for spatial pixel and recompute DETX and | |
| 906 | + // DETY based on the pointing of the observation. | |
| 907 | + GCTAInstDir dir = pnt.instdir(m_dir[i].dir()); | |
| 911 | 908 | |
| 912 | 909 | // Set instrument direction, solid angle and pixel index of bin |
| 913 | 910 | bin.dir(dir); | ... | ... |