Bug #1306

Updated by Knödlseder Jürgen over 10 years ago


It throws this error message:
RuntimeError: *** ERROR in GSkymap::GSkymap(std::string&, std::string&, double&, double&, double& double&, int&, int&, int&): Invalid map parameter (0). nmaps parameter must be >0.

because m_enumbins is not set before a skymap is constructed.

Switch the order of the following two lines in init_cube() can fix the bug. (So I don't commit my change. Please directly correct it.)

// Create skymap
m_cube = GSkymap(m_proj, m_coordsys,
xref, yref, -m_binsz, m_binsz,
m_nxpix, m_nypix, m_enumbins);

// Set energy boundaries
get_ebounds();

Back