Commit a6ecb3944b9d5f80a021e90ac80fa4ef56f422a7
1 parent
60616f4d
Added debug output
Showing
3 changed files
with
16 additions
and
0 deletions
inst/cta/src/GCTAPsf2D.cpp
| ... | ... | @@ -237,6 +237,10 @@ double GCTAPsf2D::operator()(const double& delta, |
| 237 | 237 | } |
| 238 | 238 | #endif |
| 239 | 239 | |
| 240 | + //std::cout << "Parameters: " << m_norm << ", " << m_width1 << ", " << | |
| 241 | + // m_width2 << ", " << m_width3 << ", " << | |
| 242 | + // m_norm2 << ", " << m_norm3 << std::endl; | |
| 243 | + | |
| 240 | 244 | } // endif: normalization was positive |
| 241 | 245 | |
| 242 | 246 | // Return PSF |
| ... | ... | @@ -794,6 +798,8 @@ void GCTAPsf2D::update(const double& logE, const double& theta) const |
| 794 | 798 | m_sigma2 = pars[m_inx_sigma2]; |
| 795 | 799 | m_sigma3 = pars[m_inx_sigma3]; |
| 796 | 800 | |
| 801 | + std::cout << "Got sigma: " << m_sigma1 << std::endl; | |
| 802 | + | |
| 797 | 803 | // Set width parameters |
| 798 | 804 | double sigma1 = m_sigma1 * m_sigma1; |
| 799 | 805 | double sigma2 = m_sigma2 * m_sigma2; | ... | ... |
inst/cta/src/GCTAPsfTable.cpp
| ... | ... | @@ -210,6 +210,7 @@ double GCTAPsfTable::operator()(const double& delta, |
| 210 | 210 | |
| 211 | 211 | // Compute point spread function by trilinear interpolation |
| 212 | 212 | psf = m_psf(m_inx_rpsf, arg[0], arg[1], arg[2]); |
| 213 | + std::cout << "PSF value: " << psf << std::endl; | |
| 213 | 214 | |
| 214 | 215 | // Constrain PSF value to non-negative values |
| 215 | 216 | if (psf < 0.0) { |
| ... | ... | @@ -739,6 +740,8 @@ void GCTAPsfTable::precompute(void) |
| 739 | 740 | double width = (m_psf.axis_hi(m_inx_delta, idelta) - |
| 740 | 741 | m_psf.axis_lo(m_inx_delta, idelta)) * |
| 741 | 742 | gammalib::deg2rad; |
| 743 | + std::cout << "High: " << m_psf.axis_hi(m_inx_delta, idelta) << | |
| 744 | + " Low: " << m_psf.axis_lo(m_inx_delta, idelta) << std::endl; | |
| 742 | 745 | |
| 743 | 746 | // Integrate PSF |
| 744 | 747 | sum += m_psf(m_inx_rpsf, inx) * std::sin(delta) * width * | ... | ... |
inst/cta/src/GCTAResponseTable.cpp
| ... | ... | @@ -821,6 +821,7 @@ void GCTAResponseTable::scale(const int& table, const double& scale) |
| 821 | 821 | |
| 822 | 822 | // Scale table values |
| 823 | 823 | for (int i = 0; i < m_nelements; ++i) { |
| 824 | + //std::cout << m_tables[table][i] << " -> " << m_tables[table][i] * scale << std::endl; | |
| 824 | 825 | m_tables[table][i] *= scale; |
| 825 | 826 | } |
| 826 | 827 | |
| ... | ... | @@ -1901,6 +1902,9 @@ void GCTAResponseTable::read_tables(const GFitsTable& hdu) |
| 1901 | 1902 | // Copy table values |
| 1902 | 1903 | for (int k = 0; k < num; ++k) { |
| 1903 | 1904 | table[k] = col->real(0,k); |
| 1905 | + if (col->name() == "RPSF") { | |
| 1906 | + std::cout << "Reading: " << col->real(0,k) << std::endl; | |
| 1907 | + } | |
| 1904 | 1908 | } |
| 1905 | 1909 | |
| 1906 | 1910 | // Push table into storage |
| ... | ... | @@ -1908,6 +1912,9 @@ void GCTAResponseTable::read_tables(const GFitsTable& hdu) |
| 1908 | 1912 | |
| 1909 | 1913 | // Push units on storage |
| 1910 | 1914 | m_units_table.push_back(col->unit()); |
| 1915 | + if (col->name() == "RPSF") { | |
| 1916 | + std::cout << "Unit: " << col->unit() << std::endl; | |
| 1917 | + } | |
| 1911 | 1918 | |
| 1912 | 1919 | } // endfor: looped over all tables |
| 1913 | 1920 | ... | ... |