diff --git a/.gitignore b/.gitignore index 1a4c111..8555380 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,8 @@ -# experimental data -data/ +# raw data +data/Rohdaten + +# generated datasets +datasets/* # GitHub .github/ @@ -10,9 +13,20 @@ data/ # images *.png +# log files +*.log + #compiled python files *.pyc +# generated python objects .datamodel_b07_tc/core + +# compiled bython files .datamodel_b07_tc/__pycache__ -todo.txt \ No newline at end of file + +# to do list for this notebook +todo.txt + +# test notebook to try new things +test_notebook.ipynb \ No newline at end of file diff --git a/data/calibration/calibration.json b/data/calibration/calibration.json new file mode 100644 index 0000000..7565e1c --- /dev/null +++ b/data/calibration/calibration.json @@ -0,0 +1,74 @@ +{ + "Hydrogen": { + "chemical_formula": "H2", + "peak_areas": [ + 71, + 153, + 330 + ], + "concentrations": [ + 5, + 10, + 20 + ] + }, + "Carbon monoxide": { + "chemical_formula": "CO", + "peak_areas": [ + 797, + 1328, + 7223 + ], + "concentrations": [ + 0.5, + 1, + 5 + ] + }, + "Carbon dioxide": { + "chemical_formula": "CO2", + "peak_areas": [ + 0, + 38653 + ], + "concentrations": [ + 0, + 50 + ] + }, + "Methane": { + "chemical_formula": "CH4", + "peak_areas": [ + 5727, + 11991 + ], + "concentrations": [ + 5, + 10 + ] + }, + "Ethene": { + "chemical_formula": "C2H4", + "peak_areas": [ + 1122, + 4864, + 7297 + ], + "concentrations": [ + 0.5, + 2, + 3 + ] + }, + "Ethane": { + "chemical_formula": "C2H6", + "peak_areas": [ + 0, + 12168 + ], + "concentrations": [ + 0, + 5 + ] + } +} \ No newline at end of file diff --git a/data/correction_factors/correction_factors.json b/data/correction_factors/correction_factors.json new file mode 100644 index 0000000..c15a9c7 --- /dev/null +++ b/data/correction_factors/correction_factors.json @@ -0,0 +1,6 @@ +{ + "H2": 1.01, + "CO": 0.74, + "CO2": 1.00, + "CH4": 0.76 +} \ No newline at end of file diff --git a/data/faraday_coefficients/faraday_coefficients.json b/data/faraday_coefficients/faraday_coefficients.json new file mode 100644 index 0000000..20ff85d --- /dev/null +++ b/data/faraday_coefficients/faraday_coefficients.json @@ -0,0 +1,8 @@ +{ + "H2": 2, + "CO": 2, + "CO2": 2, + "CH4": 8, + "C2H4": 12, + "C2H6": 16 +} \ No newline at end of file diff --git a/project_b07.ipynb b/project_b07.ipynb deleted file mode 100644 index 08f96a8..0000000 --- a/project_b07.ipynb +++ /dev/null @@ -1,224 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 1, - "metadata": {}, - "outputs": [], - "source": [ - "# import matplotlib.pyplot as plt\n", - "# import numpy as np\n", - "# import networkx as nx\n", - "# import pandas as pd\n", - "# from DEXPI2sdRDM import DEXPI2sdRDM" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "metadata": {}, - "outputs": [], - "source": [ - "from pathlib import Path\n", - "from sdRDM import DataModel" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Set up the data model and the correct path to the working directory." - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": {}, - "source": [ - "**Load data model from git or markdown file.**" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": {}, - "outputs": [], - "source": [ - "# lib = DataModel.from_markdown('specifications/datamodel_b07_tc.md')\n", - "lib = DataModel.from_git(url='https://github.com/FAIRChemistry/datamodel_b07_tc.git')" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": {}, - "source": [ - "**Set path to current working directory.**" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "metadata": {}, - "outputs": [], - "source": [ - "current_directory = Path.cwd()" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": {}, - "source": [ - "**Initialize Dataset of the project.**" - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{\n", - " \"id\": \"dataset0\",\n", - " \"__source__\": {\n", - " \"root\": \"Dataset\",\n", - " \"repo\": \"https://github.com/FAIRChemistry/datamodel_b07_tc.git\",\n", - " \"commit\": \"9912afb05db484f584a303b48ec8d39925b4408e\",\n", - " \"url\": \"https://github.com/FAIRChemistry/datamodel_b07_tc/tree/9912afb05db484f584a303b48ec8d39925b4408e\"\n", - " }\n", - "}\n" - ] - } - ], - "source": [ - "dataset = lib.Dataset()\n", - "print(dataset.json())" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": {}, - "source": [ - "**Store general information about the project like the title of the project, the authors and a project description into the data model.**" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "metadata": {}, - "outputs": [], - "source": [ - "gen_inf = lib.GeneralInformation()\n", - "title = 'Electrocatalytic CO2-reduction on carbon'\n", - "gen_inf.title = title\n", - "description = 'The aim of this project is to blablabla'\n", - "gen_inf.description = description\n", - "author_1 = lib.Author(name= 'Richard Schömig', affiliation = 'University of Stuttgart')\n", - "author_2 = lib.Author(name= 'Maximilian Schmidt', affiliation = 'University of Stuttgart')\n", - "gen_inf.authors = [author_1, author_2]\n", - "dataset.general_information = gen_inf" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": {}, - "source": [ - "**Load P&ID file.**" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "metadata": {}, - "outputs": [], - "source": [ - "# filename = \"column\"\n", - "# path = \"./f'{filename}'\"" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "metadata": {}, - "source": [ - "**Load DEXPI conform P&ID file into the data model using the ``DEXPI2sdRDM`` module.**" - ] - }, - { - "cell_type": "code", - "execution_count": 8, - "metadata": {}, - "outputs": [], - "source": [ - "# DEXPI2sdRDM(\n", - "# )" - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "metadata": {}, - "outputs": [], - "source": [ - "path_to_datasets = current_directory / 'datasets'" - ] - }, - { - "cell_type": "code", - "execution_count": 10, - "metadata": {}, - "outputs": [], - "source": [ - "dataset_name = 'b07.json'" - ] - }, - { - "cell_type": "code", - "execution_count": 11, - "metadata": {}, - "outputs": [], - "source": [ - "path_to_dataset_file = path_to_datasets / dataset_name" - ] - }, - { - "cell_type": "code", - "execution_count": 12, - "metadata": {}, - "outputs": [], - "source": [ - "with open(path_to_dataset_file, \"w\") as f:\n", - " f.write(dataset.json())" - ] - } - ], - "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 -}