From bd707b314c4b36eccd8f6dbf32a0abec22e45da0 Mon Sep 17 00:00:00 2001 From: Martin Killenberg <martin.killenberg@desy.de> Date: Tue, 17 Jan 2023 14:44:08 +0100 Subject: [PATCH] adapt prototype to naming scheme --- Python_script/analysis.py | 1 - Python_script/prototype.py | 8 ++++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Python_script/analysis.py b/Python_script/analysis.py index 8604e09..d1e93a8 100644 --- a/Python_script/analysis.py +++ b/Python_script/analysis.py @@ -30,7 +30,6 @@ def extract_stable_data(datafile): return datapoint -# FIXME: Come up with a naming scheme def plot_temperature_sweep(temperatures, humidity, basename): temps_from_data = [] phases = [] diff --git a/Python_script/prototype.py b/Python_script/prototype.py index e5c4a25..bac7380 100755 --- a/Python_script/prototype.py +++ b/Python_script/prototype.py @@ -101,7 +101,7 @@ class Measurements: temperatures.append(stop_temp) for temp in temperatures: - output_name = self.output_basename + '_'+str(temp)+'deg.csv' + output_name = self.output_basename + '_'+str(temp)+'deg_'+str(target_hum)+'rh.csv' self.measurement_plot.fig.suptitle("Temp. sweep measurement "+str(temperatures.index(temp)+1)+'/'+str(len(temperatures))+ ': ' + str(temp) + ' degC, ' + str(target_hum) + ' rel. hum.', color="red") @@ -351,7 +351,7 @@ def run_temperature_sweep_from_file(temperature_sweep_file, meas): n_stable_reads = int(list_of_values[5]) return meas.perform_temperature_sweep(start_temp, stop_temp, temperature_step, target_hum, soaking_time, - n_stable_reads) + n_stable_reads), target_hum except KeyboardInterrupt: pass @@ -405,11 +405,11 @@ if __name__ == '__main__': n_measurements = mes.perform_measurements(args.file) plot_output(output_basename, range(n_measurements), args.plot, output_basename) if args.temperaturesweepfile: - temperatures = run_temperature_sweep_from_file(args.temperaturesweepfile, mes) + temperatures, humidity = run_temperature_sweep_from_file(args.temperaturesweepfile, mes) #run analysis here temp_extensions = [] for t in temperatures: - temp_extensions.append(str(t)+'deg') + temp_extensions.append(str(t)+'deg_'+str(humidity)+'rh') plot_output(output_basename, temp_extensions, args.plot, output_basename + ': Temperature sweep ' + str(temperatures[0]) + ' degC to ' + str(temperatures[-1]) + ' degC') print(str(temp_extensions)) -- GitLab