diff options
| author | shivesh <s.p.mandalia@qmul.ac.uk> | 2018-05-26 10:50:03 -0500 |
|---|---|---|
| committer | shivesh <s.p.mandalia@qmul.ac.uk> | 2018-05-26 10:50:03 -0500 |
| commit | 639686cde9e43b4ad18f9b56960da3f5e8c697dd (patch) | |
| tree | 45c7d9b7e98ea0094aa169604dacd72ae89ed867 | |
| parent | f6645a19974f87166460a9baceade6817212a319 (diff) | |
| download | GolemFlavor-639686cde9e43b4ad18f9b56960da3f5e8c697dd.tar.gz GolemFlavor-639686cde9e43b4ad18f9b56960da3f5e8c697dd.zip | |
Sat May 26 10:50:03 CDT 2018
| -rwxr-xr-x | plot_sens.py | 4 | ||||
| -rw-r--r-- | utils/gf.py | 3 | ||||
| -rw-r--r-- | utils/plot.py | 5 |
3 files changed, 7 insertions, 5 deletions
diff --git a/plot_sens.py b/plot_sens.py index 2d7e20b..893e7a0 100755 --- a/plot_sens.py +++ b/plot_sens.py @@ -260,9 +260,9 @@ def main(): print 'Unable to load file {0}'.format(infile+'.npy') continue - print 'statistic_arr', statistic_arr - data = ma.masked_invalid(statistic_arr) + + print 'data', data if args.plot_statistic: print 'Plotting statistic' diff --git a/utils/gf.py b/utils/gf.py index 59b575e..02231f0 100644 --- a/utils/gf.py +++ b/utils/gf.py @@ -95,7 +95,8 @@ def setup_fitter(args, asimov_paramset): if args.data is DataType.ASIMOV: setup_asimov(fitter, asimov_paramset) elif args.data is DataType.REALISATION: - setup_realisation(fitter, asimov_paramset, args.seed) + seed = args.seed if args.seed is not None else 0 + setup_realisation(fitter, asimov_paramset, seed) elif args.data is DataType.REAL: print 'Using MagicTau DATA' return fitter diff --git a/utils/plot.py b/utils/plot.py index 4e1a58b..7a82f2b 100644 --- a/utils/plot.py +++ b/utils/plot.py @@ -14,6 +14,7 @@ import socket from copy import deepcopy import numpy as np +import numpy.ma as ma from scipy import interpolate import matplotlib as mpl @@ -269,7 +270,7 @@ def plot_statistic(data, outfile, outformat, args, scale_param, label=None): print 'data', data print 'data.shape', data.shape - scales, statistic = data.T + scales, statistic = ma.compress_rows(data).T tck, u = interpolate.splprep([scales, statistic], s=0) scales, statistic = interpolate.splev(np.linspace(0, 1, 1000), tck) print 'scales', scales @@ -496,7 +497,7 @@ def plot_sens_fixed_angle_pretty(data, outfile, outformat, args): bc_limit = best_limits[dim] # ax.axvline(x=np.log10(bc_limit[1]), color=bc_limit[2], alpha=0.7, linewidth=1.5) - scales, statistic = data[idim][isrc][ian].T + scales, statistic = ma.compress_rows(data[idim][isrc][ian]).T tck, u = interpolate.splprep([scales, statistic], s=0) scales, statistic = interpolate.splev(np.linspace(0, 1, 1000), tck) min_idx = np.argmin(scales) |
