diff --git a/book/usecases/uvvis_metadata.ipynb b/book/usecases/uvvis_metadata.ipynb index 4c2b2c99..11aa31aa 100644 --- a/book/usecases/uvvis_metadata.ipynb +++ b/book/usecases/uvvis_metadata.ipynb @@ -72,7 +72,7 @@ "source": [ "### 3.2 File hierarchy\n", "\n", - "\n", + "
\n", " \n", " \n", " \n", @@ -83,10 +83,10 @@ " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", " \n", @@ -98,36 +98,36 @@ " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", " \n", " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", " \n", " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", " \n", " \n", " \n", @@ -139,16 +139,16 @@ " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", " \n", @@ -160,27 +160,27 @@ " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", " \n", "
Raw Data
Format
Data matrix (with or without column headings)Spectrophotometer output as tabular data (absorbance and wavelength)EssentialCSV (.csv)
JCAMP–DX (.jdx)
Data matrix (with or without column headings)Spectrophotometer output as tabular data (absorbance and wavelength)EssentialCSV (.csv)
JCAMP–DX (.jdx)
Sample level metadata Format
Sample IDIdentifier for the sample which is unique within the projectEssentialPlain text (.txt)
XML (.xml)
R Markdown (.rmd)
Jupyter Notebook
Markdown (.ipynb)
Sample IDIdentifier for the sample which is unique within the projectEssentialPlain text (.txt)
XML (.xml)
R Markdown (.rmd)
Jupyter Notebook
Markdown (.ipynb)
Linking sample IDProvenance identifier for the sample in the associated process capture document (digital or paper notebook)EssentialLinking sample IDProvenance identifier for the sample in the associated process capture document (digital or paper notebook)Essential
Data labels (if absent from the data matrix)Description and units for the tabular raw data columnsEssentialData labels (if absent from the data matrix)Description and units for the tabular raw data columnsEssential
Sample concentration, solvent, optical path length, user ID and date/time of collectionExperimental parametersEssentialSample concentration, solvent, optical path length, user ID and date/time of collectionExperimental parametersEssential
Chemical structureChemical structure identifier in the form of an alphanumeric text stringEssentialInChI
SMILES
Chemical structureChemical structure identifier in the form of an alphanumeric text stringEssentialInChI
SMILES
SMILES validationDesirableToolkit(version) identifierSMILES validationDesirableToolkit(version) identifier
Analysis level metadata Format
Processed data matrixTabular data: absorbance, wavelength, and molar absorptivity (ε); with data labels and unitsEssentialCSV (.csv)Processed data matrixTabular data: absorbance, wavelength, and molar absorptivity (ε); with data labels and unitsEssentialCSV (.csv)
Data reporting:
1. Plot of the UV/Vis spectrum
2. λmax and ε (Section 4)
The two key outputs required for publication.EssentialR Markdown (.rmd)
Jupyter Notebook
Markdown (.ipynb)
Data reporting:
1. Plot of the UV/Vis spectrum
2. λmax and ε (Section 4)
The two key outputs required for publication.EssentialR Markdown (.rmd)
Jupyter Notebook
Markdown (.ipynb)
Project level metadata Format
Study IDIdentifier(s) for the scientific study; funder’s project ID(s)DesirablePlain text (.txt)
XML (.xml)
R Markdown (.rmd)
Jupyter Notebook
Markdown (.ipynb)
Study IDIdentifier(s) for the scientific study; funder’s project ID(s)DesirablePlain text (.txt)
XML (.xml)
R Markdown (.rmd)
Jupyter Notebook
Markdown (.ipynb)
Instrument IDSpectrophotometer vendor and version.DesirableInstrument IDSpectrophotometer vendor and version.Desirable
Data storage locationLink to the data storage locationEssentialURL for an open access repository depositionData storage locationLink to the data storage locationEssentialURL for an open access repository deposition
Spectrophotometer calibrationLink to structured calibration dataEssentialSpectrophotometer calibrationLink to structured calibration dataEssential
\n" ] @@ -255,15 +255,28 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": 2, "id": "1f3e5d74", "metadata": { "ExecuteTime": { - "end_time": "2024-01-29T18:10:51.575720Z", - "start_time": "2024-01-29T18:10:48.136208Z" + "end_time": "2024-01-29T18:32:14.294665Z", + "start_time": "2024-01-29T18:32:11.043267Z" } }, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Requirement already satisfied: jcamp in /Users/n00002621/.local/share/virtualenvs/WFChemCookbook-hyZchOOL/lib/python3.11/site-packages (1.2.2)\r\n", + "Requirement already satisfied: numpy in /Users/n00002621/.local/share/virtualenvs/WFChemCookbook-hyZchOOL/lib/python3.11/site-packages (from jcamp) (1.26.3)\r\n", + "Requirement already satisfied: datetime in /Users/n00002621/.local/share/virtualenvs/WFChemCookbook-hyZchOOL/lib/python3.11/site-packages (from jcamp) (5.4)\r\n", + "Requirement already satisfied: zope.interface in /Users/n00002621/.local/share/virtualenvs/WFChemCookbook-hyZchOOL/lib/python3.11/site-packages (from datetime->jcamp) (6.1)\r\n", + "Requirement already satisfied: pytz in /Users/n00002621/.local/share/virtualenvs/WFChemCookbook-hyZchOOL/lib/python3.11/site-packages (from datetime->jcamp) (2023.3.post1)\r\n", + "Requirement already satisfied: setuptools in /Users/n00002621/.local/share/virtualenvs/WFChemCookbook-hyZchOOL/lib/python3.11/site-packages (from zope.interface->datetime->jcamp) (69.0.3)\r\n" + ] + } + ], "source": [ "# noinspection PyProtectedMember\n", "!pip install jcamp # command to instruct Binder/Colab to install the jcamp package\n", @@ -282,9 +295,14 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 3, "id": "4c68c544", - "metadata": {}, + "metadata": { + "ExecuteTime": { + "end_time": "2024-01-29T18:32:24.174638Z", + "start_time": "2024-01-29T18:32:24.159895Z" + } + }, "outputs": [], "source": [ "file_path = '../files/sample_data.jdx' # Replace with your specific file path\n", @@ -304,10 +322,24 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 4, "id": "3a33797c", - "metadata": {}, - "outputs": [], + "metadata": { + "ExecuteTime": { + "end_time": "2024-01-29T18:32:29.099337Z", + "start_time": "2024-01-29T18:32:29.097487Z" + } + }, + "outputs": [ + { + "data": { + "text/plain": "{'title': 'Salicylic Acid',\n 'jcamp-dx': 4.24,\n 'data type': 'UV/VIS SPECTRUM',\n 'origin': 'INSTITUTE OF ENERGY PROBLEMS OF CHEMICAL PHYSICS, RAS',\n 'owner': 'INEP CP RAS, NIST OSRD\\nCollection (C) 2007 copyright by the U.S. Secretary of Commerce\\non behalf of the United States of America. All rights reserved.',\n 'cas registry no': '69-72-7',\n 'molform': 'C7H6O3',\n 'mp': 158,\n 'bp': '211(20)',\n 'source reference': 'RAS UV No. 237',\n '$nist squib': '1963ERN/MEN230-240',\n '$nist source': 'TSGMTE',\n 'spectrometer/data system': 'Unicam SP 500',\n 'xunits': 'Wavelength (nm)',\n 'yunits': 'Logarithm epsilon',\n 'xfactor': 1.0,\n 'yfactor': 1.0,\n 'firstx': 247.1048,\n 'lastx': 340.0658,\n 'firsty': 3.14445,\n 'maxx': 340.066,\n 'minx': 247.105,\n 'maxy': 3.19782,\n 'miny': 1.25709,\n 'npoints': 1449,\n '$ref author': 'Ernst, Z.L.; Menashi, J.',\n '$ref title': 'The spectrophotometric determination of the dissociation constants of some substituted salicylic acids',\n '$ref journal': 'Trans. Faraday Soc.',\n '$ref volume': 59,\n '$ref page': '230-240',\n '$ref date': 1963,\n 'xypoints': '(XY..XY)',\n 'end': '',\n 'x': array([247.1048, 247.1574, 247.1657, ..., 334.0779, 334.1783, 340.0658]),\n 'y': array([3.14445 , 3.182843, 3.112433, ..., 1.693346, 1.67324 , 1.25709 ])}" + }, + "execution_count": 4, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "data_dictionary # Show the contents of the dictionary on screen" ]