Commit 14a7df8e644e5d5df052b8cf5192d3f1207203b9

Authored by Jürgen Knödlseder
2 parents a89a318d 92df60c8

Merge branch 'integration' into devel

Conflicts:
	scripts/cssens.py
	scripts/cstsdist.py
	src/ctmodel/ctmodel.cpp
ChangeLog
  1 +2013-02-21 Juergen Knoedlseder <jurgen.knodlseder@irap.omp.eu>
  2 +
  3 + * Version 0.7.0 released
  4 + ========================
  5 +
  6 + Adapt to GammaLib-00-08-00 interface
  7 +
1 2012-12-21 Juergen Knoedlseder <jurgen.knodlseder@irap.omp.eu> 8 2012-12-21 Juergen Knoedlseder <jurgen.knodlseder@irap.omp.eu>
2 9
3 * Version 0.6.0 released 10 * Version 0.6.0 released
1 -New Features and Important Changes in ctools 00-06-00 1 +New Features and Important Changes in ctools 00-07-00
2 2
3 Author(s) : Juergen Knoedlseder 3 Author(s) : Juergen Knoedlseder
4 4
5 -December 21th, 2012 5 +February 21th, 2013
6 6
7 7
8 1. Introduction 8 1. Introduction
@@ -10,6 +10,10 @@ December 21th, 2012 @@ -10,6 +10,10 @@ December 21th, 2012
10 This document briefly summarizes executable by executable the most 10 This document briefly summarizes executable by executable the most
11 important changes made since the last release of ctools. 11 important changes made since the last release of ctools.
12 12
  13 +With version 00-08-00, GammaLib has undergone a major interface
  14 +change. The adaption of ctools to this interface changed will not be
  15 +detailed below as they do not impact the functionalities.
  16 +
