diff --git a/.gitignore b/.gitignore index 83fc7cc..6608ac2 100644 --- a/.gitignore +++ b/.gitignore @@ -59,6 +59,7 @@ src/ctselect/ctselect src/ctskymap/ctskymap src/ctexpcube/ctexpcube src/ctpsfcube/ctpsfcube +src/ctedispcube/ctedispcube src/ctbkgcube/ctbkgcube src/ctcubemask/ctcubemask src/ctbutterfly/ctbutterfly diff --git a/cscripts/cslightcrv.py b/cscripts/cslightcrv.py index c73178d..3a8aa95 100755 --- a/cscripts/cslightcrv.py +++ b/cscripts/cslightcrv.py @@ -40,7 +40,7 @@ class cslightcrv(ctools.cscript): # Set name self.name = "cslightcrv" - self.version = "1.0.0" + self.version = "1.1.0" # Initialise some members self.obs = None @@ -435,7 +435,7 @@ class cslightcrv(ctools.cscript): # Header if self.logTerse(): - self.log.header3("Creating PSF cube") + self.log.header3("Creating point spread function cube") # Create psf cube psfcube = ctools.ctpsfcube(select.obs()) @@ -454,6 +454,30 @@ class cslightcrv(ctools.cscript): psfcube["proj"] = self.m_proj psfcube.run() + # Check if we need to include energy dispersion + if self.m_edisp: + + # Header + if self.logTerse(): + self.log.header3("Creating energy dispersion cube") + + # Create edisp cube + edispcube = ctools.ctedispcube(select.obs()) + edispcube["incube"] = "NONE" + edispcube["usepnt"] = False + edispcube["ebinalg"] = "LOG" + edispcube["xref"] = self.m_xref + edispcube["yref"] = self.m_yref + edispcube["binsz"] = self.m_binsz + edispcube["nxpix"] = self.m_nxpix + edispcube["nypix"] = self.m_nypix + edispcube["enumbins"] = self.m_ebins + edispcube["emin"] = self.m_emin + edispcube["emax"] = self.m_emax + edispcube["coordsys"] = self.m_coordsys + edispcube["proj"] = self.m_proj + edispcube.run() + # Header if self.logTerse(): self.log.header3("Creating background cube") @@ -482,30 +506,12 @@ class cslightcrv(ctools.cscript): models = bkgcube.models() # Set precomputed binned response - obs[0].response(expcube.expcube(), psfcube.psfcube(), bkgcube.bkgcube()) - - # Check if we need to include energy dispersion if self.m_edisp: - - # Create edisp cube - edispcube = ctools.ctedispcube(select.obs()) - edispcube["incube"] = "NONE" - edispcube["usepnt"] = False - edispcube["ebinalg"] = "LOG" - edispcube["xref"] = self.m_xref - edispcube["yref"] = self.m_yref - edispcube["binsz"] = self.m_binsz - edispcube["nxpix"] = self.m_nxpix - edispcube["nypix"] = self.m_nypix - edispcube["enumbins"] = self.m_ebins - edispcube["emin"] = self.m_emin - edispcube["emax"] = self.m_emax - edispcube["coordsys"] = self.m_coordsys - edispcube["proj"] = self.m_proj - edispcube.run() - - # Set precomputed binned response including energy dispersion - obs[0].response(expcube.expcube(), psfcube.psfcube(), edispcube.edispcube(), bkgcube.bkgcube()) + obs[0].response(expcube.expcube(), psfcube.psfcube(), + edispcube.edispcube(), bkgcube.bkgcube()) + else: + obs[0].response(expcube.expcube(), psfcube.psfcube(), + bkgcube.bkgcube()) # Fix background models if required if self.m_fix_bkg: diff --git a/cscripts/cspull.py b/cscripts/cspull.py index 9ab0d89..32fac3b 100755 --- a/cscripts/cspull.py +++ b/cscripts/cspull.py @@ -247,10 +247,13 @@ class cspull(ctools.cscript): psfcube["proj"] = self.m_proj psfcube.run() + # Notify Psf computation + if self.logTerse(): + self.log("Computed Psf cube\n") + + # Optionally get stacked Edisp if self.m_edisp: - - # Get stacked Edisp - edispcube = ctools.ctpsfcube(self.obs) + edispcube = ctools.edispcube(self.obs) edispcube["incube"] = "NONE" edispcube["usepnt"] = True edispcube["ebinalg"] = "LOG" @@ -263,17 +266,13 @@ class cspull(ctools.cscript): edispcube["coordsys"] = self.m_coordsys edispcube["proj"] = self.m_proj edispcube.run() - + # Store result self.m_edispcube = edispcube.edispcube().copy() # Logging if self.logTerse(): - self.log("Computed Edisp cube\n") - - # Notify Psf computation - if self.logTerse(): - self.log("Computed Psf cube\n") + self.log("Computed energy dispersion cube\n") # Get stacked background bkgcube = ctools.ctbkgcube(self.obs) @@ -350,7 +349,6 @@ class cspull(ctools.cscript): for n in result['colnames']: headers[n] = n writer.writerow(headers) - #writer.writerow(dict((_,_) for _ in result['colnames'])) else: file = open(self.m_outfile.url(), 'a') writer = csv.DictWriter(file, result['colnames']) @@ -417,9 +415,11 @@ class cspull(ctools.cscript): # If stacked, add stacked responses and model if self.obs.size() > 1 and self.m_enumbins > 0: if self.m_edisp: - obs[0].response(self.m_exposure, self.m_psfcube, self.m_edispcube, self.m_bckcube) + obs[0].response(self.m_exposure, self.m_psfcube, + self.m_edispcube, self.m_bckcube) else: - obs[0].response(self.m_exposure, self.m_psfcube, self.m_bckcube) + obs[0].response(self.m_exposure, self.m_psfcube, + self.m_bckcube) obs.models(self.m_stackmodels) # Determine number of events in simulation diff --git a/cscripts/csresmap.py b/cscripts/csresmap.py index a0bbfa9..e1fab98 100755 --- a/cscripts/csresmap.py +++ b/cscripts/csresmap.py @@ -175,7 +175,6 @@ class csresmap(ctools.cscript): # Skip ctbin step later on self.m_skip_binning = True - # Set models if we have none if self.obs.models().size() == 0: self.obs.models(self["inmodel"].filename()) @@ -372,7 +371,6 @@ class csresmap(ctools.cscript): # Get model map into GSkyMap object modelmap = model.cube().map().copy() - # Store counts map as residual map. Note that we need a # special construct here to avoid memory leaks. This seems # to be a SWIG feature as SWIG creates a new object when diff --git a/cscripts/csspec.py b/cscripts/csspec.py index 9ac040d..89a4f49 100755 --- a/cscripts/csspec.py +++ b/cscripts/csspec.py @@ -2,7 +2,7 @@ # ========================================================================== # Spectral points generation script. # -# Copyright (C) 2014-2015 Michael Mayer +# Copyright (C) 2014-2016 Michael Mayer # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -40,7 +40,7 @@ class csspec(ctools.cscript): # Set name self.name = "csspec" - self.version = "1.0.0" + self.version = "1.1.0" # Initialise some members self.obs = gammalib.GObservations() diff --git a/cscripts/cstsdist.py b/cscripts/cstsdist.py index cb6530e..952ff44 100755 --- a/cscripts/cstsdist.py +++ b/cscripts/cstsdist.py @@ -42,7 +42,7 @@ class cstsdist(ctools.cscript): """ # Set name self.name = "cstsdist" - self.version = "1.0.0" + self.version = "1.1.0" # Initialise some members self.obs = None diff --git a/src/ctbutterfly/ctbutterfly.par b/src/ctbutterfly/ctbutterfly.par index 00bd4b5..d6ecad8 100644 --- a/src/ctbutterfly/ctbutterfly.par +++ b/src/ctbutterfly/ctbutterfly.par @@ -5,7 +5,7 @@ # ------------------------------------------------------------------------- # # # # File: ctbutterfly # -# Version: 1.0.0 # +# Version: 1.1.0 # # # # Author: Michael Mayer # # michael.mayer@physik.hu-berlin.de # diff --git a/src/ctedispcube/ctedispcube.cpp b/src/ctedispcube/ctedispcube.cpp index 5a864b3..3bc2c8c 100644 --- a/src/ctedispcube/ctedispcube.cpp +++ b/src/ctedispcube/ctedispcube.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * ctedispcube - EDISP cube generation tool * + * ctedispcube - Energy dispersion cube generation tool * * ----------------------------------------------------------------------- * * copyright (C) 2016 by Maria Haupt * * ----------------------------------------------------------------------- * @@ -20,7 +20,7 @@ ***************************************************************************/ /** * @file ctedispcube.cpp - * @brief EDISP cube generation tool implementation + * @brief Energy dispersion cube generation tool implementation * @author Maria Haupt */ @@ -34,7 +34,7 @@ #include "GWcs.hpp" /* __ Method name definitions ____________________________________________ */ -#define G_GET_PARAMETERS "ctedispcube::get_parameters()" +#define G_GET_PARAMETERS "ctedispcube::get_parameters()" /* __ Debug definitions __________________________________________________ */ @@ -49,6 +49,8 @@ /***********************************************************************//** * @brief Void constructor + * + * Constructs an empty energy dispersion tool. ***************************************************************************/ ctedispcube::ctedispcube(void) : ctool(CTEDISPCUBE_NAME, CTEDISPCUBE_VERSION) { @@ -65,11 +67,11 @@ ctedispcube::ctedispcube(void) : ctool(CTEDISPCUBE_NAME, CTEDISPCUBE_VERSION) * * @param[in] obs Observation container. * - * This method creates an instance of the class by copying an existing - * observations container. + * Constructs an energy dispersion tool from the information that is provided + * in an observation container @p obs. ***************************************************************************/ ctedispcube::ctedispcube(const GObservations& obs) : - ctool(CTEDISPCUBE_NAME, CTEDISPCUBE_VERSION) + ctool(CTEDISPCUBE_NAME, CTEDISPCUBE_VERSION) { // Initialise members init_members(); @@ -88,9 +90,12 @@ ctedispcube::ctedispcube(const GObservations& obs) : * * @param[in] argc Number of arguments in command line. * @param[in] argv Array of command line arguments. + * + * Constructs an energy dispersion tool by parsing the arguments provided + * on the command line. ***************************************************************************/ ctedispcube::ctedispcube(int argc, char *argv[]) : - ctool(CTEDISPCUBE_NAME, CTEDISPCUBE_VERSION, argc, argv) + ctool(CTEDISPCUBE_NAME, CTEDISPCUBE_VERSION, argc, argv) { // Initialise members init_members(); @@ -103,7 +108,10 @@ ctedispcube::ctedispcube(int argc, char *argv[]) : /***********************************************************************//** * @brief Copy constructor * - * @param[in] app Application. + * @param[in] app Energy dispersion tool. + * + * Constructs an energy dispersion tool by copying anothere energy + * dispersion tool. ***************************************************************************/ ctedispcube::ctedispcube(const ctedispcube& app) : ctool(app) { @@ -120,6 +128,8 @@ ctedispcube::ctedispcube(const ctedispcube& app) : ctool(app) /***********************************************************************//** * @brief Destructor + * + * Desctructs an energy dispersion tool. ***************************************************************************/ ctedispcube::~ctedispcube(void) { @@ -140,8 +150,10 @@ ctedispcube::~ctedispcube(void) /***********************************************************************//** * @brief Assignment operator * - * @param[in] app Application. - * @return Application. + * @param[in] app Energy dispersion tool. + * @return Energy dispersion tool. + * + * Assigns energy dispersion tool. ***************************************************************************/ ctedispcube& ctedispcube::operator=(const ctedispcube& app) { @@ -174,7 +186,9 @@ ctedispcube& ctedispcube::operator=(const ctedispcube& app) ==========================================================================*/ /***********************************************************************//** - * @brief Clear instance + * @brief Clear energy dispersion tool + * + * Set the energy disperison tool to an empty tool. ***************************************************************************/ void ctedispcube::clear(void) { @@ -194,11 +208,10 @@ void ctedispcube::clear(void) /***********************************************************************//** - * @brief Generate the model map(s) + * @brief Generate the energy dispersion cube * - * This method reads the task parameters from the parfile, sets up the - * observation container, loops over all CTA observations in the container - * and generates an EDISP cube from the CTA observations. + * Generates the energy dispersion cube by looping over all unbinned CTA + * observations in the observation container. ***************************************************************************/ void ctedispcube::run(void) { @@ -231,7 +244,7 @@ void ctedispcube::run(void) // Write header if (logTerse()) { log << std::endl; - log.header1("Generate EDISP cube"); + log.header1("Generate energy dispersion cube"); } // Fill Edisp @@ -243,7 +256,10 @@ void ctedispcube::run(void) /***********************************************************************//** - * @brief Save Edisp cube + * @brief Save energy dispersion cube + * + * Saves the energy dispersion cube in a FITS file. The FITS filename is + * provided by the "outcube" parameter. ***************************************************************************/ void ctedispcube::save(void) { @@ -261,11 +277,11 @@ void ctedispcube::save(void) // Log filename if (logTerse()) { - log << "Save Edisp cube into file \""+m_outcube+"\"."; + log << "Save energy dispersion cube into file \""+m_outcube+"\"."; log << std::endl; } - // Save EDISP cube + // Save energy dispersion cube m_edispcube.save(m_outcube, clobber()); } @@ -288,8 +304,6 @@ void ctedispcube::init_members(void) { // Initialise members m_outcube.clear(); - - // Initialise protected members m_obs.clear(); m_edispcube.clear(); @@ -301,16 +315,14 @@ void ctedispcube::init_members(void) /***********************************************************************//** * @brief Copy class members * - * @param[in] app Application. + * @param[in] app Energy dispersion cube. ***************************************************************************/ void ctedispcube::copy_members(const ctedispcube& app) { - // Copy attributes - m_outcube = app.m_outcube; - - // Copy protected members - m_obs = app.m_obs; - m_edispcube = app.m_edispcube; + // Copy members + m_outcube = app.m_outcube; + m_obs = app.m_obs; + m_edispcube = app.m_edispcube; // Return return; @@ -354,7 +366,7 @@ void ctedispcube::get_parameters(void) std::string incube = (*this)["incube"].filename(); // Get additional binning parameters - double mmax = (*this)["mmax"].real(); + double migramax = (*this)["migramax"].real(); int migrabins = (*this)["migrabins"].integer(); // Check for filename validity @@ -364,7 +376,7 @@ void ctedispcube::get_parameters(void) GCTAEventCube cube = create_cube(m_obs); // Define edisp cube - m_edispcube = GCTACubeEdisp(cube, mmax, migrabins); + m_edispcube = GCTACubeEdisp(cube, migramax, migrabins); } @@ -375,7 +387,7 @@ void ctedispcube::get_parameters(void) GCTAEventCube cube(incube); // Define Edisp cube - m_edispcube = GCTACubeEdisp(cube, mmax, migrabins); + m_edispcube = GCTACubeEdisp(cube, migramax, migrabins); } // endelse: cube loaded from file diff --git a/src/ctedispcube/ctedispcube.hpp b/src/ctedispcube/ctedispcube.hpp index 6a3138b..62f206f 100644 --- a/src/ctedispcube/ctedispcube.hpp +++ b/src/ctedispcube/ctedispcube.hpp @@ -1,7 +1,7 @@ /*************************************************************************** - * ctedispcube - EDISP cube generation tool * + * ctedispcube - Energy dispersion cube generation tool * * ----------------------------------------------------------------------- * - * copyright (C) 2014-2016 by Chia-Chun Lu * + * copyright (C) 2016 by Maria Haupt * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -20,7 +20,7 @@ ***************************************************************************/ /** * @file ctedispcube.hpp - * @brief EDISP cube generation tool definition + * @brief Energy dispersion cube generation tool definition * @author Chia-Chun Lu */ @@ -40,7 +40,7 @@ /***********************************************************************//** * @class ctedispcube * - * @brief EDISP cube generation tool + * @brief Energy dispersion cube generation tool ***************************************************************************/ class ctedispcube : public ctool { @@ -56,9 +56,9 @@ public: ctedispcube& operator=(const ctedispcube& app); // Methods - void clear(void); - void run(void); - void save(void); + void clear(void); + void run(void); + void save(void); const GCTACubeEdisp& edispcube(void) const; protected: @@ -69,18 +69,18 @@ protected: void get_parameters(void); // User parameters - GFilename m_outcube; //!< Output Edisp cube file name + GFilename m_outcube; //!< Output energy dispersion cube file name // Protected members - GObservations m_obs; //!< Observation container - GCTACubeEdisp m_edispcube; //!< Edisp cube + GObservations m_obs; //!< Observation container + GCTACubeEdisp m_edispcube; //!< Energy dispersion cube }; /***********************************************************************//** - * @brief Return EDISP cube + * @brief Return energy dispersion cube * - * @return EDISP cube + * @return Energy dispersion cube ***************************************************************************/ inline const GCTACubeEdisp& ctedispcube::edispcube(void) const diff --git a/src/ctedispcube/ctedispcube.par b/src/ctedispcube/ctedispcube.par index efd5cb3..246bb03 100644 --- a/src/ctedispcube/ctedispcube.par +++ b/src/ctedispcube/ctedispcube.par @@ -18,10 +18,10 @@ # Observational parameters #=================== inobs, f, a, "NONE",,, "Input event list or observation definition XML file" -incube, f, a, "NONE",,, "Input counts cube file to extract PSF cube definition" +incube, f, a, "NONE",,, "Input counts cube file to extract energy dispersion cube definition" caldb, s, a, "prod2",,, "Calibration database" irf, s, a, "South_0.5h",,, "Instrument response function" -outcube, f, a, "edispcube.fits",,, "Output PSF cube file" +outcube, f, a, "edispcube.fits",,, "Output energy dispersion cube file" # # Energy binning parameters @@ -47,7 +47,7 @@ proj, s, a, "CAR", AIT|AZP|CAR|MER|MOL|STG|TAN,, "Projection method" # # Angular separation binning parameters #====================================== -mmax, r, h, 10.0,,, "Upper bound of fraction between recontructed and true photon energy" +migramax, r, h, 2.0,,, "Upper bound of ratio of recontructed to true photon energy" migrabins, i, h, 100,,, "Number of migration bins" # diff --git a/src/ctedispcube/main.cpp b/src/ctedispcube/main.cpp index 9304f2c..0a11700 100644 --- a/src/ctedispcube/main.cpp +++ b/src/ctedispcube/main.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * ctedispcube - CTA EDISP cube tool * + * ctedispcube - Energy dispersion cube generation tool * * ----------------------------------------------------------------------- * * copyright (C) 2016 by Maria Haupt * * ----------------------------------------------------------------------- * @@ -20,7 +20,7 @@ ***************************************************************************/ /** * @file ctedispcube/main.cpp - * @brief CTA EDISP cube tool main code + * @brief Energy dispersion cube tool main code * @author Maria Haupt */ diff --git a/src/cterror/cterror.par b/src/cterror/cterror.par index 553932a..86563ae 100644 --- a/src/cterror/cterror.par +++ b/src/cterror/cterror.par @@ -6,7 +6,7 @@ # ------------------------------------------------------------------------- # # # # File: cterror.par # -# Version: 1.0.0 # +# Version: 1.1.0 # # # # Author: Florent Forest # # florent.forest@isae.fr # diff --git a/src/ctlike/ctlike.par b/src/ctlike/ctlike.par index 3e4bad5..83da110 100644 --- a/src/ctlike/ctlike.par +++ b/src/ctlike/ctlike.par @@ -5,7 +5,7 @@ # ------------------------------------------------------------------------- # # # # File: ctlike.par # -# Version: 1.0.0 # +# Version: 1.1.0 # # # # Author: Jurgen Knodlseder # # Jurgen.Knodlseder@irap.omp.eu # diff --git a/src/ctulimit/ctulimit.par b/src/ctulimit/ctulimit.par index cd9dad9..dff2582 100644 --- a/src/ctulimit/ctulimit.par +++ b/src/ctulimit/ctulimit.par @@ -5,7 +5,7 @@ # ------------------------------------------------------------------------- # # # # File: ctulimit.par # -# Version: 01-00-00 # +# Version: 1.1.0 # # # # Author: Michael Mayer # # michael.mayer@physik.hu-berlin.de # diff --git a/src/support/ctool.cpp b/src/support/ctool.cpp index 75876f8..5cc444d 100644 --- a/src/support/ctool.cpp +++ b/src/support/ctool.cpp @@ -862,16 +862,18 @@ void ctool::set_obs_response(GCTAObservation* obs) // If the observation contains a counts cube, then first check whether // the expcube and psfcube parameters exist and are not NONE if (dynamic_cast(obs->events()) != NULL) { - if (has_par("expcube") && has_par("psfcube") && has_par("bkgcube") && has_par("edispcube")) { + if (has_par("expcube") && has_par("psfcube") && + has_par("edispcube") && has_par("bkgcube")) { // Get filenames - std::string expcube = (*this)["expcube"].filename(); - std::string psfcube = (*this)["psfcube"].filename(); + std::string expcube = (*this)["expcube"].filename(); + std::string psfcube = (*this)["psfcube"].filename(); std::string edispcube = (*this)["edispcube"].filename(); - std::string bkgcube = (*this)["bkgcube"].filename(); + std::string bkgcube = (*this)["bkgcube"].filename(); // Extract response information if available - if ((expcube != "NONE") && (psfcube != "NONE") && (bkgcube != "NONE") && + if ((expcube != "NONE") && (psfcube != "NONE") && + (bkgcube != "NONE") && (gammalib::strip_whitespace(expcube) != "") && (gammalib::strip_whitespace(psfcube) != "") && (gammalib::strip_whitespace(bkgcube) != "")) { @@ -881,8 +883,9 @@ void ctool::set_obs_response(GCTAObservation* obs) GCTACubePsf psf(psfcube); GCTACubeBackground background(bkgcube); - // Optionally load Edisp cube - if (edispcube != "NONE" && (gammalib::strip_whitespace(edispcube) != "")) { + // Optionally load energy dispersion cube + if ((edispcube != "NONE") && + (gammalib::strip_whitespace(edispcube) != "")) { GCTACubeEdisp edisp(edispcube); obs->response(exposure, psf, edisp, background); } @@ -912,8 +915,9 @@ void ctool::set_obs_response(GCTAObservation* obs) // to the observation definition XML file, in case an observation // definition XML file is written. std::string parameter = "parameter name=\"Calibration\"" - " database=\""+database+"\"" - " response=\""+irf+"\""; + " database=\""+database+"\"" + " response=\""+irf+"\""; + GXmlElement xml; xml.append(parameter); @@ -923,22 +927,6 @@ void ctool::set_obs_response(GCTAObservation* obs) // Attach response to observation obs->response(response); - // Set calibration database. If "database" is a valid directory then use - // this as the pathname to the calibration database. Otherwise, interpret - // "database" as the instrument name, the mission being "cta" - /* - GCaldb caldb; - if (gammalib::dir_exists(database)) { - caldb.rootdir(database); - } - else { - caldb.open("cta", database); - } - */ - - // Set reponse - //obs->response(irf, caldb); - // Signal response availability has_response = true; @@ -975,11 +963,13 @@ void ctool::set_obs_bounds(GObservations& obs) // parameters and add them if (list->ebounds().is_empty()) { - // If there are "emin" and "emax" parameters then use them + // If there are "emin" and "emax" parameters then use + // them if (has_par("emin") && has_par("emax")) { double emin = (*this)["emin"].real(); double emax = (*this)["emax"].real(); - GEbounds ebounds(GEnergy(emin, "TeV"), GEnergy(emax, "TeV")); + GEbounds ebounds(GEnergy(emin, "TeV"), + GEnergy(emax, "TeV")); list->ebounds(ebounds); } @@ -1004,7 +994,6 @@ void ctool::set_obs_bounds(GObservations& obs) } // endfor: looped over observations - // Return return; } @@ -1134,7 +1123,7 @@ void ctool::provide_help(void) const char* ptr = std::getenv("CTOOLS"); if (ptr == NULL) { std::string msg = "CTOOLS environment variable not set, cannot " - "display help file. Please define CTOOLS " + "display help file. Please set the CTOOLS " "environment variable."; throw GException::invalid_value(G_PROVIDE_HELP, msg); } diff --git a/test/data/crab_edispcube.fits.gz b/test/data/crab_edispcube.fits.gz index 09bfb05..370dbe5 100644 --- a/test/data/crab_edispcube.fits.gz +++ b/test/data/crab_edispcube.fits.gz diff --git a/test/test_ctedispcube.py b/test/test_ctedispcube.py index 3fc5758..e91afea 100755 --- a/test/test_ctedispcube.py +++ b/test/test_ctedispcube.py @@ -2,7 +2,7 @@ # ========================================================================== # This scripts performs unit tests for the ctedispcube tool. # -# Copyright (C) 2014-2016 Juergen Knoedlseder +# Copyright (C) 2016 Maria Haupt # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -66,23 +66,23 @@ class Test(gammalib.GPythonTestSuite): """ # Set-up ctedispcube edispcube = ctools.ctedispcube() - edispcube["inobs"] = self.events_name - edispcube["incube"] = "NONE" - edispcube["outcube"] = "edispcube.fits" - edispcube["caldb"] = self.caldb - edispcube["irf"] = self.irf - edispcube["ebinalg"] = "LOG" - edispcube["emin"] = 0.1 - edispcube["emax"] = 100 - edispcube["enumbins"] = 20 - edispcube["nxpix"] = 10 - edispcube["nypix"] = 10 - edispcube["binsz"] = 0.4 - edispcube["coordsys"] = "CEL" - edispcube["proj"] = "CAR" - edispcube["xref"] = 83.63 - edispcube["yref"] = 22.01 - edispcube["mmax"] = 0.3 + edispcube["inobs"] = self.events_name + edispcube["incube"] = "NONE" + edispcube["outcube"] = "edispcube.fits" + edispcube["caldb"] = self.caldb + edispcube["irf"] = self.irf + edispcube["ebinalg"] = "LOG" + edispcube["emin"] = 0.1 + edispcube["emax"] = 100 + edispcube["enumbins"] = 20 + edispcube["nxpix"] = 10 + edispcube["nypix"] = 10 + edispcube["binsz"] = 0.4 + edispcube["coordsys"] = "CEL" + edispcube["proj"] = "CAR" + edispcube["xref"] = 83.63 + edispcube["yref"] = 22.01 + edispcube["migramax"] = 2.0 edispcube["migrabins"] = 10 # Run tool diff --git a/test/test_ctools.sh b/test/test_ctools.sh index 78615df..5b292eb 100755 --- a/test/test_ctools.sh +++ b/test/test_ctools.sh @@ -2,7 +2,7 @@ # ========================================================================== # This script tests all ctools # -# Copyright (C) 2011-2015 Juergen Knoedlseder +# Copyright (C) 2011-2016 Juergen Knoedlseder # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -293,7 +293,7 @@ $ctedispcube inobs="data/crab_events.fits" \ xref=83.63 \ yref=22.01 \ proj="CAR" \ - mmax=3.0 \ + migramax=3.0 \ migrabins=10 $ECHO -n "." if [ -s "edispcube1.fits" ] @@ -310,7 +310,7 @@ $ctedispcube inobs="events.fits" \ outcube="edispcube2.fits" \ caldb="irf" \ irf="cta_dummy_irf" \ - mmax=3.0 \ + migramax=3.0 \ migrabins=3 $ECHO -n "." if [ -s "edispcube2.fits" ] @@ -388,7 +388,6 @@ fi $ECHO " ok" - # # Test ctmodel # ============ @@ -580,7 +579,6 @@ fi $ECHO " ok" - # # Test cttsmap # ============ @@ -609,8 +607,6 @@ fi $ECHO " ok" - - # # Test ctcubemask # ===============