Skip to content

Commit

Permalink
Update API and unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
xnx committed Oct 13, 2023
1 parent e32bf49 commit 9e0a6a9
Show file tree
Hide file tree
Showing 34 changed files with 641 additions and 4,942 deletions.
626 changes: 0 additions & 626 deletions examples/Aggregation demo.ipynb

This file was deleted.

126 changes: 59 additions & 67 deletions examples/PyCollisionDB Example 1.ipynb

Large diffs are not rendered by default.

112 changes: 112 additions & 0 deletions examples/PyCollisionDB Example 2.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 9,
"id": "b5f8defa-5d27-41b3-98aa-e7732aee321a",
"metadata": {},
"outputs": [],
"source": [
"from pycollisiondb.pycollisiondb import PyCollision\n",
"import matplotlib.pyplot as plt\n",
"%matplotlib inline"
]
},
{
"cell_type": "code",
"execution_count": 10,
"id": "2c49e8a5-58fe-49f4-9265-1ab8f317b71a",
"metadata": {},
"outputs": [],
"source": [
"query = {'reactants': [\"e-\", \"Kr\"]}\n",
"pycoll = PyCollision.get_datasets(query=query)"
]
},
{
"cell_type": "code",
"execution_count": 11,
"id": "70433fc5-da71-4bb6-8f4d-4b5b0a2f8c55",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"<PyCollision object 1 datasets)>\n"
]
}
],
"source": [
"print(pycoll)"
]
},
{
"cell_type": "code",
"execution_count": 12,
"id": "8559cc8f-9788-4196-b759-81add9e51265",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"{108525: D108525: e- + Kr → Kr+ + 2e-}"
]
},
"execution_count": 12,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"pycoll.datasets"
]
},
{
"cell_type": "code",
"execution_count": 13,
"id": "c816568a-1118-4f12-b97c-21f2d43dac7c",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"{'timestamp': 'Fri Oct 13 12:22:32 2023',\n",
" 'uuid': '0ac70580-c732-4370-a56e-43ee9d94e716',\n",
" 'GET_string': '',\n",
" 'ndatasets': 1,\n",
" 'datasets': {'D108525': {'reaction': 'e- + Kr → Kr+ + 2e-', 'refs': ['B56']}}}"
]
},
"execution_count": 13,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"pycoll.manifest"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"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.11.5"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
135 changes: 0 additions & 135 deletions examples/PyCollisionDB Example n.ipynb

This file was deleted.

Loading

0 comments on commit 9e0a6a9

Please sign in to comment.