Commit 6bea7ad82b2c6734e1d7205a6650e16e26b0923a
1 parent
71062026
added more output
Showing
3 changed files
with
26 additions
and
12 deletions
inst/cta/src/GCTACubePsf.cpp
| ... | ... | @@ -845,7 +845,18 @@ void GCTACubePsf::fill_cube(const GCTAObservation& obs, |
| 845 | 845 | int imap = offset(idelta, iebin); |
| 846 | 846 | |
| 847 | 847 | // supress output |
| 848 | - //std::cout.setstate(std::ios_base::failbit); | |
| 848 | + std::cout.setstate(std::ios_base::failbit); | |
| 849 | + | |
| 850 | + if( (iebin == m_energies.size()-2 || iebin == m_energies.size()-3) && idelta == 0){ | |
| 851 | + if(pixel > 1521 && pixel < 1525){ | |
| 852 | + std::cout.clear(); | |
| 853 | + //std::cout << "delta = " << delta * gammalib::rad2deg << std::endl; | |
| 854 | + //std::cout << "theta = " << theta * gammalib::rad2deg << std::endl; | |
| 855 | + //std::cout << "psf value " << rsp->psf(delta, theta, 0.0, 0.0, 0.0, logE) <<" pixel " << pixel << std::endl; | |
| 856 | + //std::cout << "--------------------------" << std::endl; | |
| 857 | + //std::cout.setstate(std::ios_base::failbit); | |
| 858 | + } | |
| 859 | + } | |
| 849 | 860 | |
| 850 | 861 | // Add on PSF cube |
| 851 | 862 | m_cube(pixel, imap) += |
| ... | ... | @@ -853,16 +864,7 @@ void GCTACubePsf::fill_cube(const GCTAObservation& obs, |
| 853 | 864 | std::cout << "energy bin " << iebin << " of " << m_energies.size() << std::endl; |
| 854 | 865 | std::cout << "psf value " << rsp->psf(delta, theta, 0.0, 0.0, 0.0, logE) <<" pixel " << pixel << std::endl; |
| 855 | 866 | |
| 856 | - if( (iebin == m_energies.size()-2 || iebin == m_energies.size()-3) && idelta == 0){ | |
| 857 | - if(pixel > 1521 && pixel < 1525){ | |
| 858 | - //std::cout.clear(); | |
| 859 | - //std::cout << "delta = " << delta * gammalib::rad2deg << std::endl; | |
| 860 | - //std::cout << "theta = " << theta * gammalib::rad2deg << std::endl; | |
| 861 | - //std::cout << "psf value " << rsp->psf(delta, theta, 0.0, 0.0, 0.0, logE) <<" pixel " << pixel << std::endl; | |
| 862 | - //std::cout << "--------------------------" << std::endl; | |
| 863 | - //std::cout.setstate(std::ios_base::failbit); | |
| 864 | - } | |
| 865 | - } | |
| 867 | + | |
| 866 | 868 | //std::cout << "Energy: " << iebin << " == " << m_energies.size()-1 << std::endl; |
| 867 | 869 | } // endfor: looped over delta bins |
| 868 | 870 | ... | ... |
inst/cta/src/GCTAResponseTable.cpp
| ... | ... | @@ -288,6 +288,13 @@ std::vector<double> GCTAResponseTable::operator()(const double& arg1, |
| 288 | 288 | m_wgt2 * m_tables[i][m_inx2] + |
| 289 | 289 | m_wgt3 * m_tables[i][m_inx3] + |
| 290 | 290 | m_wgt4 * m_tables[i][m_inx4]; |
| 291 | + if (i == 4) { | |
| 292 | + std::cout << "Values for entry 4:" << std::endl; | |
| 293 | + std::cout << m_wgt1 << " * " << m_tables[i][m_inx1] << std::endl; | |
| 294 | + std::cout << m_wgt2 << " * " << m_tables[i][m_inx2] << std::endl; | |
| 295 | + std::cout << m_wgt3 << " * " << m_tables[i][m_inx3] << std::endl; | |
| 296 | + std::cout << m_wgt4 << " * " << m_tables[i][m_inx4] << std::endl; | |
| 297 | + } | |
| 291 | 298 | } |
| 292 | 299 | |
| 293 | 300 | // Return result vector |
| ... | ... | @@ -1984,7 +1991,8 @@ void GCTAResponseTable::update(const double& arg1, const double& arg2) const |
| 1984 | 1991 | m_wgt2 = nodes1->wgt_left() * nodes2->wgt_right(); |
| 1985 | 1992 | m_wgt3 = nodes1->wgt_right() * nodes2->wgt_left(); |
| 1986 | 1993 | m_wgt4 = nodes1->wgt_right() * nodes2->wgt_right(); |
| 1987 | - | |
| 1994 | + std::cout << "Energy weights: " << nodes1->wgt_left() << ", " << nodes1->wgt_right() << std::endl; | |
| 1995 | + //std::cout << | |
| 1988 | 1996 | // Return |
| 1989 | 1997 | return; |
| 1990 | 1998 | } | ... | ... |
src/support/GNodeArray.cpp
| ... | ... | @@ -675,6 +675,10 @@ void GNodeArray::set_value(const double& value) const |
| 675 | 675 | m_inx_right = m_inx_left + 1; |
| 676 | 676 | |
| 677 | 677 | // Set weighting factors |
| 678 | + std::cout << "Calculating weights: (" << value << " - " << m_node[m_inx_left] << | |
| 679 | + ") / " << m_step[m_inx_left] << std::endl; | |
| 680 | + std::cout << "Last: " << m_node[nodes-1] << std::endl; | |
| 681 | + | |
| 678 | 682 | m_wgt_right = (value - m_node[m_inx_left]) / m_step[m_inx_left]; |
| 679 | 683 | m_wgt_left = 1.0 - m_wgt_right; |
| 680 | 684 | ... | ... |