13 17
14 2. Configuration 18 2. Configuration
15 ----------------- 19 -----------------
@@ -23,20 +27,12 @@ None @@ -23,20 +27,12 @@ None
23 27
24 4. ctobssim - CTA observation simulation 28 4. ctobssim - CTA observation simulation
25 ---------------------------------------- 29 ----------------------------------------
26 -Adapt to new GTime interface. The time parameters are now given in the CTA  
27 -time reference.  
28 -  
29 -A bug was corrected that prevented correct usage of the seed value. The  
30 -introduction of OpenMP support in version 0.5.0 led to an internal seed  
31 -value of 0 event if different seed parameters were specified. The bug  
32 -was corrected and the internal seed values that are used are now dumped  
33 -into the log file. 30 +None
34 31
35 32
36 5. ctselect - CTA event selection 33 5. ctselect - CTA event selection
37 --------------------------------- 34 ---------------------------------
38 -Adapt to new GTime interface. The time parameters are now given in the CTA  
39 -time reference. 35 +None
40 36
41 37
42 6. ctbin - CTA event binning 38 6. ctbin - CTA event binning
@@ -56,11 +52,7 @@ None @@ -56,11 +52,7 @@ None
56 52
57 9. ctmodel - CTA counts map modelling 53 9. ctmodel - CTA counts map modelling
58 ------------------------------------- 54 -------------------------------------
59 -The executable ctmodel has been added. ctmodel takes a model XML file  
60 -and computes the corresponding model map. The definiton of the model  
61 -map is either taken from an input counts map or an observation  
62 -definiton file, or from the task parameters with an interface that  
63 -is similiar to that of ctbin. 55 +None
64 56
65 57
66 10. Examples 58 10. Examples
configure.ac
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
2 # Configuration for ctools - a set of tools for science analysis of CTA # 2 # Configuration for ctools - a set of tools for science analysis of CTA #
3 # data # 3 # data #
4 # ------------------------------------------------------------------------- # 4 # ------------------------------------------------------------------------- #
5 -# Copyright (C) 2011-2012 Juergen Knoedlseder # 5 +# Copyright (C) 2011-2013 Juergen Knoedlseder #
6 # ------------------------------------------------------------------------- # 6 # ------------------------------------------------------------------------- #
7 # # 7 # #
8 # This program is free software: you can redistribute it and/or modify # 8 # This program is free software: you can redistribute it and/or modify #
@@ -29,7 +29,7 @@ @@ -29,7 +29,7 @@
29 ############################################################################# 29 #############################################################################
30 # Initialisation # 30 # Initialisation #
31 ############################################################################# 31 #############################################################################
32 -AC_INIT([ctools], [0.6.0], [jurgen.knodlseder@irap.omp.eu], [ctools]) 32 +AC_INIT([ctools], [0.7.0], [jurgen.knodlseder@irap.omp.eu], [ctools])
33 AC_CONFIG_SRCDIR([src/ctselect/ctselect.cpp]) 33 AC_CONFIG_SRCDIR([src/ctselect/ctselect.cpp])
34 AC_CONFIG_MACRO_DIR([m4]) 34 AC_CONFIG_MACRO_DIR([m4])
35 #AM_INIT_AUTOMAKE([gnu no-dependencies]) 35 #AM_INIT_AUTOMAKE([gnu no-dependencies])
ctools.pc.in
@@ -6,9 +6,9 @@ includedir=${prefix}/include @@ -6,9 +6,9 @@ includedir=${prefix}/include
6 Name: ctools 6 Name: ctools
7 Description: CTA science analysis tools 7 Description: CTA science analysis tools
8 URL: http://cta.irap.omp.eu/ctools 8 URL: http://cta.irap.omp.eu/ctools
9 -Version: 0.6.0 9 +Version: 0.7.0
10 Requires: 10 Requires:
11 -Requires.private: GammaLib >= 0.7.0 11 +Requires.private: GammaLib >= 0.8.0
12 Conflicts: 12 Conflicts:
13 Cflags: -I${includedir}/ctools 13 Cflags: -I${includedir}/ctools
14 Libs: -L${libdir} -lctools 14 Libs: -L${libdir} -lctools
src/ctbin/ctbin.cpp
@@ -277,7 +277,7 @@ void ctbin::run(void) @@ -277,7 +277,7 @@ void ctbin::run(void)
277 m_infiles.push_back(""); 277 m_infiles.push_back("");
278 278
279 // Get CTA observation 279 // Get CTA observation
280 - GCTAObservation* obs = dynamic_cast<GCTAObservation*>(&m_obs[i]); 280 + GCTAObservation* obs = dynamic_cast<GCTAObservation*>(m_obs[i]);
281 281
282 // Continue only if observation is a CTA observation 282 // Continue only if observation is a CTA observation
283 if (obs != NULL) { 283 if (obs != NULL) {
@@ -710,7 +710,7 @@ void ctbin::save_fits(void) @@ -710,7 +710,7 @@ void ctbin::save_fits(void)
710 m_outfile = (*this)["outfile"].filename(); 710 m_outfile = (*this)["outfile"].filename();
711 711
712 // Get CTA observation from observation container 712 // Get CTA observation from observation container
713 - GCTAObservation* obs = dynamic_cast<GCTAObservation*>(&m_obs[0]); 713 + GCTAObservation* obs = dynamic_cast<GCTAObservation*>(m_obs[0]);
714 714
715 // Save event list 715 // Save event list
716 save_counts_map(obs, m_outfile); 716 save_counts_map(obs, m_outfile);
@@ -741,7 +741,7 @@ void ctbin::save_xml(void) @@ -741,7 +741,7 @@ void ctbin::save_xml(void)
741 for (int i = 0; i < m_obs.size(); ++i) { 741 for (int i = 0; i < m_obs.size(); ++i) {
742 742
743 // Get CTA observation 743 // Get CTA observation
744 - GCTAObservation* obs = dynamic_cast<GCTAObservation*>(&m_obs[i]); 744 + GCTAObservation* obs = dynamic_cast<GCTAObservation*>(m_obs[i]);
745 745
746 // Handle only CTA observations 746 // Handle only CTA observations
747 if (obs != NULL) { 747 if (obs != NULL) {
src/ctlike/ctlike.cpp
1 /*************************************************************************** 1 /***************************************************************************
2 * ctlike - CTA maximum likelihood tool * 2 * ctlike - CTA maximum likelihood tool *
3 * ----------------------------------------------------------------------- * 3 * ----------------------------------------------------------------------- *
4 - * copyright (C) 2010-2012 by Juergen Knoedlseder * 4 + * copyright (C) 2010-2013 by Juergen Knoedlseder *
5 * ----------------------------------------------------------------------- * 5 * ----------------------------------------------------------------------- *
6 * * 6 * *
7 * This program is free software: you can redistribute it and/or modify * 7 * This program is free software: you can redistribute it and/or modify *
@@ -21,7 +21,7 @@ @@ -21,7 +21,7 @@
21 /** 21 /**
22 * @file ctlike.cpp 22 * @file ctlike.cpp
23 * @brief CTA maximum likelihood tool implementation 23 * @brief CTA maximum likelihood tool implementation
24 - * @author J. Knoedlseder 24 + * @author Juergen Knoedlseder
25 */ 25 */
26 26
27 /* __ Includes ___________________________________________________________ */ 27 /* __ Includes ___________________________________________________________ */
@@ -259,7 +259,7 @@ void ctlike::run(void) @@ -259,7 +259,7 @@ void ctlike::run(void)
259 // Compute number of observed events in all observations 259 // Compute number of observed events in all observations
260 double num_events = 0.0; 260 double num_events = 0.0;
261 for (int i = 0; i < m_obs.size(); ++i) { 261 for (int i = 0; i < m_obs.size(); ++i) {
262 - num_events += m_obs[i].events()->number(); 262 + num_events += m_obs[i]->events()->number();
263 } 263 }
264 264
265 // Write results into logger 265 // Write results into logger
src/ctlike/ctlike.hpp
1 /*************************************************************************** 1 /***************************************************************************
2 * ctlike - CTA maximum likelihood tool * 2 * ctlike - CTA maximum likelihood tool *
3 * ----------------------------------------------------------------------- * 3 * ----------------------------------------------------------------------- *
4 - * copyright (C) 2010-2012 by Juergen Knoedlseder * 4 + * copyright (C) 2010-2013 by Juergen Knoedlseder *
5 * ----------------------------------------------------------------------- * 5 * ----------------------------------------------------------------------- *
6 * * 6 * *
7 * This program is free software: you can redistribute it and/or modify * 7 * This program is free software: you can redistribute it and/or modify *
@@ -21,7 +21,7 @@ @@ -21,7 +21,7 @@
21 /** 21 /**
22 * @file ctlike.hpp 22 * @file ctlike.hpp
23 * @brief CTA maximum likelihood tool interface definition 23 * @brief CTA maximum likelihood tool interface definition
24 - * @author J. Knoedlseder 24 + * @author Juergen Knoedlseder
25 */ 25 */
26 26
27 #ifndef CTLIKE_HPP 27 #ifndef CTLIKE_HPP
@@ -34,7 +34,7 @@ @@ -34,7 +34,7 @@
34 34
35 /* __Definitions _________________________________________________________ */ 35 /* __Definitions _________________________________________________________ */
36 #define CTLIKE_NAME "ctlike" 36 #define CTLIKE_NAME "ctlike"
37 -#define CTLIKE_VERSION "00-04-00" 37 +#define CTLIKE_VERSION "00-05-00"
38 38
39 39
40 /***********************************************************************//** 40 /***********************************************************************//**
src/ctmodel/ctmodel.cpp
@@ -279,7 +279,7 @@ void ctmodel::run(void) @@ -279,7 +279,7 @@ void ctmodel::run(void)
279 m_infiles.push_back(""); 279 m_infiles.push_back("");
280 280
281 // Get CTA observation 281 // Get CTA observation
282 - GCTAObservation* obs = dynamic_cast<GCTAObservation*>(&m_obs[i]); 282 + GCTAObservation* obs = dynamic_cast<GCTAObservation*>(m_obs[i]);
283 283
284 // Continue only if observation is a CTA observation 284 // Continue only if observation is a CTA observation
285 if (obs != NULL) { 285 if (obs != NULL) {
@@ -482,7 +482,7 @@ void ctmodel::setup_obs(void) @@ -482,7 +482,7 @@ void ctmodel::setup_obs(void)
482 skydir.radec_deg(m_ra, m_dec); 482 skydir.radec_deg(m_ra, m_dec);
483 pnt.dir(skydir); 483 pnt.dir(skydir);
484 484
485 - // Setup energy range covered by data 485 + // Setup energy range covered by model
486 GEnergy emin(m_emin, "TeV"); 486 GEnergy emin(m_emin, "TeV");
487 GEnergy emax(m_emax, "TeV"); 487 GEnergy emax(m_emax, "TeV");
488 GEbounds ebds(m_enumbins, emin, emax); 488 GEbounds ebds(m_enumbins, emin, emax);
@@ -568,7 +568,7 @@ void ctmodel::setup_obs(void) @@ -568,7 +568,7 @@ void ctmodel::setup_obs(void)
568 for (int i = 0; i < m_obs.size(); ++i) { 568 for (int i = 0; i < m_obs.size(); ++i) {
569 569
570 // Is this observation a CTA observation? 570 // Is this observation a CTA observation?
571 - GCTAObservation* obs = dynamic_cast<GCTAObservation*>(&m_obs[i]); 571 + GCTAObservation* obs = dynamic_cast<GCTAObservation*>(m_obs[i]);
572 572
573 // Yes ... 573 // Yes ...
574 if (obs != NULL) { 574 if (obs != NULL) {
@@ -789,7 +789,7 @@ void ctmodel::save_fits(void) @@ -789,7 +789,7 @@ void ctmodel::save_fits(void)
789 m_outfile = (*this)["outfile"].filename(); 789 m_outfile = (*this)["outfile"].filename();
790 790
791 // Get CTA observation from observation container 791 // Get CTA observation from observation container
792 - GCTAObservation* obs = dynamic_cast<GCTAObservation*>(&m_obs[0]); 792 + GCTAObservation* obs = dynamic_cast<GCTAObservation*>(m_obs[0]);
793 793
794 // Save model map 794 // Save model map
795 save_model_map(obs, m_outfile); 795 save_model_map(obs, m_outfile);
@@ -820,7 +820,7 @@ void ctmodel::save_xml(void) @@ -820,7 +820,7 @@ void ctmodel::save_xml(void)
820 for (int i = 0; i < m_obs.size(); ++i) { 820 for (int i = 0; i < m_obs.size(); ++i) {
821 821
822 // Get CTA observation 822 // Get CTA observation
823 - GCTAObservation* obs = dynamic_cast<GCTAObservation*>(&m_obs[i]); 823 + GCTAObservation* obs = dynamic_cast<GCTAObservation*>(m_obs[i]);
824 824
825 // Handle only CTA observations 825 // Handle only CTA observations
826 if (obs != NULL) { 826 if (obs != NULL) {
src/ctobssim/ctobssim.cpp
@@ -295,7 +295,7 @@ void ctobssim::run(void) @@ -295,7 +295,7 @@ void ctobssim::run(void)
295 for (int i = 0; i < m_obs.size(); ++i) { 295 for (int i = 0; i < m_obs.size(); ++i) {
296 296
297 // Get CTA observation 297 // Get CTA observation
298 - GCTAObservation* obs = dynamic_cast<GCTAObservation*>(&m_obs[i]); 298 + GCTAObservation* obs = dynamic_cast<GCTAObservation*>(m_obs[i]);
299 299
300 // Continue only if observation is a CTA observation 300 // Continue only if observation is a CTA observation
301 if (obs != NULL) { 301 if (obs != NULL) {
@@ -1036,7 +1036,7 @@ void ctobssim::save_fits(void) @@ -1036,7 +1036,7 @@ void ctobssim::save_fits(void)
1036 m_outfile = (*this)["outfile"].filename(); 1036 m_outfile = (*this)["outfile"].filename();
1037 1037
1038 // Get CTA observation from observation container 1038 // Get CTA observation from observation container
1039 - GCTAObservation* obs = dynamic_cast<GCTAObservation*>(&m_obs[0]); 1039 + GCTAObservation* obs = dynamic_cast<GCTAObservation*>(m_obs[0]);
1040 1040
1041 // Save observation into FITS file 1041 // Save observation into FITS file
1042 obs->save(m_outfile, clobber()); 1042 obs->save(m_outfile, clobber());
@@ -1069,7 +1069,7 @@ void ctobssim::save_xml(void) @@ -1069,7 +1069,7 @@ void ctobssim::save_xml(void)
1069 for (int i = 0; i < m_obs.size(); ++i) { 1069 for (int i = 0; i < m_obs.size(); ++i) {
1070 1070
1071 // Get CTA observation 1071 // Get CTA observation
1072 - GCTAObservation* obs = dynamic_cast<GCTAObservation*>(&m_obs[i]); 1072 + GCTAObservation* obs = dynamic_cast<GCTAObservation*>(m_obs[i]);
1073 1073
1074 // Handle only CTA observations 1074 // Handle only CTA observations
1075 if (obs != NULL) { 1075 if (obs != NULL) {
src/ctselect/ctselect.cpp
1 /*************************************************************************** 1 /***************************************************************************
2 * ctselect - CTA data selection tool * 2 * ctselect - CTA data selection tool *
3 * ----------------------------------------------------------------------- * 3 * ----------------------------------------------------------------------- *
4 - * copyright (C) 2010-2012 by Juergen Knoedlseder * 4 + * copyright (C) 2010-2013 by Juergen Knoedlseder *
5 * ----------------------------------------------------------------------- * 5 * ----------------------------------------------------------------------- *
6 * * 6 * *
7 * This program is free software: you can redistribute it and/or modify * 7 * This program is free software: you can redistribute it and/or modify *
@@ -269,7 +269,7 @@ void ctselect::run(void) @@ -269,7 +269,7 @@ void ctselect::run(void)
269 m_infiles.push_back(""); 269 m_infiles.push_back("");
270 270
271 // Get CTA observation 271 // Get CTA observation
272 - GCTAObservation* obs = dynamic_cast<GCTAObservation*>(&m_obs[i]); 272 + GCTAObservation* obs = dynamic_cast<GCTAObservation*>(m_obs[i]);
273 273
274 // Continue only if observation is a CTA observation 274 // Continue only if observation is a CTA observation
275 if (obs != NULL) { 275 if (obs != NULL) {
@@ -872,7 +872,7 @@ void ctselect::save_fits(void) @@ -872,7 +872,7 @@ void ctselect::save_fits(void)
872 m_outfile = (*this)["outfile"].filename(); 872 m_outfile = (*this)["outfile"].filename();
873 873
874 // Get CTA observation from observation container 874 // Get CTA observation from observation container
875 - GCTAObservation* obs = dynamic_cast<GCTAObservation*>(&m_obs[0]); 875 + GCTAObservation* obs = dynamic_cast<GCTAObservation*>(m_obs[0]);
876 876
877 // Save event list 877 // Save event list
878 save_event_list(obs, m_infiles[0], m_outfile); 878 save_event_list(obs, m_infiles[0], m_outfile);
@@ -902,7 +902,7 @@ void ctselect::save_xml(void) @@ -902,7 +902,7 @@ void ctselect::save_xml(void)
902 for (int i = 0; i < m_obs.size(); ++i) { 902 for (int i = 0; i < m_obs.size(); ++i) {
903 903
904 // Get CTA observation 904 // Get CTA observation
905 - GCTAObservation* obs = dynamic_cast<GCTAObservation*>(&m_obs[i]); 905 + GCTAObservation* obs = dynamic_cast<GCTAObservation*>(m_obs[i]);
906 906
907 // Handle only CTA observations 907 // Handle only CTA observations
908 if (obs != NULL) { 908 if (obs != NULL) {
src/ctselect/ctselect.hpp
1 /*************************************************************************** 1 /***************************************************************************
2 * ctselect - CTA data selection tool * 2 * ctselect - CTA data selection tool *
3 * ----------------------------------------------------------------------- * 3 * ----------------------------------------------------------------------- *
4 - * copyright (C) 2010-2012 by Juergen Knoedlseder * 4 + * copyright (C) 2010-2013 by Juergen Knoedlseder *
5 * ----------------------------------------------------------------------- * 5 * ----------------------------------------------------------------------- *
6 * * 6 * *
7 * This program is free software: you can redistribute it and/or modify * 7 * This program is free software: you can redistribute it and/or modify *
@@ -35,7 +35,7 @@ @@ -35,7 +35,7 @@
35 35
36 /* __Definitions _________________________________________________________ */ 36 /* __Definitions _________________________________________________________ */
37 #define CTSELECT_NAME "ctselect" 37 #define CTSELECT_NAME "ctselect"
38 -#define CTSELECT_VERSION "00-04-00" 38 +#define CTSELECT_VERSION "00-05-00"
39 39
40 40
41 /***********************************************************************//** 41 /***********************************************************************//**
src/ctskymap/ctskymap.cpp
1 /*************************************************************************** 1 /***************************************************************************
2 * ctskymap - CTA sky mapping tool * 2 * ctskymap - CTA sky mapping tool *
3 * ----------------------------------------------------------------------- * 3 * ----------------------------------------------------------------------- *
4 - * copyright (C) 2011 by Juergen Knoedlseder * 4 + * copyright (C) 2011-2013 by Juergen Knoedlseder *
5 * ----------------------------------------------------------------------- * 5 * ----------------------------------------------------------------------- *
6 * * 6 * *
7 * This program is free software: you can redistribute it and/or modify * 7 * This program is free software: you can redistribute it and/or modify *
@@ -21,7 +21,7 @@ @@ -21,7 +21,7 @@
21 /** 21 /**
22 * @file ctskymap.cpp 22 * @file ctskymap.cpp
23 * @brief CTA sky mapping tool implementation 23 * @brief CTA sky mapping tool implementation
24 - * @author J. Knoedlseder 24 + * @author Juergen Knoedlseder
25 */ 25 */
26 26
27 /* __ Includes ___________________________________________________________ */ 27 /* __ Includes ___________________________________________________________ */
@@ -272,7 +272,7 @@ void ctskymap::run(void) @@ -272,7 +272,7 @@ void ctskymap::run(void)
272 for (int i = 0; i < m_obs.size(); ++i) { 272 for (int i = 0; i < m_obs.size(); ++i) {
273 273
274 // Get CTA observation 274 // Get CTA observation
275 - GCTAObservation* obs = dynamic_cast<GCTAObservation*>(&m_obs[i]); 275 + GCTAObservation* obs = dynamic_cast<GCTAObservation*>(m_obs[i]);
276 276
277 // Continue only if observation is a CTA observation 277 // Continue only if observation is a CTA observation
278 if (obs != NULL) { 278 if (obs != NULL) {
src/ctskymap/ctskymap.hpp
1 /*************************************************************************** 1 /***************************************************************************
2 * ctskymap - CTA sky mapping tool * 2 * ctskymap - CTA sky mapping tool *
3 * ----------------------------------------------------------------------- * 3 * ----------------------------------------------------------------------- *
4 - * copyright (C) 2010-2011 by Juergen Knoedlseder * 4 + * copyright (C) 2010-2013 by Juergen Knoedlseder *
5 * ----------------------------------------------------------------------- * 5 * ----------------------------------------------------------------------- *
6 * * 6 * *
7 * This program is free software: you can redistribute it and/or modify * 7 * This program is free software: you can redistribute it and/or modify *
@@ -21,7 +21,7 @@ @@ -21,7 +21,7 @@
21 /** 21 /**
22 * @file ctskymap.hpp 22 * @file ctskymap.hpp
23 * @brief CTA sky mapping tool definition 23 * @brief CTA sky mapping tool definition
24 - * @author J. Knoedlseder 24 + * @author Juergen Knoedlseder
25 */ 25 */
26 26
27 #ifndef CTSKYMAP_HPP 27 #ifndef CTSKYMAP_HPP
@@ -33,7 +33,7 @@ @@ -33,7 +33,7 @@
33 33
34 /* __Definitions _________________________________________________________ */ 34 /* __Definitions _________________________________________________________ */
35 #define CTSKYMAP_NAME "ctskymap" 35 #define CTSKYMAP_NAME "ctskymap"
36 -#define CTSKYMAP_VERSION "00-01-00" 36 +#define CTSKYMAP_VERSION "00-02-00"
37 37
38 38
39 /***********************************************************************//** 39 /***********************************************************************//**