diff --git a/src/View/Results/WindowAdisTS.py b/src/View/Results/WindowAdisTS.py index 28c77932807f262e5326b4ec3a88d17f6e308c1a..66dd3334f4d5e7adae00475da6ef609c29f2a483 100644 --- a/src/View/Results/WindowAdisTS.py +++ b/src/View/Results/WindowAdisTS.py @@ -501,7 +501,7 @@ class ResultsWindowAdisTS(PamhyrWindow): self.update_table_selection_profile(profile_id) if pol_id is not None: - self._current_pol_id = [p+1 for p in pol_id] # remove total_sediment + self._current_pol_id = [p+1 for p in pol_id] # rm total_sediment self.plot_cdt.set_pollutant(self._current_pol_id) self.plot_cdx.set_pollutant(self._current_pol_id) self.plot_mdx.set_pollutant(self._current_pol_id) @@ -705,7 +705,7 @@ class ResultsWindowAdisTS(PamhyrWindow): else: my_dict[dict_y[unit]] = list(map(lambda p: p.get_ts_key( - timestamp, "pols" + timestamp, "pols" )[pol_id][val_id[unit]], reach.profiles)) @@ -735,48 +735,6 @@ class ResultsWindowAdisTS(PamhyrWindow): my_dict[dict_y[unit]] = list(map(lambda data_el: data_el[pol_id][val_id[unit]], profile.get_key("pols") - )) + )) return my_dict - - #def export_reach(self, reach, directory): - #name = reach.name - #name = name.replace(" ", "-") - - #file_name = os.path.join( - #directory, - #f"reach_{name}.csv" - #) - - #with open(file_name, 'w', newline='') as csvfile: - #writer = csv.writer(csvfile, delimiter=',', - #quotechar='|', quoting=csv.QUOTE_MINIMAL) - #writer.writerow(["name", "rk", "data-file"]) - #for profile in reach.profiles: - #p_file_name = os.path.join( - #directory, - #f"cs_{profile.geometry.id}.csv" - #) - - #writer.writerow([ - #profile.name, - #profile.rk, - #p_file_name - #]) - - #self.export_profile(reach, profile, p_file_name) - - #def export_profile(self, reach, profile, file_name): - #with open(file_name, 'w', newline='') as csvfile: - #writer = csv.writer(csvfile, delimiter=',', - #quotechar='|', quoting=csv.QUOTE_MINIMAL) - - #writer.writerow(["timestamp", "z", "q"]) - #timestamps = sorted(self._results.get("timestamps")) - - #for ts in timestamps: - #writer.writerow([ - #ts, - #profile.get_ts_key(ts, "Z"), - #profile.get_ts_key(ts, "Q"), - #])