From 19fe6530748ba481b5060171bf6a43a81cab90d7 Mon Sep 17 00:00:00 2001 From: sH4MbLe5 <110418075+sH4MbLe5@users.noreply.github.com> Date: Mon, 18 Sep 2023 19:41:13 +0200 Subject: [PATCH] Delete test_notebook.ipynb --- test_notebook.ipynb | 317 -------------------------------------------- 1 file changed, 317 deletions(-) delete mode 100644 test_notebook.ipynb diff --git a/test_notebook.ipynb b/test_notebook.ipynb deleted file mode 100644 index c7ca187..0000000 --- a/test_notebook.ipynb +++ /dev/null @@ -1,317 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 1, - "metadata": {}, - "outputs": [], - "source": [ - "import os\n", - "import json\n", - "from sdRDM import DataModel\n", - "from datamodel_b07_tc.tools import Calibrator\n", - "from pathlib import Path\n", - "from datamodel_b07_tc.tools.python_api.analysis import Analysis\n", - "from datamodel_b07_tc.tools.python_api.calibration import Calibration\n", - "from datamodel_b07_tc.tools.python_api.data import Data\n", - "from datamodel_b07_tc.tools.python_api.quantity import Quantity" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "metadata": {}, - "outputs": [], - "source": [ - "root = Path(os.path.abspath(''))\n", - "path_data = root / 'data'\n", - "path_calibration_data = path_data / 'calibration'\n", - "json_file_path = path_calibration_data / 'calibration.json'" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": {}, - "outputs": [ - { - "ename": "TypeError", - "evalue": "Calibrator.available_json_files() got an unexpected keyword argument 'path_to_dir'", - "output_type": "error", - "traceback": [ - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mTypeError\u001b[0m Traceback (most recent call last)", - "\u001b[1;32m/mnt/c/Users/rscho/Documents/GitHub/datamodel_b07_tc/test_notebook.ipynb Cell 3\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0m dict_paths \u001b[39m=\u001b[39m Calibrator\u001b[39m.\u001b[39;49mavailable_json_files(path_to_dir\u001b[39m=\u001b[39;49mpath_calibration_data)\n\u001b[1;32m 2\u001b[0m \u001b[39mfor\u001b[39;00m count, path \u001b[39min\u001b[39;00m dict_paths\u001b[39m.\u001b[39mitems():\n\u001b[1;32m 3\u001b[0m \u001b[39mprint\u001b[39m(\u001b[39mf\u001b[39m\u001b[39m'\u001b[39m\u001b[39m{\u001b[39;00mcount\u001b[39m}\u001b[39;00m\u001b[39m:\u001b[39m\u001b[39m{\u001b[39;00mpath\u001b[39m}\u001b[39;00m\u001b[39m'\u001b[39m)\n", - "\u001b[0;31mTypeError\u001b[0m: Calibrator.available_json_files() got an unexpected keyword argument 'path_to_dir'" - ] - } - ], - "source": [ - "dict_paths = Calibrator.available_json_files(path_to_dir=path_calibration_data)\n", - "for count, path in dict_paths.items():\n", - " print(f'{count}:{path}')" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "calibrator = Calibrator.from_json_file(path_to_json=dict_paths[0])" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "analysis = calibrator.calibrate()" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\u001b[4mAnalysis\u001b[0m\n", - "├── \u001b[94mid\u001b[0m = analysis1\n", - "└── \u001b[94mcalibrations\u001b[0m\n", - " ├── 0\n", - " │ └── \u001b[4mCalibration\u001b[0m\n", - " │ ├── \u001b[94mid\u001b[0m = calibration6\n", - " │ ├── \u001b[94mspecies\u001b[0m = H2\n", - " │ ├── \u001b[94mpeak_areas\u001b[0m\n", - " │ │ └── \u001b[4mData\u001b[0m\n", - " │ │ ├── \u001b[94mid\u001b[0m = data35\n", - " │ │ ├── \u001b[94mquantity\u001b[0m = Peak area\n", - " │ │ └── \u001b[94mvalues\u001b[0m = [71.0, 153.0, 330.0, ...]\n", - " │ ├── \u001b[94mconcentrations\u001b[0m\n", - " │ │ └── \u001b[4mData\u001b[0m\n", - " │ │ ├── \u001b[94mid\u001b[0m = data36\n", - " │ │ ├── \u001b[94mquantity\u001b[0m = Concentration\n", - " │ │ ├── \u001b[94mvalues\u001b[0m = [5.0, 10.0, 20.0, ...]\n", - " │ │ └── \u001b[94munit\u001b[0m = %\n", - " │ ├── \u001b[94mslope\u001b[0m\n", - " │ │ └── \u001b[4mData\u001b[0m\n", - " │ │ ├── \u001b[94mid\u001b[0m = data47\n", - " │ │ ├── \u001b[94mquantity\u001b[0m = Slope\n", - " │ │ ├── \u001b[94mvalues\u001b[0m = [0.0576882835238838, ...]\n", - " │ │ └── \u001b[94munit\u001b[0m = %\n", - " │ ├── \u001b[94mintercept\u001b[0m\n", - " │ │ └── \u001b[4mData\u001b[0m\n", - " │ │ ├── \u001b[94mid\u001b[0m = data48\n", - " │ │ ├── \u001b[94mquantity\u001b[0m = Intercept\n", - " │ │ ├── \u001b[94mvalues\u001b[0m = [1.0135636425894585, ...]\n", - " │ │ └── \u001b[94munit\u001b[0m = %\n", - " │ └── \u001b[94mcoefficient_of_determination\u001b[0m\n", - " │ └── \u001b[4mData\u001b[0m\n", - " │ ├── \u001b[94mid\u001b[0m = data49\n", - " │ ├── \u001b[94mquantity\u001b[0m = Coefficient of determination\n", - " │ └── \u001b[94mvalues\u001b[0m = [0.9996555416353008, ...]\n", - " ├── 1\n", - " │ └── \u001b[4mCalibration\u001b[0m\n", - " │ ├── \u001b[94mid\u001b[0m = calibration7\n", - " │ ├── \u001b[94mspecies\u001b[0m = CO\n", - " │ ├── \u001b[94mpeak_areas\u001b[0m\n", - " │ │ └── \u001b[4mData\u001b[0m\n", - " │ │ ├── \u001b[94mid\u001b[0m = data37\n", - " │ │ ├── \u001b[94mquantity\u001b[0m = Peak area\n", - " │ │ └── \u001b[94mvalues\u001b[0m = [797.0, 1328.0, 7223.0, ...]\n", - " │ ├── \u001b[94mconcentrations\u001b[0m\n", - " │ │ └── \u001b[4mData\u001b[0m\n", - " │ │ ├── \u001b[94mid\u001b[0m = data38\n", - " │ │ ├── \u001b[94mquantity\u001b[0m = Concentration\n", - " │ │ ├── \u001b[94mvalues\u001b[0m = [0.5, 1.0, 5.0, ...]\n", - " │ │ └── \u001b[94munit\u001b[0m = %\n", - " │ ├── \u001b[94mslope\u001b[0m\n", - " │ │ └── \u001b[4mData\u001b[0m\n", - " │ │ ├── \u001b[94mid\u001b[0m = data50\n", - " │ │ ├── \u001b[94mquantity\u001b[0m = Slope\n", - " │ │ ├── \u001b[94mvalues\u001b[0m = [0.0006912740171292098, ...]\n", - " │ │ └── \u001b[94munit\u001b[0m = %\n", - " │ ├── \u001b[94mintercept\u001b[0m\n", - " │ │ └── \u001b[4mData\u001b[0m\n", - " │ │ ├── \u001b[94mid\u001b[0m = data51\n", - " │ │ ├── \u001b[94mquantity\u001b[0m = Intercept\n", - " │ │ ├── \u001b[94mvalues\u001b[0m = [0.012656829292048588, ...]\n", - " │ │ └── \u001b[94munit\u001b[0m = %\n", - " │ └── \u001b[94mcoefficient_of_determination\u001b[0m\n", - " │ └── \u001b[4mData\u001b[0m\n", - " │ ├── \u001b[94mid\u001b[0m = data52\n", - " │ ├── \u001b[94mquantity\u001b[0m = Coefficient of determination\n", - " │ └── \u001b[94mvalues\u001b[0m = [0.999269735035067, ...]\n", - " ├── 2\n", - " │ └── \u001b[4mCalibration\u001b[0m\n", - " │ ├── \u001b[94mid\u001b[0m = calibration8\n", - " │ ├── \u001b[94mspecies\u001b[0m = CO2\n", - " │ ├── \u001b[94mpeak_areas\u001b[0m\n", - " │ │ └── \u001b[4mData\u001b[0m\n", - " │ │ ├── \u001b[94mid\u001b[0m = data39\n", - " │ │ ├── \u001b[94mquantity\u001b[0m = Peak area\n", - " │ │ └── \u001b[94mvalues\u001b[0m = [0.0, 38653.0, ...]\n", - " │ ├── \u001b[94mconcentrations\u001b[0m\n", - " │ │ └── \u001b[4mData\u001b[0m\n", - " │ │ ├── \u001b[94mid\u001b[0m = data40\n", - " │ │ ├── \u001b[94mquantity\u001b[0m = Concentration\n", - " │ │ ├── \u001b[94mvalues\u001b[0m = [0.0, 50.0, ...]\n", - " │ │ └── \u001b[94munit\u001b[0m = %\n", - " │ ├── \u001b[94mslope\u001b[0m\n", - " │ │ └── \u001b[4mData\u001b[0m\n", - " │ │ ├── \u001b[94mid\u001b[0m = data53\n", - " │ │ ├── \u001b[94mquantity\u001b[0m = Slope\n", - " │ │ ├── \u001b[94mvalues\u001b[0m = [0.0012935606550591157, ...]\n", - " │ │ └── \u001b[94munit\u001b[0m = %\n", - " │ ├── \u001b[94mintercept\u001b[0m\n", - " │ │ └── \u001b[4mData\u001b[0m\n", - " │ │ ├── \u001b[94mid\u001b[0m = data54\n", - " │ │ ├── \u001b[94mquantity\u001b[0m = Intercept\n", - " │ │ ├── \u001b[94mvalues\u001b[0m = [0.0, ...]\n", - " │ │ └── \u001b[94munit\u001b[0m = %\n", - " │ └── \u001b[94mcoefficient_of_determination\u001b[0m\n", - " │ └── \u001b[4mData\u001b[0m\n", - " │ ├── \u001b[94mid\u001b[0m = data55\n", - " │ ├── \u001b[94mquantity\u001b[0m = Coefficient of determination\n", - " │ └── \u001b[94mvalues\u001b[0m = [1.0, ...]\n", - " ├── 3\n", - " │ └── \u001b[4mCalibration\u001b[0m\n", - " │ ├── \u001b[94mid\u001b[0m = calibration9\n", - " │ ├── \u001b[94mspecies\u001b[0m = CH4\n", - " │ ├── \u001b[94mpeak_areas\u001b[0m\n", - " │ │ └── \u001b[4mData\u001b[0m\n", - " │ │ ├── \u001b[94mid\u001b[0m = data41\n", - " │ │ ├── \u001b[94mquantity\u001b[0m = Peak area\n", - " │ │ └── \u001b[94mvalues\u001b[0m = [5727.0, 11991.0, ...]\n", - " │ ├── \u001b[94mconcentrations\u001b[0m\n", - " │ │ └── \u001b[4mData\u001b[0m\n", - " │ │ ├── \u001b[94mid\u001b[0m = data42\n", - " │ │ ├── \u001b[94mquantity\u001b[0m = Concentration\n", - " │ │ ├── \u001b[94mvalues\u001b[0m = [5.0, 10.0, ...]\n", - " │ │ └── \u001b[94munit\u001b[0m = %\n", - " │ ├── \u001b[94mslope\u001b[0m\n", - " │ │ └── \u001b[4mData\u001b[0m\n", - " │ │ ├── \u001b[94mid\u001b[0m = data56\n", - " │ │ ├── \u001b[94mquantity\u001b[0m = Slope\n", - " │ │ ├── \u001b[94mvalues\u001b[0m = [0.0007982120051085569, ...]\n", - " │ │ └── \u001b[94munit\u001b[0m = %\n", - " │ ├── \u001b[94mintercept\u001b[0m\n", - " │ │ └── \u001b[4mData\u001b[0m\n", - " │ │ ├── \u001b[94mid\u001b[0m = data57\n", - " │ │ ├── \u001b[94mquantity\u001b[0m = Intercept\n", - " │ │ ├── \u001b[94mvalues\u001b[0m = [0.4286398467432946, ...]\n", - " │ │ └── \u001b[94munit\u001b[0m = %\n", - " │ └── \u001b[94mcoefficient_of_determination\u001b[0m\n", - " │ └── \u001b[4mData\u001b[0m\n", - " │ ├── \u001b[94mid\u001b[0m = data58\n", - " │ ├── \u001b[94mquantity\u001b[0m = Coefficient of determination\n", - " │ └── \u001b[94mvalues\u001b[0m = [1.0, ...]\n", - " ├── 4\n", - " │ └── \u001b[4mCalibration\u001b[0m\n", - " │ ├── \u001b[94mid\u001b[0m = calibration10\n", - " │ ├── \u001b[94mspecies\u001b[0m = C2H4\n", - " │ ├── \u001b[94mpeak_areas\u001b[0m\n", - " │ │ └── \u001b[4mData\u001b[0m\n", - " │ │ ├── \u001b[94mid\u001b[0m = data43\n", - " │ │ ├── \u001b[94mquantity\u001b[0m = Peak area\n", - " │ │ └── \u001b[94mvalues\u001b[0m = [1122.0, 4864.0, 7297.0, ...]\n", - " │ ├── \u001b[94mconcentrations\u001b[0m\n", - " │ │ └── \u001b[4mData\u001b[0m\n", - " │ │ ├── \u001b[94mid\u001b[0m = data44\n", - " │ │ ├── \u001b[94mquantity\u001b[0m = Concentration\n", - " │ │ ├── \u001b[94mvalues\u001b[0m = [0.5, 2.0, 3.0, ...]\n", - " │ │ └── \u001b[94munit\u001b[0m = %\n", - " │ ├── \u001b[94mslope\u001b[0m\n", - " │ │ └── \u001b[4mData\u001b[0m\n", - " │ │ ├── \u001b[94mid\u001b[0m = data59\n", - " │ │ ├── \u001b[94mquantity\u001b[0m = Slope\n", - " │ │ ├── \u001b[94mvalues\u001b[0m = [0.00040452052875149003, ...]\n", - " │ │ └── \u001b[94munit\u001b[0m = %\n", - " │ ├── \u001b[94mintercept\u001b[0m\n", - " │ │ └── \u001b[4mData\u001b[0m\n", - " │ │ ├── \u001b[94mid\u001b[0m = data60\n", - " │ │ ├── \u001b[94mquantity\u001b[0m = Intercept\n", - " │ │ ├── \u001b[94mvalues\u001b[0m = [0.042251272197985745, ...]\n", - " │ │ └── \u001b[94munit\u001b[0m = %\n", - " │ └── \u001b[94mcoefficient_of_determination\u001b[0m\n", - " │ └── \u001b[4mData\u001b[0m\n", - " │ ├── \u001b[94mid\u001b[0m = data61\n", - " │ ├── \u001b[94mquantity\u001b[0m = Coefficient of determination\n", - " │ └── \u001b[94mvalues\u001b[0m = [0.9999534565195388, ...]\n", - " └── 5\n", - " └── \u001b[4mCalibration\u001b[0m\n", - " ├── \u001b[94mid\u001b[0m = calibration11\n", - " ├── \u001b[94mspecies\u001b[0m = C2H6\n", - " ├── \u001b[94mpeak_areas\u001b[0m\n", - " │ └── \u001b[4mData\u001b[0m\n", - " │ ├── \u001b[94mid\u001b[0m = data45\n", - " │ ├── \u001b[94mquantity\u001b[0m = Peak area\n", - " │ └── \u001b[94mvalues\u001b[0m = [0.0, 12168.0, ...]\n", - " ├── \u001b[94mconcentrations\u001b[0m\n", - " │ └── \u001b[4mData\u001b[0m\n", - " │ ├── \u001b[94mid\u001b[0m = data46\n", - " │ ├── \u001b[94mquantity\u001b[0m = Concentration\n", - " │ ├── \u001b[94mvalues\u001b[0m = [0.0, 5.0, ...]\n", - " │ └── \u001b[94munit\u001b[0m = %\n", - " ├── \u001b[94mslope\u001b[0m\n", - " │ └── \u001b[4mData\u001b[0m\n", - " │ ├── \u001b[94mid\u001b[0m = data62\n", - " │ ├── \u001b[94mquantity\u001b[0m = Slope\n", - " │ ├── \u001b[94mvalues\u001b[0m = [0.0004109138724523339, ...]\n", - " │ └── \u001b[94munit\u001b[0m = %\n", - " ├── \u001b[94mintercept\u001b[0m\n", - " │ └── \u001b[4mData\u001b[0m\n", - " │ ├── \u001b[94mid\u001b[0m = data63\n", - " │ ├── \u001b[94mquantity\u001b[0m = Intercept\n", - " │ ├── \u001b[94mvalues\u001b[0m = [4.440892098500626e-16, ...]\n", - " │ └── \u001b[94munit\u001b[0m = %\n", - " └── \u001b[94mcoefficient_of_determination\u001b[0m\n", - " └── \u001b[4mData\u001b[0m\n", - " ├── \u001b[94mid\u001b[0m = data64\n", - " ├── \u001b[94mquantity\u001b[0m = Coefficient of determination\n", - " └── \u001b[94mvalues\u001b[0m = [1.0, ...]\n", - "\n" - ] - } - ], - "source": [ - "print(analysis)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# calibrator.c" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "b07", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.10.4" - }, - "orig_nbformat": 4 - }, - "nbformat": 4, - "nbformat_minor": 2 -}