Starting analysis for OFR Flow Rates
This commit is contained in:
1 parent
97b7df338e
commit
e18c0c4ea7
4 files changed
+301
-66
No files matched your search
@@ -1,17 +1,93 @@
|
||||
# Overall figure
|
||||
# AXES AND BOX
|
||||
axes.facecolor: white # axes background color
|
||||
axes.edgecolor: black # axes edge color
|
||||
axes.linewidth: 0.8 # edge line width
|
||||
axes.formatter.use_mathtext: True
|
||||
axes.formatter.limits: -3, 4
|
||||
|
||||
axes.grid: True # display grid or not
|
||||
# GRID
|
||||
axes.grid: False # display grid or not
|
||||
axes.grid.axis: both # which axis the grid should apply to
|
||||
axes.grid.which: both # grid lines at {major, minor, both} ticks
|
||||
|
||||
axes.grid.which: major # grid lines at {major, minor, both} ticks
|
||||
grid.linewidth: 0.2
|
||||
grid.color: black
|
||||
|
||||
xtick.top:True
|
||||
ytick.right:True
|
||||
# TICKS
|
||||
xtick.top: True # draw ticks on the top side
|
||||
xtick.bottom: True # draw ticks on the bottom side
|
||||
xtick.labeltop: False # draw label on the top
|
||||
xtick.labelbottom: True # draw label on the bottom
|
||||
xtick.major.size: 7 # major tick size in points
|
||||
xtick.minor.size: 3.5 # minor tick size in points
|
||||
xtick.major.width: 0.8 # major tick width in points
|
||||
xtick.minor.width: 0.4 # minor tick width in points
|
||||
xtick.major.pad: 3.5 # distance to major tick label in points
|
||||
xtick.minor.pad: 3.5 # distance to the minor tick label in points
|
||||
xtick.color: black # color of the ticks
|
||||
xtick.labelsize: small # font size of the tick labels
|
||||
xtick.direction: in # direction: {in, out, inout}
|
||||
xtick.minor.visible: True # visibility of minor ticks on x-axis
|
||||
xtick.major.top: True # draw x axis top major ticks
|
||||
xtick.major.bottom: True # draw x axis bottom major ticks
|
||||
xtick.minor.top: True # draw x axis top minor ticks
|
||||
xtick.minor.bottom: True # draw x axis bottom minor ticks
|
||||
xtick.minor.ndivs: auto # number of minor ticks between the major ticks on x-axis
|
||||
xtick.alignment: center # alignment of xticks
|
||||
|
||||
ytick.left: True # draw ticks on the left side
|
||||
ytick.right: True # draw ticks on the right side
|
||||
ytick.labelleft: True # draw tick labels on the left side
|
||||
ytick.labelright: False # draw tick labels on the right side
|
||||
ytick.major.size: 7 # major tick size in points
|
||||
ytick.minor.size: 3.5 # minor tick size in points
|
||||
ytick.major.width: 0.8 # major tick width in points
|
||||
ytick.minor.width: 0.4 # minor tick width in points
|
||||
ytick.major.pad: 3.5 # distance to major tick label in points
|
||||
ytick.minor.pad: 3.5 # distance to the minor tick label in points
|
||||
ytick.color: black # color of the ticks
|
||||
ytick.labelsize: small # font size of the tick labels
|
||||
ytick.direction: in # direction: {in, out, inout}
|
||||
ytick.minor.visible: True # visibility of minor ticks on y-axis
|
||||
ytick.major.left: True # draw y axis left major ticks
|
||||
ytick.major.right: True # draw y axis right major ticks
|
||||
ytick.minor.left: True # draw y axis left minor ticks
|
||||
ytick.minor.right: True # draw y axis right minor ticks
|
||||
ytick.minor.ndivs: auto # number of minor ticks between the major ticks on y-axis
|
||||
ytick.alignment: center_baseline # alignment of yticks
|
||||
|
||||
# TEXT
|
||||
text.parse_math: True
|
||||
|
||||
# TITLE
|
||||
axes.titlelocation: left
|
||||
axes.titlesize: large # font size of the axes title
|
||||
axes.titleweight: normal # font weight of title
|
||||
|
||||
# LEGEND
|
||||
legend.loc: best
|
||||
legend.frameon: True # if True, draw the legend on a background patch
|
||||
legend.framealpha: 0.8 # legend patch transparency
|
||||
legend.facecolor: inherit # inherit from axes.facecolor; or color spec
|
||||
legend.edgecolor: black # background patch boundary color
|
||||
patch.linewidth: 0.6 # line width of the legend frame, None means inherit from patch.linewidth
|
||||
legend.fancybox: False # if True, use a rounded box for the
|
||||
# legend background, else a rectangle
|
||||
legend.shadow: False # if True, give background a shadow effect
|
||||
legend.numpoints: 1 # the number of marker points in the legend line
|
||||
legend.scatterpoints: 1 # number of scatter points
|
||||
legend.markerscale: 1.0 # the relative size of legend markers vs. original
|
||||
legend.fontsize: small
|
||||
legend.labelcolor: None
|
||||
legend.title_fontsize: None # None sets to the same as the default axes.
|
||||
|
||||
## Dimensions as fraction of font size:
|
||||
legend.borderpad: 0.4 # border whitespace
|
||||
legend.labelspacing: 0.4 # the vertical space between the legend entries
|
||||
legend.handlelength: 2.0 # the length of the legend lines
|
||||
legend.handleheight: 0.7 # the height of the legend handle
|
||||
legend.handletextpad: 0.8 # the space between the legend line and legend text
|
||||
legend.borderaxespad: 1.4 # the border between the axes and legend edge
|
||||
legend.columnspacing: 1.0 # column separation
|
||||
|
||||
#### MATPLOTLIBRC FORMAT
|
||||
|
||||
|
||||
@@ -5,106 +5,265 @@
|
||||
"id": "36f6dc0f",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### OFR Analysis"
|
||||
"# OFR Analysis: File `20260723_OFR_Analysis_01.ipynb`"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 44,
|
||||
"execution_count": 137,
|
||||
"id": "8769766b",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/html": [
|
||||
" <style>\n",
|
||||
" .bk-notebook-logo {\n",
|
||||
" display: block;\n",
|
||||
" width: 20px;\n",
|
||||
" height: 20px;\n",
|
||||
" background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNui8sowAAAOkSURBVDiNjZRtaJVlGMd/1/08zzln5zjP1LWcU9N0NkN8m2CYjpgQYQXqSs0I84OLIC0hkEKoPtiH3gmKoiJDU7QpLgoLjLIQCpEsNJ1vqUOdO7ppbuec5+V+rj4ctwzd8IIbbi6u+8f1539dt3A78eXC7QizUF7gyV1fD1Yqg4JWz84yffhm0qkFqBogB9rM8tZdtwVsPUhWhGcFJngGeWrPzHm5oaMmkfEg1usvLFyc8jLRqDOMru7AyC8saQr7GG7f5fvDeH7Ej8CM66nIF+8yngt6HWaKh7k49Soy9nXurCi1o3qUbS3zWfrYeQDTB/Qj6kX6Ybhw4B+bOYoLKCC9H3Nu/leUTZ1JdRWkkn2ldcCamzrcf47KKXdAJllSlxAOkRgyHsGC/zRday5Qld9DyoM4/q/rUoy/CXh3jzOu3bHUVZeU+DEn8FInkPBFlu3+nW3Nw0mk6vCDiWg8CeJaxEwuHS3+z5RgY+YBR6V1Z1nxSOfoaPa4LASWxxdNp+VWTk7+4vzaou8v8PN+xo+KY2xsw6une2frhw05CTYOmQvsEhjhWjn0bmXPjpE1+kplmmkP3suftwTubK9Vq22qKmrBhpY4jvd5afdRA3wGjFAgcnTK2s4hY0/GPNIb0nErGMCRxWOOX64Z8RAC4oCXdklmEvcL8o0BfkNK4lUg9HTl+oPlQxdNo3Mg4Nv175e/1LDGzZen30MEjRUtmXSfiTVu1kK8W4txyV6BMKlbgk3lMwYCiusNy9fVfvvwMxv8Ynl6vxoByANLTWplvuj/nF9m2+PDtt1eiHPBr1oIfhCChQMBw6Aw0UulqTKZdfVvfG7VcfIqLG9bcldL/+pdWTLxLUy8Qq38heUIjh4XlzZxzQm19lLFlr8vdQ97rjZVOLf8nclzckbcD4wxXMidpX30sFd37Fv/GtwwhzhxGVAprjbg0gCAEeIgwCZyTV2Z1REEW8O4py0wsjeloKoMr6iCY6dP92H6Vw/oTyICIthibxjm/DfN9lVz8IqtqKYLUXfoKVMVQVVJOElGjrnnUt9T9wbgp8AyYKaGlqingHZU/uG2NTZSVqwHQTWkx9hxjkpWDaCg6Ckj5qebgBVbT3V3NNXMSiWSDdGV3hrtzla7J+duwPOToIg42ChPQOQjspnSlp1V+Gjdged7+8UN5CRAV7a5EdFNwCjEaBR27b3W890TE7g24NAP/mMDXRWrGoFPQI9ls/MWO2dWFAar/xcOIImbbpA3zgAAAABJRU5ErkJggg==);\n",
|
||||
" }\n",
|
||||
" </style>\n",
|
||||
" <div>\n",
|
||||
" <a href=\"https://bokeh.org\" target=\"_blank\" class=\"bk-notebook-logo\"></a>\n",
|
||||
" <span id=\"ba7b56ac-409d-4c6f-803b-da270f9806de\">Loading BokehJS ...</span>\n",
|
||||
" </div>\n"
|
||||
]
|
||||
},
|
||||
"metadata": {},
|
||||
"output_type": "display_data"
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"application/javascript": "'use strict';\n(function(root) {\n function now() {\n return new Date();\n }\n\n const force = true;\n\n if (typeof root._bokeh_onload_callbacks === \"undefined\" || force === true) {\n root._bokeh_onload_callbacks = [];\n root._bokeh_is_loading = undefined;\n }\n\nconst JS_MIME_TYPE = 'application/javascript';\n const HTML_MIME_TYPE = 'text/html';\n const EXEC_MIME_TYPE = 'application/vnd.bokehjs_exec.v0+json';\n const CLASS_NAME = 'output_bokeh rendered_html';\n\n /**\n * Render data to the DOM node\n */\n function render(props, node) {\n const script = document.createElement(\"script\");\n node.appendChild(script);\n }\n\n /**\n * Handle when an output is cleared or removed\n */\n function handleClearOutput(event, handle) {\n function drop(id) {\n const view = Bokeh.index.get_by_id(id)\n if (view != null) {\n view.model.document.clear()\n Bokeh.index.delete(view)\n }\n }\n\n const cell = handle.cell;\n\n const id = cell.output_area._bokeh_element_id;\n const server_id = cell.output_area._bokeh_server_id;\n\n // Clean up Bokeh references\n if (id != null) {\n drop(id)\n }\n\n if (server_id !== undefined) {\n // Clean up Bokeh references\n const cmd_clean = \"from bokeh.io.state import curstate; print(curstate().uuid_to_server['\" + server_id + \"'].get_sessions()[0].document.roots[0]._id)\";\n cell.notebook.kernel.execute(cmd_clean, {\n iopub: {\n output: function(msg) {\n const id = msg.content.text.trim()\n drop(id)\n }\n }\n });\n // Destroy server and session\n const cmd_destroy = \"import bokeh.io.notebook as ion; ion.destroy_server('\" + server_id + \"')\";\n cell.notebook.kernel.execute(cmd_destroy);\n }\n }\n\n /**\n * Handle when a new output is added\n */\n function handleAddOutput(event, handle) {\n const output_area = handle.output_area;\n const output = handle.output;\n\n // limit handleAddOutput to display_data with EXEC_MIME_TYPE content only\n if ((output.output_type != \"display_data\") || (!Object.prototype.hasOwnProperty.call(output.data, EXEC_MIME_TYPE))) {\n return\n }\n\n const toinsert = output_area.element.find(\".\" + CLASS_NAME.split(' ')[0]);\n\n if (output.metadata[EXEC_MIME_TYPE][\"id\"] !== undefined) {\n toinsert[toinsert.length - 1].firstChild.textContent = output.data[JS_MIME_TYPE];\n // store reference to embed id on output_area\n output_area._bokeh_element_id = output.metadata[EXEC_MIME_TYPE][\"id\"];\n }\n if (output.metadata[EXEC_MIME_TYPE][\"server_id\"] !== undefined) {\n const bk_div = document.createElement(\"div\");\n bk_div.innerHTML = output.data[HTML_MIME_TYPE];\n const script_attrs = bk_div.children[0].attributes;\n for (let i = 0; i < script_attrs.length; i++) {\n toinsert[toinsert.length - 1].firstChild.setAttribute(script_attrs[i].name, script_attrs[i].value);\n toinsert[toinsert.length - 1].firstChild.textContent = bk_div.children[0].textContent\n }\n // store reference to server id on output_area\n output_area._bokeh_server_id = output.metadata[EXEC_MIME_TYPE][\"server_id\"];\n }\n }\n\n function register_renderer(events, OutputArea) {\n\n function append_mime(data, metadata, element) {\n // create a DOM node to render to\n const toinsert = this.create_output_subarea(\n metadata,\n CLASS_NAME,\n EXEC_MIME_TYPE\n );\n this.keyboard_manager.register_events(toinsert);\n // Render to node\n const props = {data: data, metadata: metadata[EXEC_MIME_TYPE]};\n render(props, toinsert[toinsert.length - 1]);\n element.append(toinsert);\n return toinsert\n }\n\n /* Handle when an output is cleared or removed */\n events.on('clear_output.CodeCell', handleClearOutput);\n events.on('delete.Cell', handleClearOutput);\n\n /* Handle when a new output is added */\n events.on('output_added.OutputArea', handleAddOutput);\n\n /**\n * Register the mime type and append_mime function with output_area\n */\n OutputArea.prototype.register_mime_type(EXEC_MIME_TYPE, append_mime, {\n /* Is output safe? */\n safe: true,\n /* Index of renderer in `output_area.display_order` */\n index: 0\n });\n }\n\n // register the mime type if in Jupyter Notebook environment and previously unregistered\n if (root.Jupyter !== undefined) {\n const events = require('base/js/events');\n const OutputArea = require('notebook/js/outputarea').OutputArea;\n\n if (OutputArea.prototype.mime_types().indexOf(EXEC_MIME_TYPE) == -1) {\n register_renderer(events, OutputArea);\n }\n }\n if (typeof (root._bokeh_timeout) === \"undefined\" || force === true) {\n root._bokeh_timeout = Date.now() + 5000;\n root._bokeh_failed_load = false;\n }\n\n Line truncated
|
||||
"application/vnd.bokehjs_load.v0+json": ""
|
||||
},
|
||||
"metadata": {},
|
||||
"output_type": "display_data"
|
||||
}
|
||||
],
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# Imports\n",
|
||||
"\n",
|
||||
"from defs.computing import OFRSample, OFRAnalyser\n",
|
||||
"import numpy as np\n",
|
||||
"from pathlib import Path\n",
|
||||
"import matplotlib.pyplot as plt\n",
|
||||
"plt.style.use('../.mplstyle')\n",
|
||||
"from matplotlib.ticker import MultipleLocator\n",
|
||||
"import pandas as pd\n",
|
||||
"\n",
|
||||
"from bokeh.plotting import figure, show\n",
|
||||
"from bokeh.io import output_notebook\n",
|
||||
"output_notebook()"
|
||||
"# Specify the source file for this analysis\n",
|
||||
"source_file = Path(r\"C:\\Users\\tschan_d\\Documents\\data_local\\20260612_SET02_EXP01_full.txt\")"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 45,
|
||||
"id": "3922e80c",
|
||||
"cell_type": "markdown",
|
||||
"id": "ee2e9af5",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# Path to the source file\n",
|
||||
"source_file = Path(r\"Z:\\People\\David_Tschan\\data\\OFR_SMPS\\2026\\processed\\06_June\\20260612\\20260612_SET02_EXP01_full.txt\")"
|
||||
"### First we plot a sample spectrum to get a feeling of what the data looks like:"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"execution_count": 114,
|
||||
"id": "76a9b026",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"ename": "AttributeError",
|
||||
"evalue": "unexpected attribute 'show' to figure, possible attributes are above, align, aspect_ratio, aspect_scale, attribution, background_fill_alpha, background_fill_color, background_hatch_alpha, background_hatch_color, background_hatch_extra, background_hatch_pattern, background_hatch_scale, background_hatch_weight, below, border_fill_alpha, border_fill_color, border_hatch_alpha, border_hatch_color, border_hatch_extra, border_hatch_pattern, border_hatch_scale, border_hatch_weight, border_line_alpha, border_line_cap, border_line_color, border_line_dash, border_line_dash_offset, border_line_join, border_line_width, center, context_menu, css_classes, css_variables, disabled, elements, extra_x_ranges, extra_x_scales, extra_y_ranges, extra_y_scales, flow_mode, frame_align, frame_height, frame_width, height, height_policy, hidpi, hold_render, html_attributes, html_id, inner_height, inner_width, js_event_callbacks, js_property_callbacks, left, lod_factor, lod_interval, lod_threshold, lod_timeout, margin, match_aspect, max_height, max_width, min_border, min_border_bottom, min_border_left, min_border_right, min_border_top, min_height, min_width, name, outer_height, outer_width, outline_line_alpha, outline_line_cap, outline_line_color, outline_line_dash, outline_line_dash_offset, outline_line_join, outline_line_width, output_backend, renderers, reset_policy, resizable, right, sizing_mode, styles, stylesheets, subscribed_events, syncable, tags, title, title_location, toolbar, toolbar_inner, toolbar_location, toolbar_sticky, visible, width, width_policy, window_axis, x_range, x_scale, y_range or y_scale",
|
||||
"output_type": "error",
|
||||
"traceback": [
|
||||
"\u001b[31m---------------------------------------------------------------------------\u001b[39m",
|
||||
"\u001b[31mAttributeError\u001b[39m Traceback (most recent call last)",
|
||||
"\u001b[36mCell\u001b[39m\u001b[36m \u001b[39m\u001b[32mIn[47]\u001b[39m\u001b[32m, line 9\u001b[39m\n\u001b[32m 5\u001b[39m \n\u001b[32m 6\u001b[39m p = figure(width=\u001b[32m600\u001b[39m, height=\u001b[32m400\u001b[39m, x_axis_type=\u001b[33m'log'\u001b[39m)\n\u001b[32m 7\u001b[39m p.line(np.power(\u001b[32m10\u001b[39m,sample.Count.var), sample.Count.fct)\n\u001b[32m 8\u001b[39m \n\u001b[32m----> \u001b[39m\u001b[32m9\u001b[39m p.show()\n",
|
||||
"\u001b[36mFile \u001b[39m\u001b[32mc:\\Users\\tschan_d\\AppData\\Local\\miniforge3\\envs\\MA\\Lib\\site-packages\\bokeh\\core\\has_props.py:373\u001b[39m, in \u001b[36mHasProps.__getattr__\u001b[39m\u001b[34m(self, name)\u001b[39m\n\u001b[32m 370\u001b[39m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28misinstance\u001b[39m(descriptor, \u001b[38;5;28mproperty\u001b[39m): \u001b[38;5;66;03m# Python property\u001b[39;00m\n\u001b[32m 371\u001b[39m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28msuper\u001b[39m().\u001b[34m__getattribute__\u001b[39m(name)\n\u001b[32m--> \u001b[39m\u001b[32m373\u001b[39m \u001b[30;43mself\u001b[39;49m\u001b[30;43m.\u001b[39;49m\u001b[30;43m_raise_attribute_error_with_matches\u001b[39;49m\u001b[30;43m(\u001b[39;49m\u001b[30;43mname\u001b[39;49m\u001b[30;43m,\u001b[39;49m\u001b[30;43m \u001b[39;49m\u001b[30;43mproperties\u001b[39;49m\u001b[30;43m)\u001b[39;49m\n",
|
||||
"\u001b[36mFile \u001b[39m\u001b[32mc:\\Users\\tschan_d\\AppData\\Local\\miniforge3\\envs\\MA\\Lib\\site-packages\\bokeh\\core\\has_props.py:386\u001b[39m, in \u001b[36mHasProps._raise_attribute_error_with_matches\u001b[39m\u001b[34m(self, name, properties)\u001b[39m\n\u001b[32m 382\u001b[39m matches, text = \u001b[38;5;28msorted\u001b[39m(properties), \u001b[33m\"\u001b[39m\u001b[33mpossible\u001b[39m\u001b[33m\"\u001b[39m\n\u001b[32m 384\u001b[39m \u001b[38;5;28;01mfrom\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01m.\u001b[39;00m\u001b[34;01m.\u001b[39;00m\u001b[34;01mutil\u001b[39;00m\u001b[34;01m.\u001b[39;00m\u001b[34;01mstrings\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mimport\u001b[39;00m nice_join\n\u001b[32m--> \u001b[39m\u001b[32m386\u001b[39m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mAttributeError\u001b[39;00m(\u001b[33mf\u001b[39m\u001b[33m\"\u001b[39m\u001b[33munexpected attribute \u001b[39m\u001b[38;5;132;01m{\u001b[39;00mname\u001b[38;5;132;01m!r}\u001b[39;00m\u001b[33m to \u001b[39m\u001b[38;5;132;01m{\u001b[39;00m\u001b[38;5;28mself\u001b[39m.\u001b[34m__class__\u001b[39m.\u001b[34m__name__\u001b[39m\u001b[38;5;132;01m}\u001b[39;00m\u001b[33m, \u001b[39m\u001b[38;5;132;01m{\u001b[39;00mtext\u001b[38;5;132;01m}\u001b[39;00m\u001b[33m attributes are \u001b[39m\u001b[38;5;132;01m{\u001b[39;00mnice_join(matches)\u001b[38;5;132;01m}\u001b[39;00m\u001b[33m\"\u001b[39m)\n",
|
||||
"\u001b[31mAttributeError\u001b[39m: unexpected attribute 'show' to figure, possible attributes are above, align, aspect_ratio, aspect_scale, attribution, background_fill_alpha, background_fill_color, background_hatch_alpha, background_hatch_color, background_hatch_extra, background_hatch_pattern, background_hatch_scale, background_hatch_weight, below, border_fill_alpha, border_fill_color, border_hatch_alpha, border_hatch_color, border_hatch_extra, border_hatch_pattern, border_hatch_scale, border_hatch_weight, border_line_alpha, border_line_cap, border_line_color, border_line_dash, border_line_dash_offset, border_line_join, border_line_width, center, context_menu, css_classes, css_variables, disabled, elements, extra_x_ranges, extra_x_scales, extra_y_ranges, extra_y_scales, flow_mode, frame_align, frame_height, frame_width, height, height_policy, hidpi, hold_render, html_attributes, html_id, inner_height, inner_width, js_event_callbacks, js_property_callbacks, left, lod_factor, lod_interval, lod_threshold, lod_timeout, margin, match_aspect, max_height, max_width, min_border, min_border_bottom, min_border_left, min_border_right, min_border_top, min_height, min_width, name, outer_height, outer_width, outline_line_alpha, outline_line_cap, outline_line_color, outline_line_dash, outline_line_dash_offset, outline_line_join, outline_line_width, output_backend, renderers, reset_policy, resizable, right, sizing_mode, styles, stylesheets, subscribed_events, syncable, tags, title, title_location, toolbar, toolbar_inner, toolbar_location, toolbar_sticky, visible, width, width_policy, window_axis, x_range, x_scale, y_range or y_scale"
|
||||
"data": {
|
||||
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA/MAAAJjCAYAAABA7UFUAAAAOnRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjEwLjksIGh0dHBzOi8vbWF0cGxvdGxpYi5vcmcvJkbTWQAAAAlwSFlzAAAPYQAAD2EBqD+naQAA469JREFUeJzs3Qd4k9UXBvCXvffegrL3HgoiIFsEBAVkiLJU/rgXDgQVxYEgioqCDAFlCIiyBEFAlshegjLL3kM29P+895pSSltKm+RL8r2/5wn9SNPk9iZtc7577jmJwsPDwyEiIiIiIiIiQSOx0wMQERERERERkVujYF5EREREREQkyCiYFxEREREREQkyCuZFREREREREgoyCeREREREREZEgo2BeREREREREJMgomBcREREREREJMgrmRURERERERIKMgnkRERERERGRIOPqYP7XX3/Fo48+imLFiiFNmjTIkycP7r//fvz555/R3n7VqlWoV68e0qZNi4wZM6Jly5bYvn37dbfZunUrnn/+eVSsWNHcJnPmzLjzzjsxadKkGMcxbdo03H333UifPr0ZR8mSJTFs2LA4fx9xGZfHrl27zPecO3dupEiRwnzPLVq0iNPjnD59Gi+++CLq16+PbNmyIVGiRHjzzTdvuN2VK1cwcOBANGzYEHnz5kXq1KlRvHhxvPzyyzhx4kScHuvff//FgAEDULZsWTMv6dKlw+23344HH3wQv/32W8TtFixYYMYR02XkyJHmEtttPJfbbrst4n4PHTqERx55BFmzZjXjr169OubNm3fdGE+dOoV33nkHtWvXRs6cOc38ly5d2oz7/PnzMX5vFSpUwFNPPWWO+Rixjclj9OjR5v/RvS6WLFmCJEmSmNedB8cU+X5SpUpl5nLQoEG4evXqdV/P1wpfM3zt8Hu49957zWsqKo6hTZs2KFq0KBInTnzdfCXE8uXLzWswf/785jWZI0cOM9/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xS4MnGtuweB2HG5JYFcDzjW7OUTG7AYWtuRzwK0YTPHn76zI3RRERERExPcUzP+HgTPfOLOKM9+cRubZ/+3Zyx01UOWbd7Z1iorpp0z15ZtiniSIGhjxflkdnPt6I2NKMIN5pvszAGFgG3kPLKupMyi4lXF5bhv1sbivl/uJPa3I2PYtalV4VmCPb/ut48ePm++f+8wZGLDCelxlyJDBVM7mxROcMnWZgVTXrl2vm3PeL9PzvYFzFdOcegLAqBgMct4YLDIojXobPs9MX+Ze6Kh4ciOuY2dVflZ4Zxo3x8PK+awGzzoP0VXyZ0V4T6uzggULXheYMfjj5271e/UFfv+eOWCKPNO2P/74Y1PhnpczZ86Y1HF+H/w55V53fi+sS8CfMW4JiIyf422jBsfRfT+8PrptMgzAo7suuvnyYBo9TzLEdBLpVl7/xJN87DzB1zy/z5jEVF8irlgTwDP/tWrVQtWqVU1XD55QYQeEyNiajhfynDDxbPuI3D1DRERERHxLwfx/gTyDIl646hRdUMTVU7ZKi4rXeVo6RQ3k2b6NgTdXZD3tnSLjSiKDvKg8K46eFWyOK/IJBu6nvdVxRbcvOvLjeR6Lq7xcoYuMPenjG8gz+ObJAAa4sY0hLrgHncENT3Rs3bo1TkXf4rtKGdOcUtQ+3wzkuZea88iTLKxLine truncated
|
||||
"text/plain": [
|
||||
"<Figure size 1000x600 with 2 Axes>"
|
||||
]
|
||||
},
|
||||
"metadata": {},
|
||||
"output_type": "display_data"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"# First load and get the data of sample 33 (arbitrary) and create a sample object\n",
|
||||
"sample_number = 33\n",
|
||||
"sample = OFRSample(source_file = source_file, sample_number = sample_number)\n",
|
||||
"\n",
|
||||
"#Plotting and saying the data\n",
|
||||
"fig = plt.figure(figsize=(10,6), constrained_layout = True)\n",
|
||||
"ax = fig.add_subplot(111)\n",
|
||||
"ax.set_xscale('log')\n",
|
||||
"ax_2 = plt.twinx(ax)\n",
|
||||
"\n",
|
||||
"ax.plot(np.power(10, sample.Count.var), sample.Count.fct, color='red', label='$dN/dlogD$')\n",
|
||||
"ax_2.plot(np.power(10, sample.Mass.var), sample.Mass.fct / 1E12, color='blue', label='$dm/dlogD$')\n",
|
||||
"\n",
|
||||
"ax.set_title('2026-06-12 SET02/EXP01: Sample Nr. ' + str(sample_number))\n",
|
||||
"ax.set_xlabel('Particle Diameter $D$ $(nm)$')\n",
|
||||
"ax.set_ylabel('Number Denisty $dN/dlogD$ $(cm^{-3})$')\n",
|
||||
"ax_2.set_ylabel('Mass Denisty $dm/dlogD$ $(mg cm^{-3})$')\n",
|
||||
"\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)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "041fc7b6",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## Now let's load the data for the entire sampling experiment:"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 115,
|
||||
"id": "8db19b57",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
" Sample Number (#/cm^3) Length (mm/cm^3) Surface (mm^2/cm^3) \\\n",
|
||||
"0 1 3.090062e+00 0.001888 1.241420e-05 \n",
|
||||
"1 2 3.454977e+00 0.000126 3.560755e-08 \n",
|
||||
"2 3 9.325444e+00 0.001036 8.623624e-07 \n",
|
||||
"3 4 4.171921e+02 0.402549 2.812996e-03 \n",
|
||||
"4 5 1.052317e+05 6.641894 4.353249e-03 \n",
|
||||
".. ... ... ... ... \n",
|
||||
"151 152 9.529171e+05 177.681731 3.199811e-01 \n",
|
||||
"152 153 1.017064e+06 181.659088 3.188865e-01 \n",
|
||||
"153 154 1.041903e+06 186.626996 3.273445e-01 \n",
|
||||
"154 155 1.008587e+06 181.815120 3.214411e-01 \n",
|
||||
"155 156 9.957403e+05 182.039508 3.234802e-01 \n",
|
||||
"\n",
|
||||
" Volume (μm^3/cm^3) Density (pg/μm^3) Mass (mg/cm^3) Time (s) \n",
|
||||
"0 0.836666 1.2 1.003999e-03 180.0 \n",
|
||||
"1 0.000109 1.2 1.302891e-07 360.0 \n",
|
||||
"2 0.007271 1.2 8.725170e-06 540.0 \n",
|
||||
"3 196.905653 1.2 2.362868e-01 720.0 \n",
|
||||
"4 38.618096 1.2 4.634172e-02 900.0 \n",
|
||||
".. ... ... ... ... \n",
|
||||
"151 7645.085680 1.2 9.174103e+00 27360.0 \n",
|
||||
"152 7524.532677 1.2 9.029439e+00 27540.0 \n",
|
||||
"153 7732.212330 1.2 9.278655e+00 27720.0 \n",
|
||||
"154 7646.483862 1.2 9.175781e+00 27900.0 \n",
|
||||
"155 7694.993582 1.2 9.233992e+00 28080.0 \n",
|
||||
"\n",
|
||||
"[156 rows x 8 columns]\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"# Plotting one of the spectra to show properties\n",
|
||||
"sample_number_list = [int(i) for i in range(1, 157)]\n",
|
||||
"\n",
|
||||
"# first load and get the data of sample 57 (arbitrary)\n",
|
||||
"sample = OFRSample(source_file = source_file, sample_number = 33)\n",
|
||||
"analyser = OFRAnalyser(source_file = source_file, sample_number_list=sample_number_list)\n",
|
||||
"analyser.Analyse()\n",
|
||||
"\n",
|
||||
"p = figure(width=600, height=400, x_axis_type='log')\n",
|
||||
"p.line(sample.Count.var, sample.Count.fct)\n",
|
||||
"print(analyser.data)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "3a2ae595",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"We first plot the overall timeseries of total aerosol count and mass:"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 134,
|
||||
"id": "a4477003",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA/MAAAGbCAYAAACIxMC9AAAAOnRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjEwLjksIGh0dHBzOi8vbWF0cGxvdGxpYi5vcmcvJkbTWQAAAAlwSFlzAAAPYQAAD2EBqD+naQAA2nJJREFUeJzsnQd4FNXXxg9JIEASeu8gRTqiIBYUsQCiiAUFRVQUK4qinwULgoqi/BUbFgSxYQFsKIgKKKgUFUSKIL1KbwkkIZD5nvfe3M1ks7vZ3Wzf9/c8k92dnezOzM7sznvPOe8pYVmWJYQQQgghhBBCCIkaEsK9AoQQQgghhBBCCPENinlCCCGEEEIIISTKoJgnhBBCCCGEEEKiDIp5QgghhBBCCCEkyqCYJ4QQQgghhBBCogyKeUIIIYQQQgghJMqgmCeEEEIIIYQQQqIMinlCCCGEEEIIISTKoJgnhBBCCCGEEEKijLgW83PmzJGBAwfKySefLCkpKVK7dm257LLL5M8//3S5/JIlS+SCCy6Q1NRUqVChglxxxRWyYcOGAsv8+++/8sADD8ipp56qlqlUqZKcddZZMnXqVLfr8dVXX8m5554r5cqVU+vRsmVLefvtt73eDm/Wy7B582a1zbVq1ZLk5GS1zZdffrlX75Oeni4PPvigXHTRRVK1alUpUaKEPPnkk4WWO3HihLz44ovSvXt3qVOnjpQtW1aaN28uDz/8sBw8eNCr9zpy5IiMHj1a2rZtq/ZLWlqanHTSSXL11VfLzz//7Fjup59+Uuvhbpo0aZKaPC1jpgYNGjhed/fu3XLjjTdKlSpV1PqfccYZMnv27ALrePjwYXnmmWekS5cuUqNGDbX/W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ajuHDh3qmIdjD8f+5s2bC7zXmDFj1P+vXLmywLa2bt26wD5YvHhxoe8FX9LsP/nkE7Xsm2++6XE57P/mzZs7Hrdv394688wzCywzbtw49VrLly9Xj7ds2aK+X+++++5C5U01atQoUNph9qOrchtv3gvg+MBkwD5x/mwAyjwwH69h0vlLlSpljRw50nHO4fmHHnpInd8m3X3QoEHqWPOG//77r8Dxffrpp6tz0BU4J81yJUqUUL8LhBBCCCHOMDJvAxEsRLZeeukllY7sjKcUc3fPIaoG92dExpzT6RElQkQKqdNYBqnxiDRiORhMIbJulnMXsfR2vUyUF6mtMFFCuioiWF9++aXs3bvXkYZrIkLFjW7bQWkBIoV4bUSZvEnXRvQNkWzsB0RK69atqyKsMJ+zp7kaYOgGwzbnCSm3/uDPZ420ZWQ6YF1dGVUhAwNRQefoGqJ9rtbdnXnXK6+8ovYlsEcJnUEGASKUmNC9ANHn6667TsaPH1/sbS0KHDeu0trdAad85+1ftGhRgWWQEo1oLFKbYTyHffDxxx+7TD1GtBPZJwZkpCCajAwVnD/IWMH6oeQB3QrsxzuOVTxvT1UHrjIqPO03vI4Bn3njxo1VNBzu5Aa4myPCb3c1R4YAvgvwmdnXC9F9YO/mABD9t+8Dk2nh7JQeaLD/7ccHUtXRWWHNmjUFjA2R/dCqVSv1GNkG2BYYOtq3DZ8Vzm1XXQFc7Xdv3ssV2Lfo2oBjwf7+MBBFRwrz/qaDBaLx5jzD/yH9HtkCv/zyi5qLine truncated
|
||||
"text/plain": [
|
||||
"<Figure size 1000x400 with 2 Axes>"
|
||||
]
|
||||
},
|
||||
"metadata": {},
|
||||
"output_type": "display_data"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"fig = plt.figure(figsize=(10,4), constrained_layout = True)\n",
|
||||
"ax = fig.add_subplot(111)\n",
|
||||
"ax_2 = plt.twinx(ax)\n",
|
||||
"\n",
|
||||
"p.show()"
|
||||
"ax.plot(analyser.data['Time (s)'], analyser.data['Number (#/cm^3)'], color='red', label='Number')\n",
|
||||
"ax_2.plot(analyser.data['Time (s)'], analyser.data['Mass (mg/cm^3)'], color='blue', label='Mass')\n",
|
||||
"\n",
|
||||
"ax.set_title('2026-06-12 SET02/EXP01: Experiment Overview ' + str(sample_number))\n",
|
||||
"ax.set_xlabel('Time $(s)$')\n",
|
||||
"ax.set_ylabel('Number Density $(cm^{-3})$')\n",
|
||||
"ax_2.set_ylabel('Mass Denisty $(mg cm^{-3})$')\n",
|
||||
"ax.xaxis.set_minor_locator(MultipleLocator(base=180, offset=0))\n",
|
||||
"ax.xaxis.set_major_locator(MultipleLocator(base=1800, offset=0))\n",
|
||||
"\n",
|
||||
"ax.set_xlim([0, 30000])\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.pdf\", format='pdf', dpi=400)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"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:"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 159,
|
||||
"id": "dec710d2",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# Reading from disk\n",
|
||||
"\n",
|
||||
"source_file_for_flows = Path(r\"C:\\Users\\tschan_d\\Documents\\data_local\\20260612_SET02_EXP01_full_flows.txt\")\n",
|
||||
"\n",
|
||||
"dry_air_flows = []\n",
|
||||
"species_flows = []\n",
|
||||
"ozone_flows = []\n",
|
||||
"numbers_of_samples = []\n",
|
||||
"\n",
|
||||
"with open(source_file_for_flows, 'r', errors='ignore') as file:\n",
|
||||
" for i,line in enumerate(file.readlines()):\n",
|
||||
" if i >= 2:\n",
|
||||
" items = line.split()\n",
|
||||
" dry_air_flows.append(float(items[0]))\n",
|
||||
" species_flows.append(float(items[1]))\n",
|
||||
" ozone_flows.append(float(items[2]))\n",
|
||||
" numbers_of_samples.append(float(items[-1]))\n",
|
||||
"\n",
|
||||
"flow_data = pd.DataFrame({'Dry Air (L/min)': dry_air_flows, 'Species (L/min)': species_flows, 'Ozone (L/min)': ozone_flows, 'Samples': numbers_of_samples})"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "2363080b",
|
||||
"id": "75347e52",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": []
|
||||
"source": [
|
||||
"fig = plt.figure(figsize=(10,4), constrained_layout = True)\n",
|
||||
"ax = fig.add_subplot(111)\n",
|
||||
"ax_2 = plt.twinx(ax)\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"ax.plot([], analyser.data['Number (#/cm^3)'], color='red', label='Number')\n",
|
||||
"ax_2.plot(analyser.data['Time (s)'], analyser.data['Mass (mg/cm^3)'], color='blue', label='Mass')\n",
|
||||
"\n",
|
||||
"ax.set_title('2026-06-12 SET02/EXP01: Experiment Overview ' + str(sample_number))\n",
|
||||
"ax.set_xlabel('Time $(s)$')\n",
|
||||
"ax.set_ylabel('Number Density $(cm^{-3})$')\n",
|
||||
"ax_2.set_ylabel('Mass Denisty $(mg cm^{-3})$')\n",
|
||||
"ax.xaxis.set_minor_locator(MultipleLocator(base=180, offset=0))\n",
|
||||
"ax.xaxis.set_major_locator(MultipleLocator(base=1800, offset=0))\n",
|
||||
"\n",
|
||||
"ax.set_xlim([0, 30000])\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.pdf\", format='pdf', dpi=400)"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Reference in new issue
Block a user