debug Adis-TS

terraz_dev
Theophile Terraz 2025-01-16 15:03:52 +01:00
parent 2e2f054a4f
commit 230712c3ea
4 changed files with 8 additions and 5 deletions

View File

@ -128,7 +128,7 @@ class Pollutants(SQLSubModel):
if table is not None:
for t in table:
new_data = t[1:]
new_data = t[1:-1]
new_pollutant._data.append(new_data)
@ -182,7 +182,7 @@ class Pollutants(SQLSubModel):
print("from_data before : ", data)
try:
new = [int(data[0])]
new += [float(d) for d in data[1:-1]]
new += [float(d) for d in data[1:]]
except Exception as e:
logger.error(e)
new = None

View File

@ -46,7 +46,7 @@ class Results(object):
el.split("/")[-1][0:-4]
for el in glob.glob(repertory_results + "/*.bin")
]
mylist.insert(0, mylist.pop(mylist.index("total_sediment")))
self._pollutants_list.insert(0, self._pollutants_list.pop(self._pollutants_list.index("total_sediment")))
self._phys_var_list = ["C", "G", "M", "D", "L", "N", "R"]

View File

@ -429,7 +429,10 @@ class AdisTSwc(AdisTS):
list_characteristics = ["type", "diametre", "rho", "porosity",
"cdc_riv", "cdc_cas", "apd", "ac", "bc"]
if len(list_characteristics) == (len(pol_data[0])-1):
print("pol_data:")
print(pol_data[0])
if len(list_characteristics) <= (len(pol_data[0])):
for i in range(len(list_characteristics)):
f.write(f"{list_characteristics[i]} = {pol_data[0][i]}\n")

View File

@ -207,7 +207,7 @@ class TableModel(PamhyrTableModel):
self._undo.push(
AddCommand(
self._pollutant, self._bc_list, self._lst, row
self._pollutant, self._bc_list, row, self._lst
)
)