37#define G_SET_FROM_CNTMAP "ctexpcube::set_from_cntmap(std::string&)"
186 this->GApplication::clear();
223 log_header1(TERSE,
"Generate exposure cube");
226 GLog* logger = (logNormal()) ? &log : NULL;
252 log_header1(TERSE,
"Save exposure cube");
256 if ((*
this)[
"outcube"].is_valid() && !
m_expcube.cube().is_empty()) {
259 m_outcube = (*this)[
"outcube"].filename();
272 fname.append(
" (cube is empty, no file created)");
274 log_value(NORMAL,
"Exposure cube file", fname);
289 log_header1(TERSE,
"Publish exposure cube");
292 std::string user_name(name);
293 if (user_name.empty()) {
298 log_value(NORMAL,
"Counts cube name", user_name);
378 GCTAEventCube cube = (*this)[
"incube"].is_valid()
379 ? GCTAEventCube((*
this)[
"incube"].filename())
387 m_publish = (*this)[
"publish"].boolean();
388 m_chatter =
static_cast<GChatter
>((*this)[
"chatter"].integer());
392 (*this)[
"outcube"].query();
411 log_header1(TERSE,
"Initialise exposure cube");
414 const GWcs* proj =
static_cast<const GWcs*
>(
m_expcube.cube().projection());
415 std::string wcs =
m_expcube.cube().projection()->code();
416 std::string coords =
m_expcube.cube().projection()->coordsys();
417 double x = proj->crval(0);
418 double y = proj->crval(1);
419 double dx = proj->cdelt(0);
420 double dy = proj->cdelt(1);
425 GEnergies energies =
m_expcube.energies();
431 for (
int i = 0; i <
m_obs.size(); ++i) {
434 const GCTAObservation* cta =
dynamic_cast<const GCTAObservation*
>
443 if (cta->eventtype() !=
"EventList") {
455 m_expcube = GCTACubeExposure(wcs, coords, x, y, dx, dy, nx, ny, energies);
Exposure cube generation tool.
GFilename m_outcube
Output exposure cube file.
void free_members(void)
Delete class members.
void clear(void)
Clear ctexpcube tool.
ctexpcube(void)
Void constructor.
void publish(const std::string &name="")
Publish exposure cube.
void process(void)
Generate the exposure cube(s).
ctexpcube & operator=(const ctexpcube &app)
Assignment operator.
virtual ~ctexpcube(void)
Destructor.
void save(void)
Save exposure cube.
bool m_publish
Publish exposure cube?
void copy_members(const ctexpcube &app)
Copy class members.
void init_members(void)
Initialise class members.
bool m_addbounds
Add energies at boundaries?
GCTACubeExposure m_expcube
Exposure cube.
void init_cube(void)
Initialise exposure cube.
void get_parameters(void)
Get application parameters.
GChatter m_chatter
Chattiness.
Base class for observation tools.
void free_members(void)
Delete class members.
ctobservation & operator=(const ctobservation &app)
Assignment operator.
GObservations m_obs
Observation container.
void init_members(void)
Initialise class members.
Exposure cube generation tool definition.