mirror of https://gitlab.com/pamhyr/pamhyr2
debug read_bin
parent
a317cd849f
commit
21876586df
|
|
@ -791,7 +791,7 @@ class AdisTSwc(AdisTS):
|
||||||
c = np.fromfile(f, dtype=np.byte, count=1)
|
c = np.fromfile(f, dtype=np.byte, count=1)
|
||||||
# possible values :
|
# possible values :
|
||||||
# sediment : C, G, M, D, L, N, R
|
# sediment : C, G, M, D, L, N, R
|
||||||
# polutant : C, G, M, D
|
# polutant : C
|
||||||
phys_var = bytearray(c).decode()
|
phys_var = bytearray(c).decode()
|
||||||
data_tmp[key_pol][t][phys_var] = {}
|
data_tmp[key_pol][t][phys_var] = {}
|
||||||
real_data = np.fromfile(f, dtype=np.float32, count=ismax)
|
real_data = np.fromfile(f, dtype=np.float32, count=ismax)
|
||||||
|
|
@ -817,20 +817,15 @@ class AdisTSwc(AdisTS):
|
||||||
|
|
||||||
print("reading bin files is ok =======")
|
print("reading bin files is ok =======")
|
||||||
|
|
||||||
for i in range(ismax):
|
for r, reach in enumerate(reachs):
|
||||||
# print("first i: ", i)
|
for i in range(is1[r]-1, is2[r]):
|
||||||
reach = ip_to_r(i)
|
|
||||||
# print("reach i:", reach)
|
|
||||||
# print("second i: ", i)
|
|
||||||
p_i = ip_to_ri(reach, i)
|
p_i = ip_to_ri(reach, i)
|
||||||
|
|
||||||
for t_data in timestamps_keys:
|
for t_data in timestamps_keys:
|
||||||
pol_view = []
|
pol_view = []
|
||||||
for pol in pollutants_keys:
|
for pol in pollutants_keys:
|
||||||
# print("pol results: ",
|
|
||||||
# type(list(data_tmp[pol][t_data].values())))
|
|
||||||
pol_view.append(tuple(list(map(
|
pol_view.append(tuple(list(map(
|
||||||
lambda data_el: data_el[p_i],
|
lambda data_el: data_el[i],
|
||||||
list(data_tmp[pol][t_data].values())
|
list(data_tmp[pol][t_data].values())
|
||||||
))))
|
))))
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue