Commit 03b0aa5ac5a16707ac131b95fafb16187b249c20
1 parent
ecd46cb4
Add more example scripts to unit test
Showing
12 changed files
with
463 additions
and
137 deletions
.gitignore
| @@ -81,6 +81,7 @@ test/*.xml | @@ -81,6 +81,7 @@ test/*.xml | ||
| 81 | test/*.reg | 81 | test/*.reg |
| 82 | test/*.trs | 82 | test/*.trs |
| 83 | test/*.txt | 83 | test/*.txt |
| 84 | +test/*.eps | ||
| 84 | test/test_cscripts.sh | 85 | test/test_cscripts.sh |
| 85 | test/test_examples.sh | 86 | test/test_examples.sh |
| 86 | test/reports/*.xml | 87 | test/reports/*.xml |
examples/make_spectrum.py
| @@ -94,14 +94,14 @@ def make_spectrum(): | @@ -94,14 +94,14 @@ def make_spectrum(): | ||
| 94 | # ============= # | 94 | # ============= # |
| 95 | def plot_spectrum(spectrum, file=False): | 95 | def plot_spectrum(spectrum, file=False): |
| 96 | """ | 96 | """ |
| 97 | - Plot spectrum. | 97 | + Plot spectrum |
| 98 | 98 | ||
| 99 | Parameters | 99 | Parameters |
| 100 | ---------- | 100 | ---------- |
| 101 | spectrum : `~gammalib.GFits` | 101 | spectrum : `~gammalib.GFits` |
| 102 | Spectrum FITS file | 102 | Spectrum FITS file |
| 103 | - type : str, optional | ||
| 104 | - Plot type (blank means display on screen) | 103 | + file : bool, optional |
| 104 | + Plot into a file | ||
| 105 | """ | 105 | """ |
| 106 | # Extract columns from spectrum file | 106 | # Extract columns from spectrum file |
| 107 | table = spectrum.table(1) | 107 | table = spectrum.table(1) |
examples/show_butterfly.py
| 1 | #! /usr/bin/env python | 1 | #! /usr/bin/env python |
| 2 | # ========================================================================== | 2 | # ========================================================================== |
| 3 | -# This script shows how to plot a butterfly created with ctbutterfly | 3 | +# Shows butterfly diagram created with ctbutterfly |
| 4 | # | 4 | # |
| 5 | -# Copyright (C) 2014-2015 Michael Mayer | 5 | +# Copyright (C) 2014-2016 Michael Mayer |
| 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 |
| @@ -18,12 +18,12 @@ | @@ -18,12 +18,12 @@ | ||
| 18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | 18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 19 | # | 19 | # |
| 20 | # ========================================================================== | 20 | # ========================================================================== |
| 21 | -import gammalib | ||
| 22 | import sys | 21 | import sys |
| 22 | +import gammalib | ||
| 23 | try: | 23 | try: |
| 24 | import matplotlib.pyplot as plt | 24 | import matplotlib.pyplot as plt |
| 25 | except: | 25 | except: |
| 26 | - sys.exit("This script needs matplotlib") | 26 | + sys.exit('This script needs the "matplotlib" module') |
| 27 | 27 | ||
| 28 | 28 | ||
| 29 | # ============ # | 29 | # ============ # |
| @@ -32,8 +32,13 @@ except: | @@ -32,8 +32,13 @@ except: | ||
| 32 | if __name__ == "__main__": | 32 | if __name__ == "__main__": |
| 33 | 33 | ||
| 34 | # Check for given butterfly file | 34 | # Check for given butterfly file |
| 35 | - if not len(sys.argv) == 2: | ||
| 36 | - sys.exit("Usage: show_butterfly.py butterfly.txt") | 35 | + if len(sys.argv) < 2: |
| 36 | + sys.exit('Usage: show_butterfly.py butterfly.txt [file]') | ||
| 37 | + | ||
| 38 | + # Check if plotting in file is requested | ||
| 39 | + plotfile = '' | ||
| 40 | + if len(sys.argv) == 3: | ||
| 41 | + plotfile = sys.argv[2] | ||
| 37 | 42 | ||
| 38 | # Read given butterfly file | 43 | # Read given butterfly file |
| 39 | filename = sys.argv[1] | 44 | filename = sys.argv[1] |
| @@ -74,6 +79,11 @@ if __name__ == "__main__": | @@ -74,6 +79,11 @@ if __name__ == "__main__": | ||
| 74 | plt.grid() | 79 | plt.grid() |
| 75 | plt.plot(line_x,line_y,color='black',ls='-') | 80 | plt.plot(line_x,line_y,color='black',ls='-') |
| 76 | plt.fill(butterfly_x,butterfly_y,color='green',alpha=0.5) | 81 | plt.fill(butterfly_x,butterfly_y,color='green',alpha=0.5) |
| 77 | - plt.xlabel("Energy (MeV)") | ||
| 78 | - plt.ylabel(r"E dN/dE (MeV$^{-1}$ s$^{-1}$ cm$^{-2}$)") | ||
| 79 | - plt.show() | 82 | + plt.xlabel('Energy (MeV)') |
| 83 | + plt.ylabel('E dN/dE (MeV$^{-1}$ s$^{-1}$ cm$^{-2}$)') | ||
| 84 | + | ||
| 85 | + # Show spectrum or save it into file | ||
| 86 | + if len(plotfile) > 0: | ||
| 87 | + plt.savefig(plotfile) | ||
| 88 | + else: | ||
| 89 | + plt.show() |
examples/show_model.py
| 1 | #! /usr/bin/env python | 1 | #! /usr/bin/env python |
| 2 | # ========================================================================== | 2 | # ========================================================================== |
| 3 | -# This script shows a model | 3 | +# Shows the photon spectrum of a model |
| 4 | # | 4 | # |
| 5 | -# Copyright (C) 2015 Juergen Knoedlseder | 5 | +# Copyright (C) 2015-2016 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 |
| @@ -18,27 +18,41 @@ | @@ -18,27 +18,41 @@ | ||
| 18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | 18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 19 | # | 19 | # |
| 20 | # ========================================================================== | 20 | # ========================================================================== |
| 21 | -import gammalib | ||
| 22 | import sys | 21 | import sys |
| 23 | import math | 22 | import math |
| 23 | +import gammalib | ||
| 24 | try: | 24 | try: |
| 25 | import matplotlib.pyplot as plt | 25 | import matplotlib.pyplot as plt |
| 26 | except: | 26 | except: |
| 27 | - sys.exit("This script needs matplotlib") | 27 | + sys.exit('This script needs the "matplotlib" module') |
| 28 | 28 | ||
| 29 | 29 | ||
| 30 | # ======================= # | 30 | # ======================= # |
| 31 | # Plot spectral component # | 31 | # Plot spectral component # |
| 32 | # ======================= # | 32 | # ======================= # |
| 33 | -def plot_spectrum(model, emin=0.01, emax=100.0, enumbins=100): | 33 | +def plot_spectrum(model, emin=0.01, emax=100.0, enumbins=100, plotfile=''): |
| 34 | """ | 34 | """ |
| 35 | + Plot spectral model component | ||
| 36 | + | ||
| 37 | + Parameters | ||
| 38 | + ---------- | ||
| 39 | + model : `~gammalib.GModel` | ||
| 40 | + Model | ||
| 41 | + emin : float, optional | ||
| 42 | + Minimum energy (TeV) | ||
| 43 | + emax : float, optional | ||
| 44 | + Maximum energy (TeV) | ||
| 45 | + enumbins : integer, optional | ||
| 46 | + Number of energy bins | ||
| 47 | + plotfile : str, optional | ||
| 48 | + Name of plot file | ||
| 35 | """ | 49 | """ |
| 36 | # Get spectral component | 50 | # Get spectral component |
| 37 | spectrum = model.spectral() | 51 | spectrum = model.spectral() |
| 38 | 52 | ||
| 39 | # Setup energy axis | 53 | # Setup energy axis |
| 40 | - e_min = gammalib.GEnergy(emin, "TeV") | ||
| 41 | - e_max = gammalib.GEnergy(emax, "TeV") | 54 | + e_min = gammalib.GEnergy(emin, 'TeV') |
| 55 | + e_max = gammalib.GEnergy(emax, 'TeV') | ||
| 42 | ebounds = gammalib.GEbounds(enumbins, e_min, e_max) | 56 | ebounds = gammalib.GEbounds(enumbins, e_min, e_max) |
| 43 | 57 | ||
| 44 | # Setup model plot | 58 | # Setup model plot |
| @@ -48,7 +62,7 @@ def plot_spectrum(model, emin=0.01, emax=100.0, enumbins=100): | @@ -48,7 +62,7 @@ def plot_spectrum(model, emin=0.01, emax=100.0, enumbins=100): | ||
| 48 | max = 0.0 | 62 | max = 0.0 |
| 49 | for i in range(enumbins): | 63 | for i in range(enumbins): |
| 50 | energy = ebounds.elogmean(i) | 64 | energy = ebounds.elogmean(i) |
| 51 | - value = spectrum.eval(energy, gammalib.GTime()) | 65 | + value = spectrum.eval(energy) |
| 52 | if value > max: | 66 | if value > max: |
| 53 | max = value | 67 | max = value |
| 54 | if value < min: | 68 | if value < min: |
| @@ -57,22 +71,27 @@ def plot_spectrum(model, emin=0.01, emax=100.0, enumbins=100): | @@ -57,22 +71,27 @@ def plot_spectrum(model, emin=0.01, emax=100.0, enumbins=100): | ||
| 57 | y.append(value) | 71 | y.append(value) |
| 58 | 72 | ||
| 59 | # Set minimum and maximum | 73 | # Set minimum and maximum |
| 60 | - max = math.pow(10.0, math.log10(max)+1) | ||
| 61 | - if min < 0.0001*max: | ||
| 62 | - min = 0.0001*max | ||
| 63 | - min = math.pow(10.0, math.log10(min)-1) | 74 | + #max = math.pow(10.0, math.log10(max)+1) |
| 75 | + #if min < 0.0001*max: | ||
| 76 | + # min = 0.0001*max | ||
| 77 | + #min = math.pow(10.0, math.log10(min)-1) | ||
| 64 | 78 | ||
| 65 | 79 | ||
| 66 | # Show spectrum | 80 | # Show spectrum |
| 67 | plt.figure() | 81 | plt.figure() |
| 68 | - plt.title(model.name()+" ("+spectrum.type()+")") | 82 | + plt.title(model.name()+' ('+spectrum.type()+')') |
| 69 | plt.loglog() | 83 | plt.loglog() |
| 70 | plt.grid() | 84 | plt.grid() |
| 71 | plt.loglog(x, y, color='red') | 85 | plt.loglog(x, y, color='red') |
| 72 | - plt.xlabel("Energy [TeV]") | ||
| 73 | - plt.ylabel(r"dN/dE [ph s$^{-1}$ cm$^{-2}$ MeV$^{-1}$]") | ||
| 74 | - plt.ylim([min,max]) | ||
| 75 | - plt.show() | 86 | + plt.xlabel('Energy (TeV)') |
| 87 | + plt.ylabel(r'dN/dE (ph s$^{-1}$ cm$^{-2}$ MeV$^{-1}$)') | ||
| 88 | + #plt.ylim([min,max]) | ||
| 89 | + | ||
| 90 | + # Show spectrum or save it into file | ||
| 91 | + if len(plotfile) > 0: | ||
| 92 | + plt.savefig(plotfile) | ||
| 93 | + else: | ||
| 94 | + plt.show() | ||
| 76 | 95 | ||
| 77 | # Return | 96 | # Return |
| 78 | return | 97 | return |
| @@ -85,20 +104,24 @@ if __name__ == "__main__": | @@ -85,20 +104,24 @@ if __name__ == "__main__": | ||
| 85 | 104 | ||
| 86 | # Check for model filename | 105 | # Check for model filename |
| 87 | if len(sys.argv) < 2: | 106 | if len(sys.argv) < 2: |
| 88 | - sys.exit("Usage: show_model.py model.xml [index]") | 107 | + sys.exit('Usage: show_model.py model.xml [name] [file]') |
| 89 | 108 | ||
| 90 | # Get optional model index | 109 | # Get optional model index |
| 91 | - if len(sys.argv) == 3: | ||
| 92 | - index = int(sys.argv[2]) | 110 | + if len(sys.argv) >= 3: |
| 111 | + name = sys.argv[2] | ||
| 112 | + else: | ||
| 113 | + name = 0 | ||
| 114 | + if len(sys.argv) == 4: | ||
| 115 | + plotfile = sys.argv[3] | ||
| 93 | else: | 116 | else: |
| 94 | - index = 0 | 117 | + plotfile = '' |
| 95 | 118 | ||
| 96 | # Read models XML file | 119 | # Read models XML file |
| 97 | filename = sys.argv[1] | 120 | filename = sys.argv[1] |
| 98 | models = gammalib.GModels(filename) | 121 | models = gammalib.GModels(filename) |
| 99 | 122 | ||
| 100 | # Extract relevant model | 123 | # Extract relevant model |
| 101 | - model = models[index] | 124 | + model = models[name] |
| 102 | 125 | ||
| 103 | # Plot spectrum | 126 | # Plot spectrum |
| 104 | - plot_spectrum(model) | 127 | + plot_spectrum(model, plotfile=plotfile) |
examples/show_pha.py
| 1 | #! /usr/bin/env python | 1 | #! /usr/bin/env python |
| 2 | # ========================================================================== | 2 | # ========================================================================== |
| 3 | -# This script displays a spectrum in PHA format. | 3 | +# Show a spectrum in PHA format. |
| 4 | # | 4 | # |
| 5 | -# Required 3rd party modules: | ||
| 6 | -# - matplotlib | ||
| 7 | -# - numpy | ||
| 8 | -# | ||
| 9 | -# Copyright (C) 2013 Juergen Knoedlseder | 5 | +# Copyright (C) 2013-2016 Juergen Knoedlseder |
| 10 | # | 6 | # |
| 11 | # 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 |
| 12 | # 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 |
| @@ -25,17 +21,29 @@ | @@ -25,17 +21,29 @@ | ||
| 25 | import sys | 21 | import sys |
| 26 | import math | 22 | import math |
| 27 | import gammalib | 23 | import gammalib |
| 24 | +try: | ||
| 25 | + import matplotlib.pyplot as plt | ||
| 26 | +except: | ||
| 27 | + sys.exit('This script needs the "matplotlib" module') | ||
| 28 | 28 | ||
| 29 | 29 | ||
| 30 | # ================= # | 30 | # ================= # |
| 31 | # Show PHA spectrum # | 31 | # Show PHA spectrum # |
| 32 | # ================= # | 32 | # ================= # |
| 33 | -def show_pha(pha): | 33 | +def show_pha(pha, plotfile=''): |
| 34 | """ | 34 | """ |
| 35 | + Show PHA spectrum | ||
| 36 | + | ||
| 37 | + Parameters | ||
| 38 | + ---------- | ||
| 39 | + spectrum : `~gammalib.GPha` | ||
| 40 | + PHA file | ||
| 41 | + plotfile : str, optional | ||
| 42 | + Plot file name | ||
| 35 | """ | 43 | """ |
| 36 | # Create figure | 44 | # Create figure |
| 37 | plt.figure(1) | 45 | plt.figure(1) |
| 38 | - plt.title("PHA spectrum (" + pha.filename() + ")") | 46 | + plt.title('PHA spectrum (' + pha.filename() + ')') |
| 39 | 47 | ||
| 40 | # Generate energy vector | 48 | # Generate energy vector |
| 41 | energy = [] | 49 | energy = [] |
| @@ -63,16 +71,19 @@ def show_pha(pha): | @@ -63,16 +71,19 @@ def show_pha(pha): | ||
| 63 | 71 | ||
| 64 | # Set axes | 72 | # Set axes |
| 65 | if channels: | 73 | if channels: |
| 66 | - plt.xlabel("Channels") | 74 | + plt.xlabel('Channels') |
| 67 | else: | 75 | else: |
| 68 | - plt.xlabel("Energy (TeV)") | ||
| 69 | - plt.ylabel("Counts") | 76 | + plt.xlabel('Energy (TeV)') |
| 77 | + plt.ylabel('Counts') | ||
| 70 | 78 | ||
| 71 | - # Show plot | ||
| 72 | - plt.show() | 79 | + # Show spectrum or save it into file |
| 80 | + if len(plotfile) > 0: | ||
| 81 | + plt.savefig(plotfile) | ||
| 82 | + else: | ||
| 83 | + plt.show() | ||
| 73 | 84 | ||
| 74 | # Return | 85 | # Return |
| 75 | - #return | 86 | + return |
| 76 | 87 | ||
| 77 | 88 | ||
| 78 | # ======================== # | 89 | # ======================== # |
| @@ -81,27 +92,21 @@ def show_pha(pha): | @@ -81,27 +92,21 @@ def show_pha(pha): | ||
| 81 | if __name__ == '__main__': | 92 | if __name__ == '__main__': |
| 82 | 93 | ||
| 83 | # Print usage information | 94 | # Print usage information |
| 84 | - usage = "Usage: show_pha filename" \ | ||
| 85 | - " [-n bins] [-c column] [-t title] [-p plot]" | 95 | + usage = 'Usage: show_pha filename [file]' |
| 86 | if len(sys.argv) < 2: | 96 | if len(sys.argv) < 2: |
| 87 | print(usage) | 97 | print(usage) |
| 88 | sys.exit() | 98 | sys.exit() |
| 89 | 99 | ||
| 100 | + # Check if plotting in file is requested | ||
| 101 | + plotfile = '' | ||
| 102 | + if len(sys.argv) == 3: | ||
| 103 | + plotfile = sys.argv[2] | ||
| 104 | + | ||
| 90 | # Extract parameters | 105 | # Extract parameters |
| 91 | filename = sys.argv[1] | 106 | filename = sys.argv[1] |
| 92 | 107 | ||
| 93 | # Load PHA spectrum | 108 | # Load PHA spectrum |
| 94 | pha = gammalib.GPha(filename) | 109 | pha = gammalib.GPha(filename) |
| 95 | - #print(pha) | ||
| 96 | - | ||
| 97 | - # Try importing matplotlib | ||
| 98 | - try: | ||
| 99 | - import matplotlib.pyplot as plt | ||
| 100 | - has_matplotlib = True | ||
| 101 | - except ImportError: | ||
| 102 | - print("Matplotlib is not (correctly) installed on your system.") | ||
| 103 | - has_matplotlib = False | ||
| 104 | 110 | ||
| 105 | # Show PHA spectrum | 111 | # Show PHA spectrum |
| 106 | - if has_matplotlib: | ||
| 107 | - show_pha(pha) | 112 | + show_pha(pha, plotfile=plotfile) |
examples/show_pull_evolution.py
| 1 | #! /usr/bin/env python | 1 | #! /usr/bin/env python |
| 2 | # ========================================================================== | 2 | # ========================================================================== |
| 3 | -# This script displays the evolution of the pull distributions as function | ||
| 4 | -# of the number of samples. The pull distributions are generated using the | ||
| 5 | -# cspull script. The pull is defined by | 3 | +# Shows the evolution of the mean and rms pull |
| 6 | # | 4 | # |
| 7 | -# (fitted value - simulated value) / estimated error | ||
| 8 | -# | ||
| 9 | -# and the pull histogram allows to assess possible biases in the fit | ||
| 10 | -# parameters and errors. | ||
| 11 | -# | ||
| 12 | -# Required 3rd party modules: | ||
| 13 | -# - matplotlib | ||
| 14 | -# - numpy | ||
| 15 | -# | ||
| 16 | -# Copyright (C) 2015 Juergen Knoedlseder | 5 | +# Copyright (C) 2015-2016 Juergen Knoedlseder |
| 17 | # | 6 | # |
| 18 | # 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 |
| 19 | # 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 |
| @@ -29,10 +18,16 @@ | @@ -29,10 +18,16 @@ | ||
| 29 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | 18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 30 | # | 19 | # |
| 31 | # ========================================================================== | 20 | # ========================================================================== |
| 32 | -import matplotlib.pyplot as plt | ||
| 33 | -import numpy as np | ||
| 34 | import sys | 21 | import sys |
| 35 | import csv | 22 | import csv |
| 23 | +try: | ||
| 24 | + import matplotlib.pyplot as plt | ||
| 25 | +except: | ||
| 26 | + sys.exit('This script needs the "matplotlib" module') | ||
| 27 | +try: | ||
| 28 | + import numpy as np | ||
| 29 | +except: | ||
| 30 | + sys.exit('This script needs the "numpy" module') | ||
| 36 | 31 | ||
| 37 | 32 | ||
| 38 | # ====================== # | 33 | # ====================== # |
| @@ -40,7 +35,14 @@ import csv | @@ -40,7 +35,14 @@ import csv | ||
| 40 | # ====================== # | 35 | # ====================== # |
| 41 | def read_pull(filename, parname): | 36 | def read_pull(filename, parname): |
| 42 | """ | 37 | """ |
| 43 | - Read pull distribution. | 38 | + Read pull distribution |
| 39 | + | ||
| 40 | + Parameters | ||
| 41 | + ---------- | ||
| 42 | + filename : str | ||
| 43 | + Pull distribution ASCII file | ||
| 44 | + parname : str | ||
| 45 | + Parameter | ||
| 44 | """ | 46 | """ |
| 45 | # Initialise list | 47 | # Initialise list |
| 46 | values = [] | 48 | values = [] |
| @@ -58,9 +60,9 @@ def read_pull(filename, parname): | @@ -58,9 +60,9 @@ def read_pull(filename, parname): | ||
| 58 | try: | 60 | try: |
| 59 | index = row.index(parname) | 61 | index = row.index(parname) |
| 60 | except: | 62 | except: |
| 61 | - sys.stdout.write('ERROR: Parameter "'+parname+'" not found in list:\n') | 63 | + print('ERROR: Parameter "'+parname+'" not found in list:') |
| 62 | for p in row: | 64 | for p in row: |
| 63 | - sys.stdout.write(' "'+p+'"\n') | 65 | + print(' "'+p+'"') |
| 64 | raise NameError(parname) | 66 | raise NameError(parname) |
| 65 | 67 | ||
| 66 | # Handle data rows | 68 | # Handle data rows |
| @@ -83,11 +85,16 @@ def read_pull(filename, parname): | @@ -83,11 +85,16 @@ def read_pull(filename, parname): | ||
| 83 | if __name__ == '__main__': | 85 | if __name__ == '__main__': |
| 84 | 86 | ||
| 85 | # Print usage information | 87 | # Print usage information |
| 86 | - usage = "Usage: show_pull_evolution filename parname" | 88 | + usage = 'Usage: show_pull_evolution filename parname [file]' |
| 87 | if len(sys.argv) < 3: | 89 | if len(sys.argv) < 3: |
| 88 | - sys.stdout.write(usage+"\n") | 90 | + print(usage) |
| 89 | sys.exit() | 91 | sys.exit() |
| 90 | 92 | ||
| 93 | + # Check if plotting in file is requested | ||
| 94 | + plotfile = '' | ||
| 95 | + if len(sys.argv) == 4: | ||
| 96 | + plotfile = sys.argv[3] | ||
| 97 | + | ||
| 91 | # Extract parameters | 98 | # Extract parameters |
| 92 | filename = sys.argv[1] | 99 | filename = sys.argv[1] |
| 93 | parname = sys.argv[2] | 100 | parname = sys.argv[2] |
| @@ -106,17 +113,20 @@ if __name__ == '__main__': | @@ -106,17 +113,20 @@ if __name__ == '__main__': | ||
| 106 | rms.append(np.std(values[0:i])) | 113 | rms.append(np.std(values[0:i])) |
| 107 | 114 | ||
| 108 | # Plot mean and rms evolution | 115 | # Plot mean and rms evolution |
| 109 | - plt.semilogx(samples, mean, 'r-', label="Mean") | ||
| 110 | - plt.semilogx(samples, rms, 'b-', label="Std. deviation") | 116 | + plt.semilogx(samples, mean, 'r-', label='Mean') |
| 117 | + plt.semilogx(samples, rms, 'b-', label='Std. deviation') | ||
| 111 | 118 | ||
| 112 | # Set plot | 119 | # Set plot |
| 113 | - plt.xlabel("Samples") | ||
| 114 | - plt.ylabel("Value") | 120 | + plt.xlabel('Samples') |
| 121 | + plt.ylabel('Value') | ||
| 115 | plt.title(parname) | 122 | plt.title(parname) |
| 116 | plt.grid(True) | 123 | plt.grid(True) |
| 117 | 124 | ||
| 118 | # Set legend | 125 | # Set legend |
| 119 | - plt.legend(loc="upper left") | 126 | + plt.legend(loc='upper left') |
| 120 | 127 | ||
| 121 | - # Show histogram | ||
| 122 | - plt.show() | 128 | + # Show figure |
| 129 | + if len(plotfile) > 0: | ||
| 130 | + plt.savefig(plotfile) | ||
| 131 | + else: | ||
| 132 | + plt.show() |
examples/show_pull_histogram.py
| 1 | #! /usr/bin/env python | 1 | #! /usr/bin/env python |
| 2 | # ========================================================================== | 2 | # ========================================================================== |
| 3 | -# This script displays pull histograms that have been generated using the | ||
| 4 | -# cspull script. The pull is defined by | 3 | +# Shows the pull histogram |
| 5 | # | 4 | # |
| 6 | -# (fitted value - simulated value) / estimated error | ||
| 7 | -# | ||
| 8 | -# and the pull histogram allows to assess possible biases in the fit | ||
| 9 | -# parameters and errors. | ||
| 10 | -# | ||
| 11 | -# Required 3rd party modules: | ||
| 12 | -# - matplotlib | ||
| 13 | -# - numpy | ||
| 14 | -# | ||
| 15 | -# Copyright (C) 2011 Jurgen Knodlseder | 5 | +# Copyright (C) 2011-2016 Juergen Knoedlseder |
| 16 | # | 6 | # |
| 17 | # 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 |
| 18 | # 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 |
| @@ -28,11 +18,17 @@ | @@ -28,11 +18,17 @@ | ||
| 28 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | 18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 29 | # | 19 | # |
| 30 | # ========================================================================== | 20 | # ========================================================================== |
| 31 | -import matplotlib.mlab as mlab | ||
| 32 | -import matplotlib.pyplot as plt | ||
| 33 | -import numpy as np | ||
| 34 | import sys | 21 | import sys |
| 35 | import csv | 22 | import csv |
| 23 | +try: | ||
| 24 | + import matplotlib.pyplot as plt | ||
| 25 | + import matplotlib.mlab as mlab | ||
| 26 | +except: | ||
| 27 | + sys.exit('This script needs the "matplotlib" module') | ||
| 28 | +try: | ||
| 29 | + import numpy as np | ||
| 30 | +except: | ||
| 31 | + sys.exit('This script needs the "numpy" module') | ||
| 36 | 32 | ||
| 37 | 33 | ||
| 38 | # ====================== # | 34 | # ====================== # |
| @@ -40,7 +36,14 @@ import csv | @@ -40,7 +36,14 @@ import csv | ||
| 40 | # ====================== # | 36 | # ====================== # |
| 41 | def read_pull(filename, parname): | 37 | def read_pull(filename, parname): |
| 42 | """ | 38 | """ |
| 43 | - Read pull distribution. | 39 | + Read pull distribution |
| 40 | + | ||
| 41 | + Parameters | ||
| 42 | + ---------- | ||
| 43 | + filename : str | ||
| 44 | + Pull distribution ASCII file | ||
| 45 | + parname : str | ||
| 46 | + Parameter | ||
| 44 | """ | 47 | """ |
| 45 | # Initialise list | 48 | # Initialise list |
| 46 | values = [] | 49 | values = [] |
| @@ -58,9 +61,9 @@ def read_pull(filename, parname): | @@ -58,9 +61,9 @@ def read_pull(filename, parname): | ||
| 58 | try: | 61 | try: |
| 59 | index = row.index(parname) | 62 | index = row.index(parname) |
| 60 | except: | 63 | except: |
| 61 | - sys.stdout.write('ERROR: Parameter "'+parname+'" not found in list:\n') | 64 | + print('ERROR: Parameter "'+parname+'" not found in list:') |
| 62 | for p in row: | 65 | for p in row: |
| 63 | - sys.stdout.write(' "'+p+'"\n') | 66 | + print(' "'+p+'"') |
| 64 | raise NameError(parname) | 67 | raise NameError(parname) |
| 65 | 68 | ||
| 66 | # Handle data rows | 69 | # Handle data rows |
| @@ -83,9 +86,9 @@ def read_pull(filename, parname): | @@ -83,9 +86,9 @@ def read_pull(filename, parname): | ||
| 83 | if __name__ == '__main__': | 86 | if __name__ == '__main__': |
| 84 | 87 | ||
| 85 | # Print usage information | 88 | # Print usage information |
| 86 | - usage = "Usage: show_pull_histogram filename parname [bins]" | 89 | + usage = 'Usage: show_pull_histogram filename parname [bins] [file]' |
| 87 | if len(sys.argv) < 3: | 90 | if len(sys.argv) < 3: |
| 88 | - sys.stdout.write(usage+"\n") | 91 | + print(usage) |
| 89 | sys.exit() | 92 | sys.exit() |
| 90 | 93 | ||
| 91 | # Extract parameters | 94 | # Extract parameters |
| @@ -95,13 +98,17 @@ if __name__ == '__main__': | @@ -95,13 +98,17 @@ if __name__ == '__main__': | ||
| 95 | nbins = int(sys.argv[3]) | 98 | nbins = int(sys.argv[3]) |
| 96 | else: | 99 | else: |
| 97 | nbins = 50 | 100 | nbins = 50 |
| 101 | + if len(sys.argv) == 5: | ||
| 102 | + plotfile = sys.argv[4] | ||
| 103 | + else: | ||
| 104 | + plotfile = '' | ||
| 98 | 105 | ||
| 99 | # Read values from CSV file | 106 | # Read values from CSV file |
| 100 | values = read_pull(filename, parname) | 107 | values = read_pull(filename, parname) |
| 101 | 108 | ||
| 102 | # Create histogram | 109 | # Create histogram |
| 103 | n, bins, patches = plt.hist(values, nbins, range=[-4.0,4.0], | 110 | n, bins, patches = plt.hist(values, nbins, range=[-4.0,4.0], |
| 104 | - normed=True, facecolor='green') | 111 | + normed=True, facecolor='green') |
| 105 | 112 | ||
| 106 | # Create expected distribution | 113 | # Create expected distribution |
| 107 | y = mlab.normpdf(bins, 0.0, 1.0) | 114 | y = mlab.normpdf(bins, 0.0, 1.0) |
| @@ -116,5 +123,8 @@ if __name__ == '__main__': | @@ -116,5 +123,8 @@ if __name__ == '__main__': | ||
| 116 | plt.title(name) | 123 | plt.title(name) |
| 117 | plt.grid(True) | 124 | plt.grid(True) |
| 118 | 125 | ||
| 119 | - # Show histogram | ||
| 120 | - plt.show() | 126 | + # Show figure |
| 127 | + if len(plotfile) > 0: | ||
| 128 | + plt.savefig(plotfile) | ||
| 129 | + else: | ||
| 130 | + plt.show() |
test/data/butterfly.txt
0 → 100644
| 1 | +103514 7.97876e-15 7.61983e-15 8.34788e-15 | ||
| 2 | +110917 6.72257e-15 6.4272e-15 7.02571e-15 | ||
| 3 | +118850 5.66416e-15 5.42109e-15 5.91312e-15 | ||
| 4 | +127350 4.77239e-15 4.57237e-15 4.97683e-15 | ||
| 5 | +136458 4.02101e-15 3.8564e-15 4.18893e-15 | ||
| 6 | +146218 3.38794e-15 3.25246e-15 3.52586e-15 | ||
| 7 | +156675 2.85454e-15 2.743e-15 2.96785e-15 | ||
| 8 | +167880 2.40511e-15 2.31326e-15 2.49824e-15 | ||
| 9 | +179887 2.02645e-15 1.95077e-15 2.10302e-15 | ||
| 10 | +192752 1.7074e-15 1.64502e-15 1.7704e-15 | ||
| 11 | +206538 1.43859e-15 1.38713e-15 1.49045e-15 | ||
| 12 | +221309 1.21209e-15 1.16962e-15 1.25483e-15 | ||
| 13 | +237137 1.02126e-15 9.86165e-16 1.05651e-15 | ||
| 14 | +254097 8.6047e-16 8.31443e-16 8.89582e-16 | ||
| 15 | +272270 7.24996e-16 7.00958e-16 7.49072e-16 | ||
| 16 | +291743 6.10851e-16 5.90916e-16 6.30794e-16 | ||
| 17 | +312608 5.14678e-16 4.9812e-16 5.31227e-16 | ||
| 18 | +334965 4.33646e-16 4.1987e-16 4.47406e-16 | ||
| 19 | +358922 3.65372e-16 3.53889e-16 3.76836e-16 | ||
| 20 | +384592 3.07847e-16 2.98257e-16 3.17421e-16 | ||
| 21 | +412098 2.59379e-16 2.51353e-16 2.67393e-16 | ||
| 22 | +441570 2.18542e-16 2.1181e-16 2.25268e-16 | ||
| 23 | +473151 1.84135e-16 1.78475e-16 1.89793e-16 | ||
| 24 | +506991 1.55144e-16 1.50375e-16 1.59917e-16 | ||
| 25 | +543250 1.30718e-16 1.26691e-16 1.34754e-16 | ||
| 26 | +582103 1.10138e-16 1.06729e-16 1.13559e-16 | ||
| 27 | +623735 9.27973e-17 8.99058e-17 9.57049e-17 | ||
| 28 | +668344 7.81872e-17 7.57292e-17 8.06636e-17 | ||
| 29 | +716143 6.58773e-17 6.37836e-17 6.79909e-17 | ||
| 30 | +767361 5.55054e-17 5.37188e-17 5.7313e-17 | ||
| 31 | +822243 4.67666e-17 4.52393e-17 4.83151e-17 | ||
| 32 | +881049 3.94036e-17 3.80959e-17 4.07323e-17 | ||
| 33 | +944061 3.31998e-17 3.20787e-17 3.43416e-17 | ||
| 34 | +1.01158e+06 2.79728e-17 2.70103e-17 2.89551e-17 | ||
| 35 | +1.08393e+06 2.35687e-17 2.27416e-17 2.44147e-17 | ||
| 36 | +1.16145e+06 1.9858e-17 1.91465e-17 2.05873e-17 | ||
| 37 | +1.24451e+06 1.67315e-17 1.6119e-17 1.73606e-17 | ||
| 38 | +1.33352e+06 1.40973e-17 1.35697e-17 1.46403e-17 | ||
| 39 | +1.42889e+06 1.18778e-17 1.1423e-17 1.23467e-17 | ||
| 40 | +1.53109e+06 1.00077e-17 9.61563e-18 1.04128e-17 | ||
| 41 | +1.64059e+06 8.4321e-18 8.09391e-18 8.78208e-18 | ||
| 42 | +1.75792e+06 7.10453e-18 6.81279e-18 7.40699e-18 | ||
| 43 | +1.88365e+06 5.98598e-18 5.73426e-18 6.24739e-18 | ||
| 44 | +2.01837e+06 5.04354e-18 4.82635e-18 5.26946e-18 | ||
| 45 | +2.16272e+06 4.24948e-18 4.06207e-18 4.44474e-18 | ||
| 46 | +2.31739e+06 3.58043e-18 3.41874e-18 3.74917e-18 | ||
| 47 | +2.48313e+06 3.01672e-18 2.87723e-18 3.16252e-18 | ||
| 48 | +2.66073e+06 2.54177e-18 2.42144e-18 2.66772e-18 | ||
| 49 | +2.85102e+06 2.14159e-18 2.03782e-18 2.25037e-18 | ||
| 50 | +3.05492e+06 1.80441e-18 1.71493e-18 1.89835e-18 | ||
| 51 | +3.27341e+06 1.52032e-18 1.44319e-18 1.60142e-18 | ||
| 52 | +3.50752e+06 1.28096e-18 1.21448e-18 1.35096e-18 | ||
| 53 | +3.75837e+06 1.07928e-18 1.02201e-18 1.13968e-18 | ||
| 54 | +4.02717e+06 9.09359e-19 8.60023e-19 9.61461e-19 | ||
| 55 | +4.31519e+06 7.66188e-19 7.23704e-19 8.11119e-19 | ||
| 56 | +4.62381e+06 6.45558e-19 6.08984e-19 6.84293e-19 | ||
| 57 | +4.9545e+06 5.43921e-19 5.12443e-19 5.77303e-19 | ||
| 58 | +5.30884e+06 4.58285e-19 4.31203e-19 4.87047e-19 | ||
| 59 | +5.68853e+06 3.86132e-19 3.62839e-19 4.10905e-19 | ||
| 60 | +6.09537e+06 3.25339e-19 3.0531e-19 3.46669e-19 | ||
| 61 | +6.53131e+06 2.74117e-19 2.569e-19 2.92478e-19 | ||
| 62 | +6.99842e+06 2.30959e-19 2.16165e-19 2.4676e-19 | ||
| 63 | +7.49894e+06 1.94597e-19 1.81887e-19 2.0819e-19 | ||
| 64 | +8.03526e+06 1.63959e-19 1.53044e-19 1.7565e-19 | ||
| 65 | +8.60994e+06 1.38145e-19 1.28773e-19 1.48196e-19 | ||
| 66 | +9.22571e+06 1.16395e-19 1.08351e-19 1.25035e-19 | ||
| 67 | +9.88553e+06 9.80699e-20 9.11675e-20 1.05493e-19 | ||
| 68 | +1.05925e+07 8.26296e-20 7.67083e-20 8.9007e-20 | ||
| 69 | +1.13501e+07 6.96202e-20 6.45422e-20 7.50971e-20 | ||
| 70 | +1.21619e+07 5.86591e-20 5.43052e-20 6.33617e-20 | ||
| 71 | +1.30317e+07 4.94237e-20 4.56918e-20 5.34601e-20 | ||
| 72 | +1.39637e+07 4.16424e-20 3.84443e-20 4.51063e-20 | ||
| 73 | +1.49624e+07 3.50861e-20 3.23463e-20 3.80579e-20 | ||
| 74 | +1.60325e+07 2.95621e-20 2.72155e-20 3.2111e-20 | ||
| 75 | +1.71791e+07 2.49078e-20 2.28983e-20 2.70936e-20 | ||
| 76 | +1.84077e+07 2.09863e-20 1.9266e-20 2.28601e-20 | ||
| 77 | +1.97242e+07 1.76822e-20 1.62098e-20 1.92882e-20 | ||
| 78 | +2.11349e+07 1.48983e-20 1.36383e-20 1.62745e-20 | ||
| 79 | +2.26464e+07 1.25527e-20 1.14748e-20 1.37317e-20 | ||
| 80 | +2.42661e+07 1.05763e-20 9.65444e-21 1.15863e-20 | ||
| 81 | +2.60016e+07 8.91119e-21 8.12282e-21 9.77606e-21 | ||
| 82 | +2.78612e+07 7.5082e-21 6.83419e-21 8.24867e-21 | ||
| 83 | +2.98538e+07 6.32609e-21 5.74997e-21 6.95995e-21 | ||
| 84 | +3.1989e+07 5.3301e-21 4.83773e-21 5.87259e-21 | ||
| 85 | +3.42768e+07 4.49092e-21 4.07022e-21 4.95511e-21 | ||
| 86 | +3.67282e+07 3.78386e-21 3.42447e-21 4.18097e-21 | ||
| 87 | +3.9355e+07 3.18813e-21 2.88116e-21 3.5278e-21 | ||
| 88 | +4.21697e+07 2.68618e-21 2.42404e-21 2.97667e-21 | ||
| 89 | +4.51856e+07 2.26327e-21 2.03945e-21 2.51165e-21 | ||
| 90 | +4.84172e+07 1.90693e-21 1.71587e-21 2.11927e-21 | ||
| 91 | +5.188e+07 1.6067e-21 1.44362e-21 1.7882e-21 | ||
| 92 | +5.55904e+07 1.35374e-21 1.21457e-21 1.50885e-21 | ||
| 93 | +5.95662e+07 1.14061e-21 1.02186e-21 1.27314e-21 | ||
| 94 | +6.38263e+07 9.61027e-22 8.59731e-22 1.07426e-21 | ||
| 95 | +6.83912e+07 8.09721e-22 7.23319e-22 9.06442e-22 | ||
| 96 | +7.32825e+07 6.82237e-22 6.0855e-22 7.64845e-22 | ||
| 97 | +7.85236e+07 5.74825e-22 5.11991e-22 6.45368e-22 | ||
| 98 | +8.41395e+07 4.84324e-22 4.30753e-22 5.44554e-22 | ||
| 99 | +9.01571e+07 4.08071e-22 3.62405e-22 4.59489e-22 | ||
| 100 | +9.66051e+07 3.43824e-22 3.04901e-22 3.87712e-22 |
test/data/pha.fits
0 → 100644
No preview for this file type
test/data/pull.dat
0 → 100644
| 1 | +LogL,Sim_Events,Npred_Events,Crab_Prefactor,Pull_Crab_Prefactor,Unc_Crab_Prefactor,Crab_Index,Pull_Crab_Index,Unc_Crab_Index,Background_Prefactor,Pull_Background_Prefactor,Unc_Background_Prefactor,Background_Index,Pull_Background_Index,Unc_Background_Index | ||
| 2 | +104702.14348660898,15105.0,15104.999075727912,5.67748323458501e-16,-0.08501991498574554,2.6484107186845484e-17,-2.512994429094607,-1.1338279073158557,0.02910003262551158,0.9958218078266116,-0.17872001258319373,0.023378423675096273,-0.012229059990362811,-0.9236754329409402,0.013239563979119857 | ||
| 3 | +103330.80595191609,14818.0,14817.997797150003,5.732404092766631e-16,0.12283753926158997,2.637963358873928e-17,-2.484339613991382,-0.1554901325428316,0.027909256493730588,0.9787908971847574,-0.9101986145091182,0.023301620632196762,-0.008200032682593691,-0.6103278351854464,0.013435455848252658 | ||
| 4 | +104268.96595026793,14979.0,14978.999805565223,5.572825610413261e-16,-0.48658024310290293,2.6136365253088216e-17,-2.4950417511405485,-0.516821157597015,0.02910436409083146,1.0063046580826853,0.2716574371824787,0.02320811882816348,-0.0008417569678340521,-0.06468934227489305,0.013012297516599597 | ||
| 5 | +104821.06173253663,15107.0,15106.996064070843,5.572524365485819e-16,-0.4875817324560644,2.614446482070941e-17,-2.488742729886503,-0.3182574459681672,0.027470621653193025,0.9996316452115123,-0.015557106670414662,0.023677589688849032,-0.010871023195874276,-0.8107102927475592,0.013409257651129044 | ||
| 6 | +103881.48989070744,14862.0,14861.992397431473,5.301740735337788e-16,-1.5134244536513575,2.631510702112374e-17,-2.465301587043766,0.4827690936075433,0.030446052058549868,1.0115707161034393,0.4942920042462879,0.023408665331503164,0.0048734492051994045,0.3732789541610912,0.013055783485441917 | ||
| 7 | +104709.9140731044,15024.0,15023.989651557333,5.226837712898727e-16,-1.7954633953701884,2.6353212675979732e-17,-2.4343195831835844,1.5525972082532988,0.029421936722278975,1.017947066365573,0.7598967774868103,0.02361776875134134,0.0009326118036593681,0.07132952806775084,0.013074694715119194 | ||
| 8 | +103713.58340281199,14892.0,14891.999561522098,5.591199213471972e-16,-0.41862333613425523,2.599013889974217e-17,-2.470115751370293,0.35799682935892585,0.027609877571840587,0.9794463837010542,-0.8909844728935377,0.023068433765401575,-0.012917295469889406,-0.9740485577904611,0.013261449202482362 | ||
| 9 | +104795.70589373197,15029.0,15028.996906992426,5.435055239409328e-16,-1.0152303535510279,2.609700937959154e-17,-2.4655187514911407,0.49983528642007014,0.028972041194964666,1.0209631987169243,0.8832401674398217,0.023734426365241833,0.00466053101676357,0.3544111893768436,0.013150067369368664 | ||
| 10 | +104193.29654018967,14931.0,14930.996770551044,5.485461677632551e-16,-0.8193085256981937,2.6185291088558448e-17,-2.479088507285966,0.031657689546980165,0.028792142669831974,1.0185759089559494,0.7867635712209643,0.023610535153682555,0.008184752146355114,0.6243663808647385,0.013108893106991681 | ||
| 11 | +103628.40847429863,14848.0,14847.998122677556,6.014015930608307e-16,1.1849643924993984,2.6500030937298085e-17,-2.473150703559013,0.25987554591515094,0.026356063695286987,0.9902956776180022,-0.4187159470974005,0.02317638592289015,0.001885900145097897,0.14262284727070834,0.013222987629172232 | ||
| 12 | +105660.09206884849,15205.0,15204.992131202547,6.109854020247515e-16,1.5187149825791957,2.6986895167878697e-17,-2.4922552592625755,-0.44934245174528803,0.0272737623943052,1.00323842606026,0.13976115495783228,0.023171145524928653,-0.005994371257142875,-0.46075233874827176,0.013009963820103039 | ||
| 13 | +103835.59625385483,14858.0,14857.999995507591,5.297499346626201e-16,-1.54328568208427,2.6080761199715524e-17,-2.4319384773924724,1.701399801117752,0.028248223948276648,1.0130018036654878,0.5601780025624995,0.023210128934038485,0.006713522884626453,0.5203716357596322,0.012901400505479386 | ||
| 14 | +103482.23089354827,14807.0,14806.999524388077,5.736758548183581e-16,0.13761738296308404,2.6710686827580283e-17,-2.4701072439260923,0.3421196454712564,0.028916071336040444,0.9891275161084382,-0.4697332187670207,0.02314608262132377,-0.0006918586515145906,-0.05255682430971379,0.013164011726384277 | ||
| 15 | +102857.43398505163,14731.0,14730.999998518842,5.258007078860843e-16,-1.7041864102309696,2.5935714455043313e-17,-2.4853332222867714,-0.17651127204646544,0.03021462722996824,0.9985936056978045,-0.060149237976978034,0.023381747624695796,0.0019325678652796843,0.14603466473388227,0.013233624145345124 | ||
| 16 | +103817.91519576444,14910.0,14909.994926336014,5.329622298577745e-16,-1.4389390287441313,2.5739638304585517e-17,-2.4916943762429473,-0.39969910169305867,0.02925794977624896,1.0079906020378802,0.3407215111753502,0.023452003398070874,0.00020664358393950301,0.015738123620475775,0.013130128401752638 | ||
| 17 | +103967.78649231851,14870.0,14869.990058174044,5.260603968355675e-16,-1.6789644755360136,2.6170656857051498e-17,-2.4301686389439427,1.7352508788074,0.02871709311007826,1.0126332673580076,0.536452771161907,0.02354963575012417,0.005447900085284499,0.4147492279428597,0.013135407417889301 | ||
| 18 | +105284.40661958465,15058.0,15057.999998318428,4.927243299991711e-16,-2.9598366118818897,2.6108086402680312e-17,-2.4504493609494307,0.9673695847716703,0.03054741384860079,1.0639477867734564,2.6531725316838397,0.0241023853555697,0.02273846071513058,1.7729798337272424,0.012824996811908856 | ||
| 19 | +104830.07226830821,15032.0,15031.998093973076,5.743212958004981e-16,0.16282839716227676,2.653895681470984e-17,-2.460255056292079,0.7331750878331816,0.02693073460293763,1.009527339928993,0.40649631413313464,0.023437703117457166,0.0017910275983860455,0.13653669474155755,0.013117554967740933 | ||
| 20 | +104698.0498891591,15040.0,15039.998968232076,5.570480545515681e-16,-0.4911050777527014,2.6373063597102404e-17,-2.4920533487352197,-0.4183571629577559,0.02881114464493293,1.0144387152840497,0.6180934305102588,0.0233600853387651,0.0013844182971720093,0.10655399897505911,0.012992645142263101 | ||
| 21 | +104925.21327728468,15098.0,15097.992620766281,5.87969306777613e-16,0.6774288392926258,2.6525748145556783e-17,-2.5084885893716833,-1.0402720874605131,0.027385709676426055,1.0166071274045811,0.716918888388743,0.023164583432730087,0.003874758455068439,0.30154828940328254,0.012849545466618257 | ||
| 22 | +103716.61350507324,14871.0,14870.999265696919,5.610566829273711e-16,-0.33697545311885546,2.653996601192925e-17,-2.454976233044967,0.886385961633361,0.028231231132001506,0.9787988077612177,-0.922234954456611,0.022988927210283613,-0.011704744624020038,-0.8844478536183279,0.013233956729201437 | ||
| 23 | +103344.09380500649,14825.0,14824.999999989699,5.185881816208363e-16,-1.9630789475358086,2.6189378905876087e-17,-2.418893532303184,2.1636019917057876,0.028242933742466933,0.9802133791662438,-0.8562764603125603,0.02310774819914305,-0.013591256173913914,-1.026686644454609,0.01323797893673175 | ||
| 24 | +105469.3219667073,15214.0,15213.997120280635,5.796556830349523e-16,0.36143547823531713,2.6714818041924188e-17,-2.481092011680722,-0.03892934595915295,0.028051118091422435,0.9960380118113645,-0.16810935916980949,0.023567921549408868,-0.014903616203581289,-1.1156393733398904,0.013358811601426653 | ||
| 25 | +104469.9971681874,14961.0,14960.999082266428,5.947706132978403e-16,0.9305884258012391,2.6618226286784883e-17,-2.475757601829857,0.1572808660063672,0.02697339020228572,0.9946878034334904,-0.22520963190307067,0.023587785840331894,-0.0017152659481122583,-0.12790022377679958,0.01341096909342076 | ||
| 26 | +104826.19001967587,15063.0,15062.99608195958,5.287050347495291e-16,-1.5838597523756837,2.6072362271047778e-17,-2.4579789012405966,0.7746752179149065,0.028426233665606017,1.0185925724596263,0.7958686132990104,0.02336135908483304,-0.0002351029057570468,-0.018165082808064857,0.012942572750214319 | ||
| 27 | +103320.95695538132,14818.0,14817.998687527173,5.478498323029024e-16,-0.8523687875773152,2.598660112843289e-17,-2.490995186934019,-0.37945854402407125,0.028975989886582468,0.9953315815622235,-0.19898386538883064,0.02346129133964744,-0.0013328500645812436,-0.09997748749545347,0.01333150190078397 | ||
| 28 | +104825.19976994366,15116.0,15115.990754728477,5.315233940698427e-16,-1.460682378789519,2.6341528102805798e-17,-2.464718006751812,0.5076150170072764,0.030105479026773865,0.9928387367913682,-0.3049904020195074,0.023480290400003188,-0.018504566807966617,-1.3859269563155745,0.01335176195516118 | ||
| 29 | +103770.47872478547,14858.0,14857.991542917502,5.241689052795333e-16,-1.7674486406832426,2.5930651485720014e-17,-2.470999774704249,0.31047198034973555,0.028988848802434315,1.0142624255798223,0.613387112964016,0.02325191592451823,0.005780894385199397,0.4468102900554024,0.012938140669237033 | ||
| 30 | +103629.36892843783,14923.0,14922.999996487131,5.984682923028192e-16,1.0727263172672183,2.653826222455558e-17,-2.517783256274881,-1.3204723419015199,0.028613440112249505,0.9670801291995181,-1.4156504768341795,0.023254236366380916,-0.017944371819906522,-1.3217953180960127,0.013575756831817646 | ||
| 31 | +104202.31840266004,14969.0,14968.993306219852,6.11363636982842e-16,1.5511916803318888,2.6665716111881122e-17,-2.4805177040241033,-0.01902684336053044,0.027209138914617383,0.9743574698978508,-1.1040125515345534,0.02322666537305819,-0.012864906504281222,-0.9561276967352017,0.013455217904689712 | ||
| 32 | +104558.3210911674,14988.0,14987.99592260394,5.727035536558679e-16,0.10076888899713153,2.6829249411937305e-17,-2.4539572754877907,0.9040406708094028,0.028807027552082087,0.991942847147923,-0.3490713839169001,0.02308167676670701,-0.007233321441344711,-0.5529892440587004,0.013080401687843472 | ||
| 33 | +103295.47162555656,14883.0,14883.000000254477,5.800709280699981e-16,0.3789335257832652,2.6577031021948253e-17,-2.498719352789656,-0.6638277678957628,0.028199110816038476,0.9595872183999479,-1.7482932734147603,0.023115562025310562,-0.02304437391034645,-1.6988602430501567,0.013564608392372682 | ||
| 34 | +103258.47720670803,14845.0,14844.992307538843,5.83283553420523e-16,0.4952239600807473,2.6823325386673746e-17,-2.4589665237005023,0.7632059346150839,0.02755937204564027,0.964755489938738,-1.5351536401647652,0.022958294947911025,-0.016523138292911025,-1.2320888966887555,0.01341067055901326 | ||
| 35 | +103657.9671271524,14817.0,14816.999863026358,5.363242117977063e-16,-1.2786443217150414,2.6337103782797478e-17,-2.4323288184790695,1.6135859025493344,0.029543627919414728,1.0151591013135277,0.6351636323121661,0.023866450379636053,0.010915006913822117,0.8190878811605987,0.013325806869900458 | ||
| 36 | +104392.7082185512,15006.0,15005.995853606486,6.005823640352908e-16,1.1354123615360034,2.6935028251690447e-17,-2.4730683275167515,0.25611675736022566,0.027064501966574228,0.9714394796871246,-1.2460905368592647,0.022920100480709322,-0.017794798460961776,-1.3401186899781854,0.013278524203890809 | ||
| 37 | +105182.36065597368,15075.0,15074.989261140847,5.26313996325609e-16,-1.67692009148971,2.6051332974120466e-17,-2.4565236365198113,0.8036379946781819,0.029212610199683024,1.029479540250354,1.2428947693473755,0.023718452259504866,0.005601907621198788,0.43008379976278804,0.013025153759077906 | ||
| 38 | +103071.25151722605,14836.0,14835.999997691571,5.626870367730519e-16,-0.2758504395736606,2.651060929339331e-17,-2.4857663826203016,-0.19466445034259733,0.02962216578401001,0.9595379837552862,-1.7643536985481396,0.022933052640187388,-0.022964614426049572,-1.7082617255518946,0.013443264625407625 | ||
| 39 | +103697.65696037607,14939.0,14938.998760928765,5.389129205397533e-16,-1.1876025861552415,2.6176331899788434e-17,-2.4690490243020475,0.3886240085819805,0.02817884499187428,0.9885163863773131,-0.49579679121988196,0.0231619361521725,-0.012105401262481892,-0.9167134357594129,0.01320521854515384 | ||
| 40 | +104637.09745185435,15053.0,15052.996846537539,5.406589368501109e-16,-1.1101425795758761,2.6429995290423552e-17,-2.4389502165668464,1.4305536253574138,0.028695032961730167,0.9973647045748609,-0.11185075823051355,0.02356081860176562,-0.010884674103109395,-0.8187292691775412,0.013294595066869482 | ||
| 41 | +104582.78060549527,15024.0,15023.999395677984,5.827997309903262e-16,0.48195052823758067,2.6558184378659893e-17,-2.480763172768796,-0.027230974562203435,0.028025907301000918,0.9972408492496609,-0.11684592426392378,0.023613581455411925,-0.004849155581888444,-0.36150282462815947,0.013413880201008851 | ||
| 42 | +104660.06320954843,15025.0,15024.998351527545,5.950507262965721e-16,0.9335275835620825,2.6834478956674745e-17,-2.468672941074628,0.4151788322094137,0.027282361350393892,0.9942447528437467,-0.24704233712761414,0.023296602611399077,-0.004813342700068887,-0.3639786391517183,0.013224245003186924 | ||
| 43 | +105487.22379340562,15160.0,15159.998753761023,5.897989793185405e-16,0.7404510509478629,2.6739079231767564e-17,-2.4830216972591455,-0.10999404551766875,0.027471462158922832,1.008007621452472,0.3392549160552585,0.023603553179367128,-0.003582415027088905,-0.2709663149118288,0.013220886988312945 | ||
| 44 | +104309.2333224919,14961.0,14960.997133833138,5.993271060876569e-16,1.1023581510449902,2.6603972637981608e-17,-2.4663916652348883,0.5047187705067517,0.026962212543529037,1.0006059944066537,0.02571854685831731,0.023562544571124427,0.002877938002773262,0.2161085252295913,0.013317096119719353 | ||
| 45 | +104536.81282712151,14994.0,14993.997986296345,5.649645367970281e-16,-0.1890146539982087,2.6640596887369527e-17,-2.445895378373151,1.2164245981656017,0.02803677406579858,0.9871622217101877,-0.5497357570786212,0.02335263465129891,-0.011401907900413608,-0.8561347270640302,0.01331788974325867 | ||
| 46 | +104885.66713609539,15058.0,15057.999302468945,5.85376938187508e-16,0.5763874122125322,2.667812978163725e-17,-2.4783224283833145,0.061953861563189286,0.027077757130190266,1.011221208894034,0.4738519298700737,0.023680834004645206,0.0027051157314355177,0.20430259331033007,0.01324073124870481 | ||
| 47 | +103965.1770144278,14841.0,14840.999947621616,5.441964953783418e-16,-0.9786223699914871,2.636717227492218e-17,-2.4240347973833023,2.0660578382534425,0.027087916698405833,1.0048749802449943,0.2084331684438968,0.02338869711279427,0.004696774739682412,0.3576192508777786,0.013133450529170757 | ||
| 48 | +104657.89204800228,15025.0,15024.997235329069,5.291370559902183e-16,-1.5604400748894864,2.618680759828323e-17,-2.4474869070028125,1.119624494026985,0.029039283412107895,1.0070782890882277,0.3024366368726101,0.02340420513011186,-0.005298128388872043,-0.4048299005085303,0.013087295138567476 | ||
| 49 | +105104.3320267707,15071.0,15070.991729175797,5.95019096110726e-16,0.9335257688335624,2.6800648622680576e-17,-2.48966742734985,-0.3400391003696072,0.028430340332455842,1.0279217001184597,1.1706788386728464,0.02385086259021603,0.01347745991263468,1.0255680015129696,0.013141459067318844 | ||
| 50 | +103117.18933059537,14779.0,14778.999954219906,5.741061709636474e-16,0.1552774697240199,2.6444087290612467e-17,-2.5085237338167152,-0.9578959261781123,0.029777487341992842,0.9880764025321682,-0.5036977763199469,0.02367212647819584,-0.0007966132391824033,-0.05871465634982645,0.013567536433086148 | ||
| 51 | +103861.51126322581,14909.0,14908.999988128835,5.141729840097847e-16,-2.147589053088375,2.5995204208147898e-17,-2.4563869001257395,0.8147506117659684,0.0289819971083903,1.001915565907135,0.08215253976479471,0.023317184260150284,-0.005365587573949675,-0.4086698661866238,0.01312939371825232 | ||
| 52 | +104401.21304313006,15015.0,15014.998970160144,5.994262650853293e-16,1.0978905429865868,2.6802549009376762e-17,-2.4967114366338805,-0.5986746885080364,0.02791405241388654,0.9947189099510139,-0.22577026819208507,0.023391432766040707,-0.004090920537099004,-0.30811253302204894,0.013277358428020362 | ||
| 53 | +103896.10903963698,14907.0,14906.999883600616,5.868618849352218e-16,0.6376991535457983,2.6441755240640774e-17,-2.479523442602133,0.017226036087355272,0.027664948305589025,0.9909518757304067,-0.3908429511409154,0.023150281316781655,-0.002695578042956474,-0.20441807152789476,0.013186593645115359 | ||
| 54 | +103877.93353330657,14893.0,14892.999790511029,5.558775494680619e-16,-0.5356629666367859,2.6364433256618963e-17,-2.4743403482955824,0.2062639870749244,0.02743887473852516,1.0021831242943509,0.09496376921188177,0.022989023208207993,0.0008862487268151458,0.06861458581377454,0.01291633136459492 | ||
| 55 | +103396.93676252602,14770.0,14769.999940468431,5.867378273072098e-16,0.6352366873526242,2.6348961954583328e-17,-2.5155847264284814,-1.2077020193866677,0.029464823157746442,1.015575822278027,0.6678015218032541,0.023324029325311725,0.018553263639159025,1.4254318720711299,0.013015889431601825 | ||
| 56 | +104160.03334950031,14964.0,14963.999998356765,6.10907582479636e-16,1.520382351595521,2.690611505501016e-17,-2.470844076924422,0.34594540723430006,0.026466381354145058,0.9927990773010172,-0.3077142659053865,0.023401328754763813,-0.0006925360964855318,-0.05198559811791703,0.01332169142143325 | ||
| 57 | +104864.6850193089,15060.0,15059.999218909168,5.609746644889459e-16,-0.3411527664813018,2.6455407658400925e-17,-2.4647004340264353,0.5481903216886338,0.027909223071352622,1.0027414961956898,0.11570915352832659,0.02369299326883945,-0.005698317662346879,-0.4266719822022961,0.013355265637398148 | ||
| 58 | +104923.17543779277,15101.0,15100.995028939238,6.127117410688088e-16,1.584235014851103,2.69604829260911e-17,-2.503434209444339,-0.8389182406124437,0.02793384183330101,1.0016273884843798,0.06972600471156862,0.02333976385298056,-0.0021331039675606374,-0.1622460782952347,0.013147337611939605 | ||
| 59 | +104453.17589728598,14909.0,14908.97953769627,5.536892055352507e-16,-0.6201645362100462,2.630075328787414e-17,-2.4540288821633847,0.9320828943896502,0.02786352801123104,1.0282733858014168,1.2048710613023608,0.023465901630051383,0.016505203933255115,1.281884889389383,0.01287573016101099 | ||
| 60 | +104688.55914493323,15031.0,15030.991877826402,6.006938103496527e-16,1.1617511752543976,2.6420296362456006e-17,-2.499085904547056,-0.7049249572708577,0.027075087000675516,1.017186344545262,0.733530932235582,0.02342961119973933,0.009323142088312936,0.7143190125704435,0.013051790480508207 | ||
| 61 | +104926.93916741286,14995.0,14994.999995528324,5.463460924576351e-16,-0.9060463828756001,2.610672918012471e-17,-2.5100838929434004,-1.0195942133745202,0.029505750963251018,1.0595024692788106,2.4864521555702046,0.023930671316362114,0.029147843606924958,2.2708541683724275,0.01283562987570262 | ||
| 62 | +104418.96129561374,14975.0,14974.999993368268,5.131487853632615e-16,-2.168120600530305,2.6221426346317257e-17,-2.4229966833284244,1.9386863136486103,0.029403063440570344,1.021692983447443,0.9054165163310347,0.023959120533109186,0.004508823226188785,0.3403330078401741,0.013248268966923719 | ||
| 63 | +104597.41903067115,15024.0,15023.998585086974,5.5052416135314e-16,-0.7400989417831648,2.6315182399714976e-17,-2.4745524720532823,0.18891505066199857,0.028835859967897517,0.9960930724767406,-0.1660999857570656,0.023521540386966532,-0.009836850928478167,-0.7370514625111277,0.013346219943671375 | ||
| 64 | +105023.41205975645,15104.0,15103.99832493881,5.797871057178e-16,0.36796529273395895,2.659790450638014e-17,-2.4868954513434605,-0.2490035791048457,0.02769217763153948,0.9920885937026824,-0.3372923372634315,0.023455636026319258,-0.01239104177720175,-0.9265919584774807,0.013372705929330483 | ||
| 65 | +103289.81254198536,14773.0,14772.998796750477,5.619254179684634e-16,-0.3038067169570706,2.6578023397282623e-17,-2.482157660822906,-0.07419044378169867,0.029082732396842604,1.0184661779445874,0.779855959686005,0.02367895983255992,0.017436881008395338,1.3229099579545722,0.0131807013043847 | ||
| 66 | +102660.54003349427,14770.0,14769.999999705335,5.364790752662568e-16,-1.2975231162634542,2.5834549160307202e-17,-2.466043384426776,0.48372644345193777,0.028852289888531828,0.958831803268213,-1.8022271411880775,0.02284295680102107,-0.023476141574471938,-1.7556113526783363,0.01337206070048309 | ||
| 67 | +105006.72279247809,15048.0,15047.99465532865,5.993539114702324e-16,1.1005580354163806,2.6671843306406585e-17,-2.466000437205987,0.5172157125141147,0.027067164541391957,1.018356543752431,0.7674507997149594,0.023918854158792646,0.00983138430351044,0.737755349439672,0.013326076606530082 | ||
| 68 | +103102.28361685216,14716.0,14715.999442685392,5.674552108899239e-16,-0.09631102227788653,2.6422615500161828e-17,-2.454995788646379,0.9125078449265976,0.027401639879197092,0.9984852826342058,-0.06491044261688289,0.0233354958728976,0.009111631303170683,0.6896669209855639,0.013211640323635889 | ||
| 69 | +104531.59108373195,14950.0,14949.998318397973,5.833625674801249e-16,0.49877785891182885,2.679061879225682e-17,-2.4544331622678186,0.9389281566958414,0.027229812579221184,1.01219836264865,0.514842214521027,0.023693400239136235,0.008740556642838928,0.6596348798548487,0.013250598035025481 | ||
| 70 | +103466.32364242684,14842.0,14841.999992364486,5.559773024581159e-16,-0.5338636010041037,2.626644243119372e-17,-2.5146215085708925,-1.1450405559233547,0.030236054427761224,1.009723793948652,0.4124474334233883,0.023575838181226716,0.00721903046759916,0.545000471514331,0.013245916003596215 | ||
| 71 | +104316.6824251344,14911.0,14910.975299452331,5.863638892368771e-16,0.6201956888974903,2.638504189857696e-17,-2.4780783592346936,0.07238488048354566,0.026547543526624376,1.0340466137193263,1.440548699949866,0.023634476030217625,0.023923346759196155,1.8463064644490832,0.01295740832838096 | ||
| 72 | +105529.5151767736,15190.0,15189.99957462132,5.834717114215463e-16,0.5010886028147278,2.6884888911606908e-17,-2.4889834457321363,-0.3136735758566292,0.028639472443934322,1.0016659371683858,0.07092028990347908,0.02349027578219314,-0.009923624425733822,-0.7499001090737418,0.013233261744675887 | ||
| 73 | +105457.94736951304,15122.0,15122.00000033066,6.027761674204073e-16,1.228476892803507,2.668032879772676e-17,-2.484405248255628,-0.16595468883164577,0.026544885755513475,1.033269220492325,1.3891723116963275,0.0239489516255185,0.015526648583225076,1.1821004068806855,0.01313479675063867 | ||
| 74 | +104470.87925587903,15024.0,15023.99640239301,6.03790838846066e-16,1.2589189731428367,2.684115464691797e-17,-2.483869890747045,-0.14371975264646822,0.026926644916821823,0.9864947020215399,-0.5740287753518823,0.023527214241448623,-0.008837024981601296,-0.655230584788196,0.013486893296438342 | ||
| 75 | +105162.29126301195,15112.0,15111.999999317562,6.177356170407144e-16,1.78390671313331,2.6759032122744834e-17,-2.506380869101536,-0.9667329798802878,0.027288682242746005,1.0253507279309722,1.0574779091807105,0.023972820340628042,0.0127067997195174,0.9573832730291858,0.013272427122434208 | ||
| 76 | +103777.57790654837,14877.0,14876.995407234004,6.038262246294493e-16,1.268964516464256,2.6656556736275105e-17,-2.4620622880379215,0.6649687898115889,0.02697526897038421,0.9726737228224851,-1.1837182765463132,0.0230851189163385,-0.010148044300178573,-0.7591884031873629,0.013366964323444887 | ||
| 77 | +104806.70057053298,15096.0,15095.997686243283,5.439260391738729e-16,-0.9824410031651785,2.6539976183937103e-17,-2.485384750079234,-0.18354769817720248,0.0293370613345176,1.0113235065508546,0.4749012032977535,0.02384392052962426,-0.0047982174071041815,-0.3597467862069802,0.013337763090796671 | ||
| 78 | +105784.79092823583,15259.0,15258.997768580222,5.827961339350463e-16,0.47726383852805365,2.6811446629837503e-17,-2.5047295496039585,-0.8455934842339454,0.029245198863330865,1.0148334072555911,0.6252990634905237,0.02372210054623874,-0.005345331494155609,-0.40347832963608515,0.013248125367666706 | ||
| 79 | +105162.46385599423,15152.0,15151.990215977432,6.104114704168049e-16,1.4901748418897318,2.711861003206714e-17,-2.474470457622988,0.20105659418141558,0.027502417413986915,0.9773365909881715,-0.9704918298581112,0.02335249851113323,-0.01955450863830202,-1.4522701704146073,0.013464787087597772 | ||
| 80 | +103698.33193109326,14764.0,14763.999994387923,5.411019601513098e-16,-1.1049254973794107,2.615383563618418e-17,-2.4445338644781205,1.2428914744224622,0.028535182879389883,1.0311968370972786,1.3211549589914875,0.023613306588269496,0.023708273144118674,1.8300034868884438,0.01295531583080744 | ||
| 81 | +104821.39827733487,15059.0,15058.999246115178,5.68594851432458e-16,-0.053139051470666006,2.6442861297923464e-17,-2.466495670942182,0.4820149547355415,0.02801641095394487,1.0120587400167682,0.5137233646888311,0.023473216998943287,0.0011567486920515345,0.08829982954016835,0.013100236977528022 | ||
| 82 | +106505.23587817501,15264.0,15263.999999850623,6.218963100694398e-16,1.9102781400790376,2.7166886842610554e-17,-2.471373714397668,0.3260255898816594,0.026458921845561856,1.0244822100573021,1.0264179091613137,0.023852087769304933,0.006396545662894279,0.48529211649252724,0.013180815112195989 | ||
| 83 | +103716.65615689153,15034.0,15033.999998061632,5.577294742966784e-16,-0.46570958681866953,2.634802042007193e-17,-2.482904112111916,-0.0985414772370263,0.029470961805563557,0.9613012436149456,-1.6877220023130035,0.022929579831286302,-0.03170581928856768,-2.3653482434347395,0.013404292317873425 | ||
| 84 | +104225.27879959819,14900.0,14900.00000050222,5.199590965611082e-16,-1.9135528494747858,2.615078201400422e-17,-2.4556855368707633,0.8170335145337638,0.02975944400899101,1.0386428710542701,1.615496590731249,0.0239201192227701,0.018544221167335707,1.4217032000742367,0.01304366563032804 | ||
| 85 | +102786.34653474073,14809.0,14808.997062384125,5.671608003596035e-16,-0.10806725632187256,2.6272524509552447e-17,-2.5099327217773117,-1.0258010259966965,0.02917985166590013,0.9698004119754605,-1.3141855751175404,0.02297969829857434,-0.014914062983158742,-1.1175505167317183,0.013345314381648704 | ||
| 86 | +103693.80219318194,14925.0,14925.000000354028,6.262827577806683e-16,2.0904413060784135,2.6923864170218004e-17,-2.5411901412740177,-2.2024997893381664,0.027782132634121534,0.9887409816798305,-0.4825792434259602,0.023330921239460494,-0.000780752700560303,-0.05835466951287918,0.013379438305069774 | ||
| 87 | +104450.08142122456,15026.0,15025.994475005335,5.564571488415918e-16,-0.5143813331337013,2.632842657003666e-17,-2.4774149392783564,0.09322806764920688,0.027728352488978595,0.9801244763987085,-0.8536014915849469,0.02328431217287018,-0.019296953745379125,-1.43996889663141,0.013400951777862312 | ||
| 88 | +104737.74337394757,15065.0,15064.99996910083,5.554067901763217e-16,-0.5523022868838343,2.6422504795363372e-17,-2.4843390111399652,-0.14983936941816967,0.028957750935643706,1.0003050186229425,0.013048813191263154,0.02337520037046332,-0.008653486101637216,-0.657271863832087,0.013165763784843708 | ||
| 89 | +104812.57801906214,15006.0,15005.99998335691,5.178722422960302e-16,-1.9922068346204702,2.6165836196370893e-17,-2.427920517426411,1.7570265877928588,0.029640691231093017,1.0336105370795834,1.4217166073837435,0.023640813439911784,0.0108890268433584,0.8436609848926396,0.012906874963222445 | ||
| 90 | +106339.57096486905,15207.0,15206.999997505669,5.492624962630607e-16,-0.7780861160226986,2.6651939046210067e-17,-2.445831650210193,1.190829912702277,0.028692888401057177,1.0621195059244974,2.582425705182309,0.024054711738594643,0.02255630002191606,1.7588965807729846,0.012824119546587107 | ||
| 91 | +103728.05730247138,14836.0,14835.999999972239,5.209387563455267e-16,-1.8911654411555279,2.5942333011593222e-17,-2.4645567717301,0.5223658413199294,0.029564008685709207,1.012433963029872,0.5286900139121922,0.02351843746369132,0.005379995631329906,0.4100847184331302,0.01311922973351953 | ||
| 92 | +103639.17031866539,14849.0,14848.995763098657,5.526901347779302e-16,-0.6572633079617131,2.6336271951268132e-17,-2.4790756256950353,0.03172639935343961,0.029135808783939735,1.020468619932421,0.8708978450847256,0.023502894223408958,0.013820223566015184,1.0582294652684516,0.01305976068480504 | ||
| 93 | +104906.65266527233,15057.0,15056.999676679454,5.898564205186925e-16,0.7409408234691087,2.6798928996413046e-17,-2.4884855686348057,-0.300606433374182,0.028228167107266427,0.9987704521192002,-0.052390350346280826,0.023468976112450243,-0.00464859897558333,-0.35058822561408415,0.013259426974311319 | ||
| 94 | +103900.09432355365,14941.0,14940.999999124993,5.626494348423733e-16,-0.2802725807392193,2.622648686589148e-17,-2.5374766771077253,-1.956661148119976,0.029374875237314736,1.0177793643158666,0.7655517169966314,0.023224249807207744,0.008053383365417891,0.624695729612739,0.01289168947962929 | ||
| 95 | +105421.80459221234,15086.0,15085.991362965473,5.516294154681729e-16,-0.6898096398915645,2.6631382731495095e-17,-2.432532234555485,1.6716428368356826,0.028395877635182285,1.0247181424780918,1.0377693753611312,0.023818531424180996,0.006247790610896622,0.47575967680589687,0.013132240741465004 | ||
| 96 | +104763.55636490823,14971.0,14970.992992053427,5.754182702542043e-16,0.20500866554129127,2.6429469407540822e-17,-2.471106898042058,0.3212152695157941,0.02768580077574692,1.0213216150467694,0.912626363652129,0.023362918162308007,0.01187716446399299,0.918512218279798,0.012930872586797705 | ||
| 97 | +104010.23755771558,14983.0,14982.986816532728,5.82399109476417e-16,0.4663708032910838,2.658637588142092e-17,-2.487410895062763,-0.26203121450146666,0.02828248946165792,0.9697278266558659,-1.3016693628373415,0.02325642302754035,-0.02063547654962738,-1.5264684883010589,0.01351844254092295 | ||
| 98 | +103802.99200127616,14915.0,14914.999158519993,5.98955655549965e-16,1.0774187851228139,2.687502385311054e-17,-2.492051222393842,-0.42355797140608237,0.028452356483424656,0.9793257627282156,-0.8930739375796235,0.023149524806215908,-0.00909363354268816,-0.6818341388097926,0.013337017061894227 | ||
| 99 | +104450.88752347854,15017.0,15016.999255893796,5.809988580730963e-16,0.41359203147894474,2.65934960926737e-17,-2.4601309159680382,0.7212149320641501,0.02754946292514427,0.9867690971578991,-0.5699875949468021,0.02321261543128109,-0.010889108810203578,-0.821966945763293,0.013247623722985307 | ||
| 100 | +103991.60794535361,14949.0,14948.999999199335,5.116779889999498e-16,-2.2436615470269636,2.5994121563179454e-17,-2.4490704069391716,1.0231506789081568,0.0302297537385545,0.9920210767039928,-0.34551318825890465,0.02309296306810833,-0.01362458177359732,-1.0422571545953772,0.013072188292040678 | ||
| 101 | +104522.21161729087,14952.0,14951.996157985375,5.778641034812695e-16,0.29445980626519813,2.670688261672947e-17,-2.463321751237089,0.6036096703921505,0.027630850831258973,1.0145116280579276,0.6221761632371783,0.02332398589882278,0.00909011274137726,0.7004224247969091,0.012978043562801382 |
test/test_examples.py
| @@ -89,16 +89,21 @@ class Test(gammalib.GPythonTestSuite): | @@ -89,16 +89,21 @@ class Test(gammalib.GPythonTestSuite): | ||
| 89 | self.name('examples') | 89 | self.name('examples') |
| 90 | 90 | ||
| 91 | # Append tests | 91 | # Append tests |
| 92 | - self.append(self.test_generate_prod3_irfs, 'Test generate_prod3_irfs') | ||
| 93 | - self.append(self.test_make_pointings, 'Test make_pointings') | ||
| 94 | - self.append(self.test_make_spectrum, 'Test make_spectrum') | ||
| 95 | - self.append(self.test_make_ts_distributions, 'Test make_ts_distributions') | ||
| 96 | - self.append(self.test_pipeline_binned_disk, 'Test pipeline_binned_disk') | ||
| 97 | - self.append(self.test_pipeline_binned_mem, 'Test pipeline_binned_mem') | ||
| 98 | - self.append(self.test_pipeline_stacked_disk, 'Test pipeline_stacked_disk') | ||
| 99 | - self.append(self.test_pipeline_stacked_mem, 'Test pipeline_stacked_mem') | ||
| 100 | - self.append(self.test_pipeline_unbinned_disk, 'Test pipeline_unbinned_disk') | ||
| 101 | - self.append(self.test_pipeline_unbinned_mem, 'Test pipeline_unbinned_mem') | 92 | + self.append(self.test_generate_prod3_irfs, 'Test generate_prod3_irfs.py') |
| 93 | + self.append(self.test_make_pointings, 'Test make_pointings.py') | ||
| 94 | + self.append(self.test_make_spectrum, 'Test make_spectrum.py') | ||
| 95 | + self.append(self.test_make_ts_distributions, 'Test make_ts_distributions.py') | ||
| 96 | + self.append(self.test_pipeline_binned_disk, 'Test pipeline_binned_disk.py') | ||
| 97 | + self.append(self.test_pipeline_binned_mem, 'Test pipeline_binned_mem.py') | ||
| 98 | + self.append(self.test_pipeline_stacked_disk, 'Test pipeline_stacked_disk.py') | ||
| 99 | + self.append(self.test_pipeline_stacked_mem, 'Test pipeline_stacked_mem.py') | ||
| 100 | + self.append(self.test_pipeline_unbinned_disk, 'Test pipeline_unbinned_disk.py') | ||
| 101 | + self.append(self.test_pipeline_unbinned_mem, 'Test pipeline_unbinned_mem.py') | ||
| 102 | + self.append(self.test_show_butterfly, 'Test show_butterfly.py') | ||
| 103 | + self.append(self.test_show_model, 'Test show_model.py') | ||
| 104 | + self.append(self.test_show_pha, 'Test show_pha.py') | ||
| 105 | + self.append(self.test_show_pull_evolution, 'Test show_pull_evolution.py') | ||
| 106 | + self.append(self.test_show_pull_histogram, 'Test show_pull_histogram.py') | ||
| 102 | 107 | ||
| 103 | # Return | 108 | # Return |
| 104 | return | 109 | return |
| @@ -241,6 +246,77 @@ class Test(gammalib.GPythonTestSuite): | @@ -241,6 +246,77 @@ class Test(gammalib.GPythonTestSuite): | ||
| 241 | # Return | 246 | # Return |
| 242 | return | 247 | return |
| 243 | 248 | ||
| 249 | + # Test show_butterfly | ||
| 250 | + def test_show_butterfly(self): | ||
| 251 | + """ | ||
| 252 | + Test show_butterfly | ||
| 253 | + """ | ||
| 254 | + # Execute script | ||
| 255 | + self._execute_python('show_butterfly', | ||
| 256 | + args='data/butterfly.txt example_butterfly.eps') | ||
| 257 | + | ||
| 258 | + #TODO: Do any testing | ||
| 259 | + | ||
| 260 | + # Return | ||
| 261 | + return | ||
| 262 | + | ||
| 263 | + # Test show_model | ||
| 264 | + def test_show_model(self): | ||
| 265 | + """ | ||
| 266 | + Test show_model | ||
| 267 | + """ | ||
| 268 | + # Execute script | ||
| 269 | + self._execute_python('show_model', | ||
| 270 | + args='data/crab.xml Crab example_model.eps') | ||
| 271 | + | ||
| 272 | + #TODO: Do any testing | ||
| 273 | + | ||
| 274 | + # Return | ||
| 275 | + return | ||
| 276 | + | ||
| 277 | + # Test show_pha | ||
| 278 | + def test_show_pha(self): | ||
| 279 | + """ | ||
| 280 | + Test show_pha | ||
| 281 | + """ | ||
| 282 | + # Execute script | ||
| 283 | + self._execute_python('show_pha', args='data/pha.fits example_pha.eps') | ||
| 284 | + | ||
| 285 | + #TODO: Do any testing | ||
| 286 | + | ||
| 287 | + # Return | ||
| 288 | + return | ||
| 289 | + | ||
| 290 | + # Test show_pull_evolution | ||
| 291 | + def test_show_pull_evolution(self): | ||
| 292 | + """ | ||
| 293 | + Test show_pull_evolution | ||
| 294 | + """ | ||
| 295 | + # Execute script | ||
| 296 | + self._execute_python('show_pull_evolution', | ||
| 297 | + args='data/pull.dat Pull_Crab_Prefactor ' | ||
| 298 | + 'example_pull_evolution.eps') | ||
| 299 | + | ||
| 300 | + #TODO: Do any testing | ||
| 301 | + | ||
| 302 | + # Return | ||
| 303 | + return | ||
| 304 | + | ||
| 305 | + # Test show_pull_histogram | ||
| 306 | + def test_show_pull_histogram(self): | ||
| 307 | + """ | ||
| 308 | + Test show_pull_histogram | ||
| 309 | + """ | ||
| 310 | + # Execute script | ||
| 311 | + self._execute_python('show_pull_histogram', | ||
| 312 | + args='data/pull.dat Pull_Crab_Prefactor 50 ' | ||
| 313 | + 'example_pull_histogram.eps') | ||
| 314 | + | ||
| 315 | + #TODO: Do any testing | ||
| 316 | + | ||
| 317 | + # Return | ||
| 318 | + return | ||
| 319 | + | ||
| 244 | 320 | ||
| 245 | # ======================== # | 321 | # ======================== # |
| 246 | # Main routine entry point # | 322 | # Main routine entry point # |
testall.sh
| 1 | #!/bin/sh | 1 | #!/bin/sh |
| 2 | # ===================================================================== | 2 | # ===================================================================== |
| 3 | -# Run all test and example scripts that come with the package. | 3 | +# Run some test scripts that come with the package |
| 4 | # | 4 | # |
| 5 | -# Copyright (C) 2011-2015 Juergen Knoedlseder | 5 | +# Copyright (C) 2011-2016 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 |
| @@ -25,11 +25,11 @@ base=$PWD | @@ -25,11 +25,11 @@ base=$PWD | ||
| 25 | 25 | ||
| 26 | 26 | ||
| 27 | # | 27 | # |
| 28 | -# examples | 28 | +# test/dev |
| 29 | # ======== | 29 | # ======== |
| 30 | echo | 30 | echo |
| 31 | -echo "=====> examples" | ||
| 32 | -cd examples | 31 | +echo "=====> test/dev" |
| 32 | +cd test/dev | ||
| 33 | 33 | ||
| 34 | # Create local environment | 34 | # Create local environment |
| 35 | rm -rf ctools | 35 | rm -rf ctools |
| @@ -41,18 +41,8 @@ export CTOOLS=$PWD/ctools | @@ -41,18 +41,8 @@ export CTOOLS=$PWD/ctools | ||
| 41 | # Run checkers | 41 | # Run checkers |
| 42 | ./check_models.py | 42 | ./check_models.py |
| 43 | 43 | ||
| 44 | -# Run pipelines | ||
| 45 | -./pipeline_binned_disk.py | ||
| 46 | -./pipeline_binned_mem.py | ||
| 47 | -./pipeline_stacked_disk.py | ||
| 48 | -./pipeline_stacked_mem.py | ||
| 49 | -./pipeline_unbinned_disk.py | ||
| 50 | -./pipeline_unbinned_mem.py | ||
| 51 | - | ||
| 52 | # Run makers | 44 | # Run makers |
| 53 | ./make_survey.py | 45 | ./make_survey.py |
| 54 | -./make_ts_distributions.py -n 2 -e 0 -d 1800 | ||
| 55 | -#./make_pull_at_sensitivity_limit.py | ||
| 56 | 46 | ||
| 57 | # Remove local environment | 47 | # Remove local environment |
| 58 | rm -rf ctools | 48 | rm -rf ctools |