diff --git a/Python_script/prototype.py b/Python_script/prototype.py index 5e195736bd7d0973cb0aa6368c3997ee6a9294d8..58c27109dd1181d4d2d04e51fe250834b554fe6e 100755 --- a/Python_script/prototype.py +++ b/Python_script/prototype.py @@ -267,52 +267,6 @@ class Measurements: return equilibrium_indicator - def plot_output(self, output_basename, show_plot_window, safe_pdf = True): - csv_data = pd.read_csv(output_basename+'.csv') - fig, ax1 = plt.subplots(2, figsize=(12, 10)) - fig.suptitle("Graphical representation of chamber output", color="red") - - path_collection01 = ax1[0].scatter(csv_data.TIMESTAMP, csv_data.S21_PHASE, c='red', marker='<', label='Phase') - twin2_0 = ax1[0].twinx() - path_collection02 = twin2_0.scatter(csv_data.TIMESTAMP, csv_data.S21_MAGNITUDE, c='#3120E0', marker='4', - label='Magnitude') - twin3_0 = ax1[0].twinx() - twin3_0.spines['right'].set_position(('outward', 40)) - path_collection03 = twin3_0.scatter(csv_data.TIMESTAMP, csv_data.EQUILIBRIUM_INDICATOR, c='black', marker=".", - label='Equilibrium_Indicator') - ax1[0].set_xlabel("TIMESTAMP") - ax1[0].set_ylabel("PHASE", color='red') - twin2_0.set_ylabel("MAGNITUDE", color='#3120E0') - twin3_0.set_ylabel("EQUILIBRIUM_INDICATOR", color='black') - - ax1[0].grid(True, linestyle=":") - all_path_collections = [path_collection01, path_collection02, path_collection03] - labels = [pc.get_label() for pc in all_path_collections] - ax1[0].legend(all_path_collections, labels, loc='lower right') - - path_collection11 = ax1[1].scatter(csv_data.TIMESTAMP, csv_data.READBACK_TEMPERATURE, c='blue', marker='p', - label="Temperature") - twin2_1 = ax1[1].twinx() - path_collection12 = twin2_1.scatter(csv_data.TIMESTAMP, csv_data.READBACK_HUMIDITY, c='green', marker="*", - label="Humidity") - twin3_1 = ax1[1].twinx() - twin3_1.spines['right'].set_position(('outward', 40)) - path_collection13 = twin3_1.scatter(csv_data.TIMESTAMP, csv_data.EQUILIBRIUM_INDICATOR, c='black', marker=".", - label="Equilibrium_Indicator") - ax1[1].set_xlabel("TIMESTAMP") - ax1[1].set_ylabel("TEMPERATURE ", color='blue') - twin2_1.set_ylabel("HUMIDITY", color='green') - twin3_1.set_ylabel("EQUILIBRIUM_INDICATOR", color='black') - ax1[1].grid(True, linestyle=":") - all_path_collections = [path_collection11, path_collection12, path_collection13] - labels = [pc.get_label() for pc in all_path_collections] - ax1[1].legend(all_path_collections, labels, loc='lower right') - - fig.savefig(output_basename + '_graph.pdf') - - if show_plot_window: - plt.show() - def calculate_temperature_stability(self, target_temp, readback_temp): return (target_temp-self.max_delta_temp <= float(readback_temp)) and \ (float(readback_temp) <= target_temp+self.max_delta_temp)