Commit fb1fb026cdf6fde0dab3670c85732183c890b44a
1 parent
c325450d
Rename `GPar` to `GApplicationPar` (#1061)
Showing
3 changed files
with
54 additions
and
54 deletions
scripts/cspull.py
| ... | ... | @@ -87,28 +87,28 @@ class cspull(GApplication): |
| 87 | 87 | parfile = self.name+".par" |
| 88 | 88 | |
| 89 | 89 | try: |
| 90 | - pars = GPars(parfile) | |
| 90 | + pars = GApplicationPars(parfile) | |
| 91 | 91 | except: |
| 92 | 92 | # Signal if parfile was not found |
| 93 | 93 | sys.stdout.write("Parfile "+parfile+" not found. Create default parfile.\n") |
| 94 | 94 | |
| 95 | 95 | # Create default parfile |
| 96 | - pars = GPars() | |
| 97 | - pars.append(GPar("srcmdl","f","a","$GAMMALIB/share/models/crab.xml","","","Source model")) | |
| 98 | - pars.append(GPar("outfile","f","a","pull.dat","","","Output file name")) | |
| 99 | - pars.append(GPar("ntrials","i","a","10","","","Number of trials")) | |
| 100 | - pars.append(GPar("caldb","s","a","$GAMMALIB/share/caldb/cta","","","Calibration database")) | |
| 101 | - pars.append(GPar("irf","s","a","cta_dummy_irf","","","Instrument response function")) | |
| 102 | - pars.append(GPar("ra","r","a","83.6331","0","360","RA of pointing (deg)")) | |
| 103 | - pars.append(GPar("dec","r","a","22.0145","-90","90","Dec of pointing (deg)")) | |
| 104 | - pars.append(GPar("emin","r","a","0.1","0.0","","Lower energy limit (TeV)")) | |
| 105 | - pars.append(GPar("emax","r","a","100.0","0.0","","Upper energy limit (TeV)")) | |
| 106 | - pars.append(GPar("enumbins","i","a","0","","","Number of energy bins (0=unbinned)")) | |
| 107 | - pars.append(GPar("duration","r","a","180000.0","","","Effective exposure time (s)")) | |
| 108 | - pars.append(GPar("deadc","r","h","0.95","","","Deadtime correction factor")) | |
| 109 | - pars.append(GPar("rad","r","h","5.0","","","Radius of ROI (deg)")) | |
| 110 | - pars.append(GPar("npix","i","h","200","","","Number of pixels for binned")) | |
| 111 | - pars.append(GPar("binsz","r","h","0.05","","","Pixel size for binned (deg/pixel)")) | |
| 96 | + pars = GApplicationPars() | |
| 97 | + pars.append(GApplicationPar("srcmdl","f","a","$GAMMALIB/share/models/crab.xml","","","Source model")) | |
| 98 | + pars.append(GApplicationPar("outfile","f","a","pull.dat","","","Output file name")) | |
| 99 | + pars.append(GApplicationPar("ntrials","i","a","10","","","Number of trials")) | |
| 100 | + pars.append(GApplicationPar("caldb","s","a","$GAMMALIB/share/caldb/cta","","","Calibration database")) | |
| 101 | + pars.append(GApplicationPar("irf","s","a","cta_dummy_irf","","","Instrument response function")) | |
| 102 | + pars.append(GApplicationPar("ra","r","a","83.6331","0","360","RA of pointing (deg)")) | |
| 103 | + pars.append(GApplicationPar("dec","r","a","22.0145","-90","90","Dec of pointing (deg)")) | |
| 104 | + pars.append(GApplicationPar("emin","r","a","0.1","0.0","","Lower energy limit (TeV)")) | |
| 105 | + pars.append(GApplicationPar("emax","r","a","100.0","0.0","","Upper energy limit (TeV)")) | |
| 106 | + pars.append(GApplicationPar("enumbins","i","a","0","","","Number of energy bins (0=unbinned)")) | |
| 107 | + pars.append(GApplicationPar("duration","r","a","180000.0","","","Effective exposure time (s)")) | |
| 108 | + pars.append(GApplicationPar("deadc","r","h","0.95","","","Deadtime correction factor")) | |
| 109 | + pars.append(GApplicationPar("rad","r","h","5.0","","","Radius of ROI (deg)")) | |
| 110 | + pars.append(GApplicationPar("npix","i","h","200","","","Number of pixels for binned")) | |
| 111 | + pars.append(GApplicationPar("binsz","r","h","0.05","","","Pixel size for binned (deg/pixel)")) | |
| 112 | 112 | pars.append_standard() |
| 113 | 113 | pars.save(parfile) |
| 114 | 114 | ... | ... |
scripts/cssens.py
| ... | ... | @@ -98,31 +98,31 @@ class cssens(GApplication): |
| 98 | 98 | parfile = self.name+".par" |
| 99 | 99 | |
| 100 | 100 | try: |
| 101 | - pars = GPars(parfile) | |
| 101 | + pars = GApplicationPars(parfile) | |
| 102 | 102 | except: |
| 103 | 103 | # Signal if parfile was not found |
| 104 | 104 | sys.stdout.write("Parfile "+parfile+" not found. Create default parfile.\n") |
| 105 | 105 | |
| 106 | 106 | # Create default parfile |
| 107 | - pars = GPars() | |
| 108 | - pars.append(GPar("outfile","f","h","sensitivity.dat","","","Output file name")) | |
| 109 | - pars.append(GPar("caldb","s","a","$GAMMALIB/share/caldb/cta","","","Calibration database")) | |
| 110 | - pars.append(GPar("irf","s","a","cta_dummy_irf","","","Instrument response function")) | |
| 111 | - pars.append(GPar("type","s","a","point","","","Source model type (point/gauss/shell/disk)")) | |
| 112 | - pars.append(GPar("offset","r","a","0.0","0.0","","Source offset angle (deg)")) | |
| 113 | - pars.append(GPar("bkg","s","a","$GAMMALIB/share/models/bkg_dummy.txt","","","Background model file function (none=power law for E)")) | |
| 114 | - pars.append(GPar("duration","r","a","180000.0","","","Effective exposure time (s)")) | |
| 115 | - pars.append(GPar("rad","r","a","5.0","","","Radius of ROI (deg)")) | |
| 116 | - pars.append(GPar("enumbins","i","h","0","","","Number of energy bins (0=unbinned)")) | |
| 117 | - pars.append(GPar("npix","i","h","200","","","Number of pixels for binned")) | |
| 118 | - pars.append(GPar("binsz","r","h","0.05","","","Pixel size for binned (deg/pixel)")) | |
| 119 | - pars.append(GPar("sigma","r","h","5.0","","","Significance threshold")) | |
| 120 | - pars.append(GPar("ts_use","b","h","yes","","","Use TS?")) | |
| 121 | - pars.append(GPar("index","r","h","-2.48","","","Assumed spectral index")) | |
| 122 | - pars.append(GPar("radius","r","h","0.1","","","Extended source model radius")) | |
| 123 | - pars.append(GPar("width","r","h","0.05","","","Extended source model width")) | |
| 124 | - pars.append(GPar("max_iter","i","h","50","","","Maximum number of iterations")) | |
| 125 | - pars.append(GPar("num_avg","i","h","3","","","Number of iterations for sliding average")) | |
| 107 | + pars = GApplicationPars() | |
| 108 | + pars.append(GApplicationPar("outfile","f","h","sensitivity.dat","","","Output file name")) | |
| 109 | + pars.append(GApplicationPar("caldb","s","a","$GAMMALIB/share/caldb/cta","","","Calibration database")) | |
| 110 | + pars.append(GApplicationPar("irf","s","a","cta_dummy_irf","","","Instrument response function")) | |
| 111 | + pars.append(GApplicationPar("type","s","a","point","","","Source model type (point/gauss/shell/disk)")) | |
| 112 | + pars.append(GApplicationPar("offset","r","a","0.0","0.0","","Source offset angle (deg)")) | |
| 113 | + pars.append(GApplicationPar("bkg","s","a","$GAMMALIB/share/models/bkg_dummy.txt","","","Background model file function (none=power law for E)")) | |
| 114 | + pars.append(GApplicationPar("duration","r","a","180000.0","","","Effective exposure time (s)")) | |
| 115 | + pars.append(GApplicationPar("rad","r","a","5.0","","","Radius of ROI (deg)")) | |
| 116 | + pars.append(GApplicationPar("enumbins","i","h","0","","","Number of energy bins (0=unbinned)")) | |
| 117 | + pars.append(GApplicationPar("npix","i","h","200","","","Number of pixels for binned")) | |
| 118 | + pars.append(GApplicationPar("binsz","r","h","0.05","","","Pixel size for binned (deg/pixel)")) | |
| 119 | + pars.append(GApplicationPar("sigma","r","h","5.0","","","Significance threshold")) | |
| 120 | + pars.append(GApplicationPar("ts_use","b","h","yes","","","Use TS?")) | |
| 121 | + pars.append(GApplicationPar("index","r","h","-2.48","","","Assumed spectral index")) | |
| 122 | + pars.append(GApplicationPar("radius","r","h","0.1","","","Extended source model radius")) | |
| 123 | + pars.append(GApplicationPar("width","r","h","0.05","","","Extended source model width")) | |
| 124 | + pars.append(GApplicationPar("max_iter","i","h","50","","","Maximum number of iterations")) | |
| 125 | + pars.append(GApplicationPar("num_avg","i","h","3","","","Number of iterations for sliding average")) | |
| 126 | 126 | pars.append_standard() |
| 127 | 127 | pars.save(parfile) |
| 128 | 128 | ... | ... |
scripts/cstsdist.py
| ... | ... | @@ -88,28 +88,28 @@ class cstsdist(GApplication): |
| 88 | 88 | parfile = self.name+".par" |
| 89 | 89 | |
| 90 | 90 | try: |
| 91 | - pars = GPars(parfile) | |
| 91 | + pars = GApplicationPars(parfile) | |
| 92 | 92 | except: |
| 93 | 93 | # Signal if parfile was not found |
| 94 | 94 | sys.stdout.write("Parfile "+parfile+" not found. Create default parfile.\n") |
| 95 | 95 | |
| 96 | 96 | # Create default parfile |
| 97 | - pars = GPars() | |
| 98 | - pars.append(GPar("outfile","f","h","ts.dat","","","Output file name")) | |
| 99 | - pars.append(GPar("ntrials","i","a","10","","","Number of trials")) | |
| 100 | - pars.append(GPar("caldb","s","a","$GAMMALIB/share/caldb/cta","","","Calibration database")) | |
| 101 | - pars.append(GPar("irf","s","a","cta_dummy_irf","","","Instrument response function")) | |
| 102 | - pars.append(GPar("type","s","a","point","","","Source model type (point/gauss/shell/disk)")) | |
| 103 | - pars.append(GPar("index","r","h","-2.48","","","Spectral index")) | |
| 104 | - pars.append(GPar("offset","r","a","0.0","0.0","","Source offset angle (deg)")) | |
| 105 | - pars.append(GPar("bkg","s","a","$GAMMALIB/share/models/bkg_dummy.txt","","","Background model file function (none=power law for E)")) | |
| 106 | - pars.append(GPar("emin","r","a","0.1","0.0","","Lower energy limit (TeV)")) | |
| 107 | - pars.append(GPar("emax","r","a","100.0","0.0","","Upper energy limit (TeV)")) | |
| 108 | - pars.append(GPar("enumbins","i","a","0","","","Number of energy bins (0=unbinned)")) | |
| 109 | - pars.append(GPar("duration","r","a","180000.0","","","Effective exposure time (s)")) | |
| 110 | - pars.append(GPar("rad","r","h","5.0","","","Radius of ROI (deg)")) | |
| 111 | - pars.append(GPar("npix","i","h","200","","","Number of pixels for binned")) | |
| 112 | - pars.append(GPar("binsz","r","h","0.05","","","Pixel size for binned (deg/pixel)")) | |
| 97 | + pars = GApplicationPars() | |
| 98 | + pars.append(GApplicationPar("outfile","f","h","ts.dat","","","Output file name")) | |
| 99 | + pars.append(GApplicationPar("ntrials","i","a","10","","","Number of trials")) | |
| 100 | + pars.append(GApplicationPar("caldb","s","a","$GAMMALIB/share/caldb/cta","","","Calibration database")) | |
| 101 | + pars.append(GApplicationPar("irf","s","a","cta_dummy_irf","","","Instrument response function")) | |
| 102 | + pars.append(GApplicationPar("type","s","a","point","","","Source model type (point/gauss/shell/disk)")) | |
| 103 | + pars.append(GApplicationPar("index","r","h","-2.48","","","Spectral index")) | |
| 104 | + pars.append(GApplicationPar("offset","r","a","0.0","0.0","","Source offset angle (deg)")) | |
| 105 | + pars.append(GApplicationPar("bkg","s","a","$GAMMALIB/share/models/bkg_dummy.txt","","","Background model file function (none=power law for E)")) | |
| 106 | + pars.append(GApplicationPar("emin","r","a","0.1","0.0","","Lower energy limit (TeV)")) | |
| 107 | + pars.append(GApplicationPar("emax","r","a","100.0","0.0","","Upper energy limit (TeV)")) | |
| 108 | + pars.append(GApplicationPar("enumbins","i","a","0","","","Number of energy bins (0=unbinned)")) | |
| 109 | + pars.append(GApplicationPar("duration","r","a","180000.0","","","Effective exposure time (s)")) | |
| 110 | + pars.append(GApplicationPar("rad","r","h","5.0","","","Radius of ROI (deg)")) | |
| 111 | + pars.append(GApplicationPar("npix","i","h","200","","","Number of pixels for binned")) | |
| 112 | + pars.append(GApplicationPar("binsz","r","h","0.05","","","Pixel size for binned (deg/pixel)")) | |
| 113 | 113 | pars.append_standard() |
| 114 | 114 | pars.save(parfile) |
| 115 | 115 | ... | ... |