Minor changes to 20260723_OFR_Analysis_01

This commit is contained in:
tschan_d committed 2026-07-09 10:13:29 +02:00
1 parent ae26611654
commit b63a5bf595
1 file changed
+36 -45
@@ -58,21 +58,21 @@
"ax.plot(np.power(10, sample.Count.var), sample.Count.fct, color='red', label=r'$\\der{N}/\\der{\\log_{10}D}$')\n",
"ax_2.plot(np.power(10, sample.Mass.var), sample.Mass.fct / 1E12, color='blue', label=r'$\\der{m}/\\der{\\log_{10}D}$')\n",
"\n",
"ax.set_title('2026-06-12 SET02/EXP01: Sample Nr. ' + str(sample_number))\n",
"ax.set_xlabel(r'Particle Diameter $D$ $(\\unit{\\per\\cubic\\centi\\meter})$')\n",
"ax.set_ylabel(r'Log Number Denisty $\\der{N}/\\der{\\log_{10}D}$ $(\\unit{\\per\\cubic\\centi\\meter})$')\n",
"ax_2.set_ylabel(r'Mass Denisty $\\der{m}/\\der{\\log_{10}D}$ $(\\unit{\\milli\\gram\\per\\cubic\\centi\\meter})$')\n",
"ax.set_title('2026-06-12 SET02/EXP01: Number- and Mass Spectra of Sample Nr. ' + str(sample_number))\n",
"ax.set_xlabel(r'Particle Diameter $D$ $(\\unit{\\meter})$')\n",
"ax.set_ylabel(r'Log Number Denisty $\\der{N}/\\der{\\log_{10}D}$ $(\\unit{\\per\\meter})$')\n",
"ax_2.set_ylabel(r'Mass Denisty $\\der{m}/\\der{\\log_{10}D}$ $(\\unit{\\kilo\\gram\\per\\cubic\\meter})$')\n",
"\n",
"ax.set_xlim([20, 1100])\n",
"ax.set_ylim([0, 1200000])\n",
"ax_2.set_ylim([0, 18])\n",
"#ax.set_xlim([20, 1100])\n",
"#ax.set_ylim([0, 1200000])\n",
"#ax_2.set_ylim([0, 18])\n",
"\n",
"lines_1, labels_1 = ax.get_legend_handles_labels()\n",
"lines_2, labels_2 = ax_2.get_legend_handles_labels()\n",
"\n",
"ax.legend(lines_1 + lines_2, labels_1 + labels_2, loc='upper left')\n",
"\n",
"plt.savefig(\"20260723_OFR_Analysis_01_Spectrum_Sample_\" + str(sample_number) + \".pdf\", format='pdf', dpi=400)"
"plt.savefig(\"20260723_OFR_Analysis_01_Spectrum_Sample_\" + str(sample_number) + \".svg\", format='svg', dpi=400)"
]
},
{
@@ -85,16 +85,16 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": null,
"id": "8db19b57",
"metadata": {},
"outputs": [],
"source": [
"sample_number_list = [int(i) for i in range(1, 157)]\n",
"\n",
"analyser = OFRAnalyser(data_source_file = source_file, flows_source_file = flows_source_file, sample_number_list = [33, 35, 37])\n",
"analyser = OFRAnalyser(data_source_file = source_file, flows_source_file = flows_source_file, sample_number_list = sample_number_list)\n",
"analyser.GetData()\n",
"analyser.data.to_csv(path_or_buf=r\"C:\\Users\\tschan_d\\Documents\\data_local\\data.csv\", index=False)"
"#analyser.data.to_csv(path_or_buf=r\"C:\\Users\\tschan_d\\Documents\\data_local\\data.csv\", index=False)"
]
},
{
@@ -116,26 +116,25 @@
"ax = fig.add_subplot(111)\n",
"ax_2 = plt.twinx(ax)\n",
"\n",
"ax.plot(analyser.data['Sample (-)'], analyser.data['Number (#/cm^3)'], color='red', label='Number')\n",
"ax_2.plot(analyser.data['Sample (-)'], analyser.data['Mass (mg/cm^3)'], color='blue', label='Mass')\n",
"ax.plot(analyser.data['Sample (-)'], analyser.data['Number (#/m^3)'], color='red', label='Number')\n",
"ax_2.plot(analyser.data['Sample (-)'], analyser.data['Mass (kg/m^3)'], color='blue', label='Mass')\n",
"\n",
"ax.set_title('2026-06-12 SET02/EXP01: Experiment Overview')\n",
"ax.set_title('2026-06-12 SET02/EXP01: Time Series of Number- and Mass Densities')\n",
"ax.set_xlabel(r'Sample $(-)$')\n",
"ax.set_ylabel(r'Number Density $N$ $(\\unit{\\per\\cubic\\centi\\meter})$')\n",
"ax_2.set_ylabel(r'Mass Density $m$ $(\\unit{\\milli\\gram\\per\\cubic\\centi\\meter})$')\n",
"ax.set_ylabel(r'Number Density $N$ $(\\unit{\\per\\cubic\\meter})$')\n",
"ax_2.set_ylabel(r'Mass Density $m$ $(\\unit{\\kilo\\gram\\per\\cubic\\meter})$')\n",
"ax.xaxis.set_minor_locator(MultipleLocator(base=1, offset=0))\n",
"ax.xaxis.set_major_locator(MultipleLocator(base=10, offset=0))\n",
"\n",
"ax.set_xlim([1, 156])\n",
"ax.set_ylim([0, 1.2E6])\n",
"#ax.set_ylim([0, 1.2E6])\n",
"#ax_2.set_ylim([0, 15])\n",
"\n",
"lines_1, labels_1 = ax.get_legend_handles_labels()\n",
"lines_2, labels_2 = ax_2.get_legend_handles_labels()\n",
"\n",
"ax.legend(lines_1 + lines_2, labels_1 + labels_2, loc='upper left')\n",
"\n",
"plt.savefig(\"20260723_OFR_Analysis_01_Experiment_Overview_top.pdf\", format='pdf', dpi=400)"
"plt.savefig(\"20260723_OFR_Analysis_01_Experiment_Timeseries_of_Densities.svg\", format='svg', dpi=400)"
]
},
{
@@ -143,7 +142,7 @@
"id": "9555beb6",
"metadata": {},
"source": [
"Clearly, something is happening at around 5000 s, 12000s, and after 17000s. This corresponds to shifts in the flow rates... These are read from disk and depicted below:"
"Clearly, something is happening at samples 25, 67, and after 105. This corresponds to shifts in the flow rates... These are read from disk and depicted below:"
]
},
{
@@ -157,26 +156,26 @@
"ax = fig.add_subplot(111)\n",
"ax_2 = plt.twinx(ax=ax)\n",
"\n",
"ax.step(analyser.data['Sample (-)'], analyser.data['Ozone Flow (L/min)'], color='forestgreen', linestyle='--', label='Ozone')\n",
"ax_2.step(analyser.data['Sample (-)'], analyser.data['Species Flow (L/min)'], color='magenta', linestyle='--', label=r'$\\alpha$-Pinene')\n",
"ax.step(analyser.data['Sample (-)'], analyser.data['Ozone Flow (m^3/s)'], color='forestgreen', linestyle='-', label='Ozone')\n",
"ax_2.step(analyser.data['Sample (-)'], analyser.data['Species Flow (m^3/s)'], color='magenta', linestyle='-', label=r'$\\alpha$-Pinene')\n",
"\n",
"ax.set_title('2026-06-12 SET02/EXP01: Flow Rates Overview ')\n",
"ax.set_title('2026-06-12 SET02/EXP01: Time Series of Flow Rates')\n",
"ax.set_xlabel(r'Sample $(-)$')\n",
"ax.set_ylabel(r'Ozone Flow Rate $r_{\\ce{O3}}$ $(\\unit{\\liter\\per\\minute})$')\n",
"ax_2.set_ylabel(r'$\\alpha$-Pinene Flow Rate $r_{\\alpha}$ $(\\unit{\\liter\\per\\minute})$')\n",
"ax.set_ylabel(r'Ozone Flow Rate $(\\unit{\\cubic\\meter\\per\\second})$')\n",
"ax_2.set_ylabel(r'$\\alpha$-Pinene Flow Rate $(\\unit{\\cubic\\meter\\per\\second})$')\n",
"ax.xaxis.set_minor_locator(MultipleLocator(base=1, offset=0))\n",
"ax.xaxis.set_major_locator(MultipleLocator(base=10, offset=0))\n",
"\n",
"ax.set_xlim([1, 156])\n",
"ax.set_ylim([0.6, 2.4])\n",
"ax_2.set_ylim([0.0, 0.05])\n",
"#ax.set_ylim([0.6, 2.4])\n",
"#ax_2.set_ylim([0.0, 0.05])\n",
"\n",
"lines_1, labels_1 = ax.get_legend_handles_labels()\n",
"lines_2, labels_2 = ax_2.get_legend_handles_labels()\n",
"\n",
"ax.legend(lines_1 + lines_2, labels_1 + labels_2, loc='upper left')\n",
"\n",
"plt.savefig(\"20260723_OFR_Analysis_01_Experiment_Overview_bottom.pdf\", format='pdf', dpi=400)"
"plt.savefig(\"20260723_OFR_Analysis_01_Experiment_Timeseries_of_Flow_Rates.svg\", format='svg', dpi=400)"
]
},
{
@@ -194,39 +193,31 @@
"metadata": {},
"outputs": [],
"source": [
"fig = plt.figure(figsize=(10,2.5), constrained_layout = True)\n",
"fig = plt.figure(figsize=(10,4), constrained_layout = True)\n",
"ax = fig.add_subplot(111)\n",
"ax_2 = plt.twinx(ax=ax)\n",
"\n",
"ax.step(analyser.data['Sample (-)'], analyser.data['Mass (mg/cm^3)'], color='forestgreen', linestyle='--', label='Ozone')\n",
"ax_2.step(analyser.data['Sample (-)'], analyser.data['Species Flow (L/min)'], color='magenta', linestyle='--', label=r'$\\alpha$-Pinene')\n",
"ax.step(analyser.data['Sample (-)'], analyser.data['Mass Production Rate (kg/s)'], color='blue', linestyle='-', label='Mass Production Rate')\n",
"ax_2.step(analyser.data['Sample (-)'], analyser.data['Cumulative Mass Produced (kg)'], color='magenta', linestyle='-', label=r'Cumulative Mass Produced')\n",
"\n",
"ax.set_title('2026-06-12 SET02/EXP01: Flow Rates Overview ')\n",
"ax.set_title('2026-06-12 SET02/EXP01: Timesseries of Mass Production')\n",
"ax.set_xlabel(r'Sample $(-)$')\n",
"ax.set_ylabel(r'Ozone Flow Rate $r_{\\ce{O3}}$ $(\\unit{\\liter\\per\\minute})$')\n",
"ax_2.set_ylabel(r'$\\alpha$-Pinene Flow Rate $r_{\\alpha}$ $(\\unit{\\liter\\per\\minute})$')\n",
"ax.set_ylabel(r'Mass Production Rate $(\\unit{\\kilo\\gram\\per\\second})$')\n",
"ax_2.set_ylabel(r'Cumulative Mass Produced $(\\unit{\\kilo\\gram})$')\n",
"ax.xaxis.set_minor_locator(MultipleLocator(base=1, offset=0))\n",
"ax.xaxis.set_major_locator(MultipleLocator(base=10, offset=0))\n",
"\n",
"ax.set_xlim([1, 156])\n",
"ax.set_ylim([0.6, 2.4])\n",
"ax_2.set_ylim([0.0, 0.05])\n",
"#ax.set_ylim([0.6, 2.4])\n",
"#ax_2.set_ylim([0.0, 0.05])\n",
"\n",
"lines_1, labels_1 = ax.get_legend_handles_labels()\n",
"lines_2, labels_2 = ax_2.get_legend_handles_labels()\n",
"\n",
"ax.legend(lines_1 + lines_2, labels_1 + labels_2, loc='upper left')\n",
"\n",
"plt.savefig(\"20260723_OFR_Analysis_01_Experiment_Overview_bottom.pdf\", format='pdf', dpi=400)"
"plt.savefig(\"20260723_OFR_Analysis_01_Experiment_Timeseries_of_Mass_Production.svg\", format='svg', dpi=400)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "c6110f8c",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {