Commit da41e063544b3c951c1673bb705b71851c7841aa
1 parent
c4b0b2aa
Set axis nodes in GCTAResponseTable::append_axis() method
Showing
1 changed file
with
8 additions
and
0 deletions
inst/cta/src/GCTAResponseTable.cpp
| ... | ... | @@ -1235,6 +1235,14 @@ void GCTAResponseTable::append_axis(const std::vector<double>& axis_lo, |
| 1235 | 1235 | m_units_lo.push_back(unit); |
| 1236 | 1236 | m_units_hi.push_back(unit); |
| 1237 | 1237 | |
| 1238 | + | |
| 1239 | + // Set node array | |
| 1240 | + std::vector<double> axis_nodes(axis_lo.size()); | |
| 1241 | + for (int k = 0; k < axis_lo.size(); ++k) { | |
| 1242 | + axis_nodes[k] = 0.5*(axis_lo[k] + axis_hi[k]); | |
| 1243 | + } | |
| 1244 | + m_axis_nodes.push_back(GNodeArray(axis_nodes)); | |
| 1245 | + | |
| 1238 | 1246 | // Increment number of axes |
| 1239 | 1247 | m_naxes++; |
| 1240 | 1248 | ... | ... |