Commit 7f5bbf013f64a5bad61aaf31c31b60446c1e6ed3

Authored by Jürgen Knödlseder
1 parent e371cfca

Enhance output of csroot2caldb script

ChangeLog
  1 +2017-03-07
  2 +
  3 + * Version 1.2.1 released
  4 + ========================
  5 +
  6 + Enhance logfile output of csroot2caldb script
  7 +
  8 +
1 2017-02-09 9 2017-02-09
2 10
3 * Version 1.2.0 released 11 * Version 1.2.0 released
README.md
1 ctools information 1 ctools information
2 ================== 2 ==================
3 -* Version: 1.2.0 (12 August 2016) 3 +* Version: 1.2.1 (12 August 2016)
4 * Author: Juergen Knoedlseder (jurgen.knodlseder@irap.omp.eu) 4 * Author: Juergen Knoedlseder (jurgen.knodlseder@irap.omp.eu)
5 -* GammaLib dependency: 1.2.0 5 +* GammaLib dependency: 1.2.1
6 6
7 [![Build Status](https://cta-jenkins.irap.omp.eu/buildStatus/icon?job=ctools-integrate-os)](https://cta-jenkins.irap.omp.eu/job/ctools-integrate-os/) 7 [![Build Status](https://cta-jenkins.irap.omp.eu/buildStatus/icon?job=ctools-integrate-os)](https://cta-jenkins.irap.omp.eu/job/ctools-integrate-os/)
8 8
configure.ac
1 ############################################################################# 1 #############################################################################
2 # Configuration for ctools - tools for science analysis of CTA data # 2 # Configuration for ctools - tools for science analysis of CTA data #
3 # ------------------------------------------------------------------------- # 3 # ------------------------------------------------------------------------- #
4 -# Copyright (C) 2011-2016 Juergen Knoedlseder # 4 +# Copyright (C) 2011-2017 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 #
@@ -28,7 +28,7 @@ @@ -28,7 +28,7 @@
28 ############################################################################# 28 #############################################################################
29 # Initialisation # 29 # Initialisation #
30 ############################################################################# 30 #############################################################################
31 -AC_INIT([ctools], [1.2.0], [jurgen.knodlseder@irap.omp.eu], [ctools]) 31 +AC_INIT([ctools], [1.2.1], [jurgen.knodlseder@irap.omp.eu], [ctools])
32 AC_CONFIG_SRCDIR([src/ctselect/ctselect.cpp]) 32 AC_CONFIG_SRCDIR([src/ctselect/ctselect.cpp])
33 AC_CONFIG_MACRO_DIR([m4]) 33 AC_CONFIG_MACRO_DIR([m4])
34 #AM_INIT_AUTOMAKE([gnu no-dependencies foreign]) 34 #AM_INIT_AUTOMAKE([gnu no-dependencies foreign])
cscripts/csroot2caldb.py
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
2 # ========================================================================== 2 # ==========================================================================
3 # Generate IRFs in CALDB format from a ROOT offaxis performance file 3 # Generate IRFs in CALDB format from a ROOT offaxis performance file
4 # 4 #
5 -# Copyright (C) 2016 Juergen Knoedlseder 5 +# Copyright (C) 2016-2017 Juergen Knoedlseder
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
8 # it under the terms of the GNU General Public License as published by 8 # it under the terms of the GNU General Public License as published by
@@ -50,7 +50,7 @@ class csroot2caldb(ctools.cscript): @@ -50,7 +50,7 @@ class csroot2caldb(ctools.cscript):
50 """ 50 """
51 # Set name 51 # Set name
52 self._name = 'csroot2caldb' 52 self._name = 'csroot2caldb'
53 - self._version = '1.2.0' 53 + self._version = '1.2.1'
54 54
55 # Initialise application by calling the appropriate class constructor 55 # Initialise application by calling the appropriate class constructor
56 self._init_cscript(argv) 56 self._init_cscript(argv)
@@ -548,9 +548,7 @@ class csroot2caldb(ctools.cscript): @@ -548,9 +548,7 @@ class csroot2caldb(ctools.cscript):
548 Directory structure dictionary 548 Directory structure dictionary
549 """ 549 """
550 # Write header 550 # Write header
551 - if self._logTerse():  
552 - self._log('\n')  
553 - self._log.header1('Generate effective area extension') 551 + self._log_header1(gammalib.TERSE, 'Generate effective area extension')
554 552
555 # Get relevant ROOT histograms 553 # Get relevant ROOT histograms
556 etrue = tfile.Get('EffectiveAreaEtrue_offaxis') 554 etrue = tfile.Get('EffectiveAreaEtrue_offaxis')
@@ -609,11 +607,6 @@ class csroot2caldb(ctools.cscript): @@ -609,11 +607,6 @@ class csroot2caldb(ctools.cscript):
609 ds : dict 607 ds : dict
610 Directory structure dictionary 608 Directory structure dictionary
611 """ 609 """
612 - # Write header  
613 - if self._logTerse():  
614 - self._log('\n')  
615 - self._log.header1('Generate point spread function extension')  
616 -  
617 # King profile PSF 610 # King profile PSF
618 if self['psftype'].string() == 'King': 611 if self['psftype'].string() == 'King':
619 self._root2psf_king(tfile, irf, ds) 612 self._root2psf_king(tfile, irf, ds)
@@ -646,6 +639,10 @@ class csroot2caldb(ctools.cscript): @@ -646,6 +639,10 @@ class csroot2caldb(ctools.cscript):
646 ds : dict 639 ds : dict
647 Directory structure dictionary 640 Directory structure dictionary
648 """ 641 """
  642 + # Write header
  643 + self._log_header1(gammalib.TERSE,
  644 + 'Generate Gaussian point spread function extension')
  645 +
649 # Get relevant ROOT histograms 646 # Get relevant ROOT histograms
650 r68 = tfile.Get('AngRes_offaxis') 647 r68 = tfile.Get('AngRes_offaxis')
651 648
@@ -678,9 +675,6 @@ class csroot2caldb(ctools.cscript): @@ -678,9 +675,6 @@ class csroot2caldb(ctools.cscript):
678 zero.SetBinContent(ieng+1,ioff+1,0.0) 675 zero.SetBinContent(ieng+1,ioff+1,0.0)
679 676
680 # Set boundaries 677 # Set boundaries
681 - #bounds = self._make_2D(r68, ds['HDU_PSF'], None, 'deg')  
682 - #for b in bounds:  
683 - # irf['PSF_BOUNDS'].append(b)  
684 irf['PSF_BOUNDS'].append('PSF(GAUSS)') 678 irf['PSF_BOUNDS'].append('PSF(GAUSS)')
685 679
686 # Write boundary keywords 680 # Write boundary keywords
@@ -725,6 +719,10 @@ class csroot2caldb(ctools.cscript): @@ -725,6 +719,10 @@ class csroot2caldb(ctools.cscript):
725 ds : dict 719 ds : dict
726 Directory structure dictionary 720 Directory structure dictionary
727 """ 721 """
  722 + # Write header
  723 + self._log_header1(gammalib.TERSE,
  724 + 'Generate King point spread function extension')
  725 +
728 # Get relevant ROOT histograms 726 # Get relevant ROOT histograms
729 r68 = tfile.Get('AngRes_offaxis') 727 r68 = tfile.Get('AngRes_offaxis')
730 r80 = tfile.Get('AngRes80_offaxis') 728 r80 = tfile.Get('AngRes80_offaxis')
@@ -802,9 +800,18 @@ class csroot2caldb(ctools.cscript): @@ -802,9 +800,18 @@ class csroot2caldb(ctools.cscript):
802 # This takes care of pixels that are ill defined 800 # This takes care of pixels that are ill defined
803 # in the MC file. 801 # in the MC file.
804 if gamma == 0.0 and sigma == 0.0: 802 if gamma == 0.0 and sigma == 0.0:
805 - gamma = last_gamma  
806 - sigma = last_sigma  
807 - 803 + gamma = last_gamma
  804 + sigma = last_sigma
  805 + status = ' (use last)'
  806 + else:
  807 + status = ''
  808 +
  809 + # Log results
  810 + self._log_value(gammalib.EXPLICIT,
  811 + 'ieng=%d ioff=%d%s' % (ieng,ioff,status),
  812 + 'r68=%f r80=%f gamma=%f sigma=%f' %
  813 + (r_68, r_80, gamma, sigma))
  814 +
808 # Store surrent result as last result 815 # Store surrent result as last result
809 last_gamma = gamma 816 last_gamma = gamma
810 last_sigma = sigma 817 last_sigma = sigma
@@ -814,9 +821,6 @@ class csroot2caldb(ctools.cscript): @@ -814,9 +821,6 @@ class csroot2caldb(ctools.cscript):
814 sigma2D.SetBinContent(ieng+1,ioff+1,sigma) 821 sigma2D.SetBinContent(ieng+1,ioff+1,sigma)
815 822
816 # Set boundaries 823 # Set boundaries
817 - #bounds = self._make_2D(r68, ds['HDU_PSF'], None, 'deg')  
818 - #for b in bounds:  
819 - # irf['PSF_BOUNDS'].append(b)  
820 irf['PSF_BOUNDS'].append('PSF(KING)') 824 irf['PSF_BOUNDS'].append('PSF(KING)')
821 825
822 # Write boundary keywords 826 # Write boundary keywords
@@ -849,18 +853,11 @@ class csroot2caldb(ctools.cscript): @@ -849,18 +853,11 @@ class csroot2caldb(ctools.cscript):
849 Directory structure dictionary 853 Directory structure dictionary
850 """ 854 """
851 # Write header 855 # Write header
852 - if self._logTerse():  
853 - self._log('\n')  
854 - self._log.header1('Generate energy dispersion extension') 856 + self._log_header1(gammalib.TERSE, 'Generate energy dispersion extension')
855 857
856 # Get relevant ROOT histograms 858 # Get relevant ROOT histograms
857 matrix = tfile.Get('EestOverEtrue_offaxis') 859 matrix = tfile.Get('EestOverEtrue_offaxis')
858 860
859 - # Set boundaries  
860 - #bounds = self._make_3D_migra(matrix, ds['HDU_EDISP'], None, '')  
861 - #for b in bounds:  
862 - # irf['EDISP_BOUNDS'].append(b)  
863 -  
864 # Write boundary keywords 861 # Write boundary keywords
865 self._set_cif_keywords(ds['HDU_EDISP'], irf['EDISP_NAME'], 862 self._set_cif_keywords(ds['HDU_EDISP'], irf['EDISP_NAME'],
866 irf['EDISP_BOUNDS'], irf['EDISP_DESC'], irf) 863 irf['EDISP_BOUNDS'], irf['EDISP_DESC'], irf)
@@ -888,9 +885,7 @@ class csroot2caldb(ctools.cscript): @@ -888,9 +885,7 @@ class csroot2caldb(ctools.cscript):
888 Directory structure dictionary 885 Directory structure dictionary
889 """ 886 """
890 # Write header 887 # Write header
891 - if self._logTerse():  
892 - self._log('\n')  
893 - self._log.header1('Generate 3D background extension') 888 + self._log_header1(gammalib.TERSE, 'Generate 3D background extension')
894 889
895 # Get relevant ROOT histograms 890 # Get relevant ROOT histograms
896 array = tfile.Get('BGRatePerSqDeg_offaxis') 891 array = tfile.Get('BGRatePerSqDeg_offaxis')
@@ -909,11 +904,6 @@ class csroot2caldb(ctools.cscript): @@ -909,11 +904,6 @@ class csroot2caldb(ctools.cscript):
909 array_1D = tfile.Get('BGRatePerSqDeg') 904 array_1D = tfile.Get('BGRatePerSqDeg')
910 self._renorm_onaxis(array, array_1D) 905 self._renorm_onaxis(array, array_1D)
911 906
912 - # Set boundaries  
913 - #bounds = self._make_3D(array, ds['HDU_BGD'], None, 'deg')  
914 - #for b in bounds:  
915 - # irf['BGD_BOUNDS'].append(b)  
916 -  
917 # Write boundary keywords 907 # Write boundary keywords
918 self._set_cif_keywords(ds['HDU_BGD'], irf['BGD_NAME'], 908 self._set_cif_keywords(ds['HDU_BGD'], irf['BGD_NAME'],
919 irf['BGD_BOUNDS'], irf['BGD_DESC'], irf) 909 irf['BGD_BOUNDS'], irf['BGD_DESC'], irf)
@@ -944,6 +934,9 @@ class csroot2caldb(ctools.cscript): @@ -944,6 +934,9 @@ class csroot2caldb(ctools.cscript):
944 # Continue only if columns does not yet exist 934 # Continue only if columns does not yet exist
945 if not hdu.contains(name): 935 if not hdu.contains(name):
946 936
  937 + # Write header
  938 + self._log_header3(gammalib.TERSE, 'Append axis column "%s"' % name)
  939 +
947 # Get number of axis bins 940 # Get number of axis bins
948 nbins = axis.GetNbins() 941 nbins = axis.GetNbins()
949 942
@@ -967,6 +960,10 @@ class csroot2caldb(ctools.cscript): @@ -967,6 +960,10 @@ class csroot2caldb(ctools.cscript):
967 value = pow(10.0, value) 960 value = pow(10.0, value)
968 hdu[name][0,i] = value 961 hdu[name][0,i] = value
969 962
  963 + # Log values
  964 + self._log_value(gammalib.NORMAL, 'Number of axis bins', nbins)
  965 + self._log_value(gammalib.NORMAL, 'Unit', unit)
  966 +
970 # Return 967 # Return
971 return 968 return
972 969
@@ -988,6 +985,9 @@ class csroot2caldb(ctools.cscript): @@ -988,6 +985,9 @@ class csroot2caldb(ctools.cscript):
988 # Continue only if columns does not yet exist 985 # Continue only if columns does not yet exist
989 if not hdu.contains(name): 986 if not hdu.contains(name):
990 987
  988 + # Write header
  989 + self._log_header3(gammalib.TERSE, 'Append value column "%s"' % name)
  990 +
991 # Get number of values 991 # Get number of values
992 nbins = len(values) 992 nbins = len(values)
993 993
@@ -999,6 +999,10 @@ class csroot2caldb(ctools.cscript): @@ -999,6 +999,10 @@ class csroot2caldb(ctools.cscript):
999 for i in range(nbins): 999 for i in range(nbins):
1000 hdu[name][0,i] = values[i] 1000 hdu[name][0,i] = values[i]
1001 1001
  1002 + # Log values
  1003 + self._log_value(gammalib.NORMAL, 'Number of values', nbins)
  1004 + self._log_value(gammalib.NORMAL, 'Unit', unit)
  1005 +
1002 # Return 1006 # Return
1003 return 1007 return
1004 1008
@@ -1023,19 +1027,18 @@ class csroot2caldb(ctools.cscript): @@ -1023,19 +1027,18 @@ class csroot2caldb(ctools.cscript):
1023 # Continue only if the 1D and 2D histograms have the same number 1027 # Continue only if the 1D and 2D histograms have the same number
1024 # of energy bins 1028 # of energy bins
1025 if neng != hist1D.GetXaxis().GetNbins(): 1029 if neng != hist1D.GetXaxis().GetNbins():
1026 - # Write header  
1027 - if self._logTerse():  
1028 - self._log(gammalib.parformat('On-axis normalisation'))  
1029 - self._log('Impossible since energy binning of 1D histogram '  
1030 - '"%s" does not match that of 2D histogram "%s".\n' %  
1031 - (hist1D.GetName(), hist2D.GetName())) 1030 +
  1031 + # Log if energy binning differs
  1032 + self._log_value(gammalib.TERSE, 'On-axis normalisation',
  1033 + 'Impossible since energy binning of 1D histogram '
  1034 + '"%s" does not match that of 2D histogram "%s".' %
  1035 + (hist1D.GetName(), hist2D.GetName()))
1032 else: 1036 else:
1033 - # Write header  
1034 - if self._logTerse():  
1035 - self._log(gammalib.parformat('On-axis normalisation'))  
1036 - self._log('On-axis values of 1D histogram "%s" imposed on '  
1037 - '2D histogram "%s".\n' %  
1038 - (hist1D.GetName(), hist2D.GetName())) 1037 + # Log on-axis normalisation
  1038 + self._log_value(gammalib.TERSE, 'On-axis normalisation',
  1039 + 'On-axis values of 1D histogram "%s" imposed on '
  1040 + '2D histogram "%s".' %
  1041 + (hist1D.GetName(), hist2D.GetName()))
1039 1042
1040 # Get a copy of 2D histogram 1043 # Get a copy of 2D histogram
1041 hist2D_copy = hist2D.Clone() 1044 hist2D_copy = hist2D.Clone()
@@ -1142,11 +1145,13 @@ class csroot2caldb(ctools.cscript): @@ -1142,11 +1145,13 @@ class csroot2caldb(ctools.cscript):
1142 if energy > ethres: 1145 if energy > ethres:
1143 value = self._plaw_value(coeff, energy) 1146 value = self._plaw_value(coeff, energy)
1144 hist2D.SetBinContent(ieng+1,ioff+1,value) 1147 hist2D.SetBinContent(ieng+1,ioff+1,value)
1145 - if self._logTerse():  
1146 - self._log(gammalib.parformat('Power law replacement'))  
1147 - self._log('%e cts/s/deg2 (E=%8.4f TeV (%d) '  
1148 - 'Off=%.2f deg (%d)\n' %  
1149 - (value,engs[ieng],ieng,offset,ioff)) 1148 +
  1149 + # Log power law replacement
  1150 + self._log_value(gammalib.NORMAL,
  1151 + 'Power law replacement',
  1152 + '%e cts/s/deg2 (E=%8.4f TeV (%d) '
  1153 + 'Off=%.2f deg (%d)' %
  1154 + (value,engs[ieng],ieng,offset,ioff))
1150 1155
1151 # Return 1156 # Return
1152 return 1157 return
@@ -1292,11 +1297,14 @@ class csroot2caldb(ctools.cscript): @@ -1292,11 +1297,14 @@ class csroot2caldb(ctools.cscript):
1292 for ieng in range(i_start, i_stop+1): 1297 for ieng in range(i_start, i_stop+1):
1293 if hist2D.GetBinContent(ieng+1,ioff+1) == 0.0: 1298 if hist2D.GetBinContent(ieng+1,ioff+1) == 0.0:
1294 hist2D.SetBinContent(ieng+1,ioff+1,value) 1299 hist2D.SetBinContent(ieng+1,ioff+1,value)
1295 - if self._logTerse():  
1296 - self._log(gammalib.parformat('Background infill'))  
1297 - self._log('%e cts/s/deg2 (E=%8.4f TeV (%d) '  
1298 - 'Off=%.2f deg (%d)\n' %  
1299 - (value,engs[ieng],ieng,offset,ioff)) 1300 +
  1301 + # Log background infill
  1302 + self._log_value(gammalib.NORMAL,
  1303 + 'Background infill',
  1304 + '%e cts/s/deg2 (E=%8.4f TeV (%d) '
  1305 + 'Off=%.2f deg (%d)' %
  1306 + (value,engs[ieng],ieng,offset,ioff))
  1307 +
1300 else: 1308 else:
1301 value = hist2D.GetBinContent(ieng+1,ioff+1) 1309 value = hist2D.GetBinContent(ieng+1,ioff+1)
1302 1310
@@ -1324,12 +1332,19 @@ class csroot2caldb(ctools.cscript): @@ -1324,12 +1332,19 @@ class csroot2caldb(ctools.cscript):
1324 scale : float, optional 1332 scale : float, optional
1325 Scaling factor for histogram values 1333 Scaling factor for histogram values
1326 """ 1334 """
  1335 + # Write header
  1336 + self._log_header3(gammalib.TERSE, 'Make 2D data column "%s"' % name)
  1337 +
1327 # Extract energy and offset angle vectors 1338 # Extract energy and offset angle vectors
1328 energies = array.GetXaxis() 1339 energies = array.GetXaxis()
1329 offsets = array.GetYaxis() 1340 offsets = array.GetYaxis()
1330 neng = energies.GetNbins() 1341 neng = energies.GetNbins()
1331 noffset = offsets.GetNbins() 1342 noffset = offsets.GetNbins()
1332 1343
  1344 + # Log parameters
  1345 + self._log_value(gammalib.NORMAL, 'Number of energies', neng)
  1346 + self._log_value(gammalib.NORMAL, 'Number of offsets', noffset)
  1347 +
1333 # Append axis columns to HDU 1348 # Append axis columns to HDU
1334 self._append_column_axis(hdu, 'ENERG_LO', 'TeV', energies, log=True) 1349 self._append_column_axis(hdu, 'ENERG_LO', 'TeV', energies, log=True)
1335 self._append_column_axis(hdu, 'ENERG_HI', 'TeV', energies, log=True) 1350 self._append_column_axis(hdu, 'ENERG_HI', 'TeV', energies, log=True)
@@ -1379,6 +1394,9 @@ class csroot2caldb(ctools.cscript): @@ -1379,6 +1394,9 @@ class csroot2caldb(ctools.cscript):
1379 unit : str 1394 unit : str
1380 Data unit 1395 Data unit
1381 """ 1396 """
  1397 + # Write header
  1398 + self._log_header3(gammalib.TERSE, 'Make 3D data column "%s"' % name)
  1399 +
1382 # Get User parameters 1400 # Get User parameters
1383 scale = self['bgdscale'].real() 1401 scale = self['bgdscale'].real()
1384 oversample = self['bgdoversample'].integer() 1402 oversample = self['bgdoversample'].integer()
@@ -1397,6 +1415,13 @@ class csroot2caldb(ctools.cscript): @@ -1397,6 +1415,13 @@ class csroot2caldb(ctools.cscript):
1397 ewidth.append(pow(10.0, energies.GetBinUpEdge(ieng+1) +6.0) - 1415 ewidth.append(pow(10.0, energies.GetBinUpEdge(ieng+1) +6.0) -
1398 pow(10.0, energies.GetBinLowEdge(ieng+1)+6.0)) 1416 pow(10.0, energies.GetBinLowEdge(ieng+1)+6.0))
1399 1417
  1418 + # Log parameters
  1419 + self._log_value(gammalib.NORMAL, 'Scale', scale)
  1420 + self._log_value(gammalib.NORMAL, 'Oversample', oversample)
  1421 + self._log_value(gammalib.NORMAL, 'Number of energies', neng)
  1422 + self._log_value(gammalib.NORMAL, 'Number of offsets', noffset)
  1423 + self._log_value(gammalib.NORMAL, 'Maximum offset', theta_max)
  1424 +
1400 # Build DETX and DETY axes 1425 # Build DETX and DETY axes
1401 ndet = array.GetYaxis().GetNbins() 1426 ndet = array.GetYaxis().GetNbins()
1402 ndets = 2*ndet*oversample 1427 ndets = 2*ndet*oversample
@@ -1413,6 +1438,11 @@ class csroot2caldb(ctools.cscript): @@ -1413,6 +1438,11 @@ class csroot2caldb(ctools.cscript):
1413 dets_hi.append(det_hi) 1438 dets_hi.append(det_hi)
1414 dets2.append(det_val*det_val) 1439 dets2.append(det_val*det_val)
1415 1440
  1441 + # Log parameters
  1442 + self._log_value(gammalib.NORMAL, 'Number of DETXY bins', ndets)
  1443 + self._log_value(gammalib.NORMAL, 'Maximum DETXY', det_max)
  1444 + self._log_value(gammalib.NORMAL, 'DETXY binsize', det_bin)
  1445 +
1416 # Append DETX_LO, DETX_HI, DETY_LO and DETY_HI columns 1446 # Append DETX_LO, DETX_HI, DETY_LO and DETY_HI columns
1417 self._append_column_values(hdu, 'DETX_LO', 'deg', dets_lo) 1447 self._append_column_values(hdu, 'DETX_LO', 'deg', dets_lo)
1418 self._append_column_values(hdu, 'DETX_HI', 'deg', dets_hi) 1448 self._append_column_values(hdu, 'DETX_HI', 'deg', dets_hi)
@@ -1471,6 +1501,10 @@ class csroot2caldb(ctools.cscript): @@ -1471,6 +1501,10 @@ class csroot2caldb(ctools.cscript):
1471 scale : float, optional 1501 scale : float, optional
1472 Scaling factor for histogram values 1502 Scaling factor for histogram values
1473 """ 1503 """
  1504 + # Write header
  1505 + self._log_header3(gammalib.TERSE,
  1506 + 'Make 3D migration matrix data column "%s"' % name)
  1507 +
1474 # Extract Etrue, Eobs/Etrue and offset angle vectors 1508 # Extract Etrue, Eobs/Etrue and offset angle vectors
1475 etrue = array.GetXaxis() 1509 etrue = array.GetXaxis()
1476 netrue = etrue.GetNbins() 1510 netrue = etrue.GetNbins()
@@ -1483,6 +1517,11 @@ class csroot2caldb(ctools.cscript): @@ -1483,6 +1517,11 @@ class csroot2caldb(ctools.cscript):
1483 ewidth.append(pow(10.0, etrue.GetBinUpEdge(ieng+1) +6.0) - \ 1517 ewidth.append(pow(10.0, etrue.GetBinUpEdge(ieng+1) +6.0) - \
1484 pow(10.0, etrue.GetBinLowEdge(ieng+1)+6.0)) 1518 pow(10.0, etrue.GetBinLowEdge(ieng+1)+6.0))
1485 1519
  1520 + # Log parameters
  1521 + self._log_value(gammalib.NORMAL, 'Number of energies', netrue)
  1522 + self._log_value(gammalib.NORMAL, 'Number of migrations', nmigra)
  1523 + self._log_value(gammalib.NORMAL, 'Number of offsets', noffset)
  1524 +
1486 # Append axis columns to HDU 1525 # Append axis columns to HDU
1487 self._append_column_axis(hdu, 'ETRUE_LO', 'TeV', etrue, log=True) 1526 self._append_column_axis(hdu, 'ETRUE_LO', 'TeV', etrue, log=True)
1488 self._append_column_axis(hdu, 'ETRUE_HI', 'TeV', etrue, log=True) 1527 self._append_column_axis(hdu, 'ETRUE_HI', 'TeV', etrue, log=True)
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: 1.2.0 9 +Version: 1.2.1
10 Requires: 10 Requires:
11 -Requires.private: gammalib >= 1.2.0 11 +Requires.private: gammalib >= 1.2.1
12 Conflicts: 12 Conflicts:
13 Cflags: -I${includedir}/ctools @OPENMP_CXXFLAGS@ 13 Cflags: -I${includedir}/ctools @OPENMP_CXXFLAGS@
14 Libs: -L${libdir} -lctools 14 Libs: -L${libdir} -lctools
doc/Doxyfile
@@ -32,7 +32,7 @@ PROJECT_NAME = ctools @@ -32,7 +32,7 @@ PROJECT_NAME = ctools
32 # This could be handy for archiving the generated documentation or 32 # This could be handy for archiving the generated documentation or
33 # if some version control system is used. 33 # if some version control system is used.
34 34
35 -PROJECT_NUMBER = 1.2.0 35 +PROJECT_NUMBER = 1.2.1
36 36
37 # Using the PROJECT_BRIEF tag one can provide an optional one line description 37 # Using the PROJECT_BRIEF tag one can provide an optional one line description
38 # for a project that appears at the top of each page and should give viewer 38 # for a project that appears at the top of each page and should give viewer
doc/source/conf.py
@@ -69,7 +69,7 @@ copyright = u'2014-2016, ctools developers' @@ -69,7 +69,7 @@ copyright = u'2014-2016, ctools developers'
69 version = '1.2' 69 version = '1.2'
70 70
71 # The full version, including alpha/beta/rc tags. 71 # The full version, including alpha/beta/rc tags.
72 -release = '1.2.0' 72 +release = '1.2.1'
73 73
74 # The language for content autogenerated by Sphinx. Refer to documentation 74 # The language for content autogenerated by Sphinx. Refer to documentation
75 # for a list of supported languages. 75 # for a list of supported languages.
sonar-project.properties
1 # Required metadata 1 # Required metadata
2 sonar.projectKey=ctools 2 sonar.projectKey=ctools
3 sonar.projectName=ctools 3 sonar.projectName=ctools
4 -sonar.projectVersion=1.2.0 4 +sonar.projectVersion=1.2.1
5 5
6 # Description 6 # Description
7 sonar.projectDescription="Cherenkov Telescope Array Science Analysis Software" 7 sonar.projectDescription="Cherenkov Telescope Array Science Analysis Software"