185 this->GApplication::clear();
219 log_header1(TERSE,
"Generate PSF cube");
222 GLog* logger = (logNormal()) ? &log : NULL;
244 log_header1(TERSE,
"Save PSF cube");
247 if ((*
this)[
"outcube"].is_valid() && !
m_psfcube.cube().is_empty()) {
250 m_outcube = (*this)[
"outcube"].filename();
263 fname.append(
" (cube is empty, no file created)");
265 log_value(NORMAL,
"PSF cube file", fname);
338 double amax = (*this)[
"amax"].real();
339 int anumbins = (*this)[
"anumbins"].integer();
343 GCTAEventCube cube = (*this)[
"incube"].is_valid()
344 ? GCTAEventCube((*
this)[
"incube"].filename())
348 m_psfcube = GCTACubePsf(cube, amax, anumbins);
352 m_chatter =
static_cast<GChatter
>((*this)[
"chatter"].integer());
356 (*this)[
"outcube"].query();
375 log_header1(TERSE,
"Initialise PSF cube");
378 const GWcs* proj =
static_cast<const GWcs*
>(
m_psfcube.cube().projection());
379 std::string wcs =
m_psfcube.cube().projection()->code();
380 std::string coords =
m_psfcube.cube().projection()->coordsys();
381 double x = proj->crval(0);
382 double y = proj->crval(1);
383 double dx = proj->cdelt(0);
384 double dy = proj->cdelt(1);
387 double dmax = (*this)[
"amax"].real();
388 int ndbins = (*this)[
"anumbins"].integer();
391 GEnergies energies =
m_psfcube.energies();
397 for (
int i = 0; i <
m_obs.size(); ++i) {
400 const GCTAObservation* cta =
dynamic_cast<const GCTAObservation*
>
409 if (cta->eventtype() !=
"EventList") {
421 m_psfcube = GCTACubePsf(wcs, coords, x, y, dx, dy, nx, ny, energies,
ctpsfcube(void)
Void constructor.
GChatter m_chatter
Chattiness.
void process(void)
Generate the model map(s)
void get_parameters(void)
Get application parameters.
void free_members(void)
Delete class members.
void save(void)
Save PSF cube.
void init_members(void)
Initialise class members.
virtual ~ctpsfcube(void)
Destructor.
Base class for observation tools.
void free_members(void)
Delete class members.
PSF cube generation tool.
void init_members(void)
Initialise class members.
GCTACubePsf m_psfcube
PSF cube.
PSF cube generation tool definition.
void clear(void)
Clear ctpsfcube tool.
ctobservation & operator=(const ctobservation &app)
Assignment operator.
void copy_members(const ctpsfcube &app)
Copy class members.
void init_cube(void)
Initialise PSF cube.
GFilename m_outcube
Output PSF cube file name.
bool m_addbounds
Add energies at boundaries?
ctpsfcube & operator=(const ctpsfcube &app)
Assignment operator.
GObservations m_obs
Observation container.