-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathevol_plot.py
More file actions
executable file
·41 lines (35 loc) · 1007 Bytes
/
Copy pathevol_plot.py
File metadata and controls
executable file
·41 lines (35 loc) · 1007 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/usr/bin/env python
import loos
import loos.pyloos
import sys
import numpy
import copy
import math
import os
import h5py
pdisth5 =h5py.File(sys.argv[1],'r')
histogram_name = '/histograms'
histogram_data = pdisth5[histogram_name]
histogram = numpy.array(histogram_data)
#print histogram.shape
first = int(sys.argv[2])
last = int(sys.argv[3])
subset_array = histogram[first:last:1]
#numpy.seterr(divide='ignore', invalid='ignore')
#log = (-1)*numpy.log(histogram)
#or i in range(subset_array.shape[0]):
# for j in range(subset_array.shape[1]):
# for k in range(subset_array.shape[2]):
#neg_log = (-1)*log
#average = numpy.add.reduce(neg_log,0)/(last-first)
#print average.shape
pcoord = pdisth5['/midpoints']
n_iter = pdisth5['/n_iter']
#auxiliary = pdisth5['/midpoints_1']
#print pcoord.shape
#print auxiliary.shape
#print pcoord.shape
#print auxiliary.shape
for i in range(histogram.shape[0]):
for j in range(histogram.shape[1]):
print i,"\t",pcoord[j],"\t", histogram[i][j]