Browse Source

[s11] fix misunderstood / add what I left out

master
sipp11 10 years ago
parent
commit
3f571ed038
  1. 17
      s11.py

17
s11.py

@ -79,8 +79,21 @@ def processingS11(model, rtype, ksearch):
### [s11] (2) & (3)
zipped_list = zip(data_only, w_only, l_only)
multiply_n_add = [(float(_[0])*float(_[1]))+float(_[2]) for _ in zipped_list]
result.append(i[:1]+multiply_n_add)
multiply_by_weight = [(float(_[0])*float(_[1])) for _ in zipped_list]
## get sum KWT-x ***
row_kwt_sum = [0, 0, 0, 0, 0]
for _ in zipped_list:
if float(_[2]) == 1:
row_kwt_sum[1] += (float(_[0])*float(_[1]))
elif float(_[2]) == 2:
row_kwt_sum[2] += (float(_[0])*float(_[1]))
elif float(_[2]) == 3:
row_kwt_sum[3] += (float(_[0])*float(_[1]))
row_kwt_sum[0] = sum(row_kwt_sum[1:4])
row_kwt_sum[4] = sum(row_kwt_sum[1:3])
result.append(i[:1]+multiply_by_weight+row_kwt_sum)
## concat with s10_data
finale = []

Loading…
Cancel
Save