Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions How-To/Utilities/make coefficients MPI.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,8 @@
# This is optional---+
# |
if coefs is None: # v
coefs.setUnits([("length", "none", 1.0),("mass", "none", 1.0),("time", "none", 1.0), ("G", "none", 1.0)])

coefs = pyEXP.coefs.Coefs.makecoefs(coef, compname)

# Add the coefficients to the container
Expand Down
2 changes: 2 additions & 0 deletions How-To/Utilities/make coefficients native MPI.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@
# This is optional---+
# |
if coefs is None: # v
coefs.setUnits([("length", "none", 1.0),("mass", "none", 1.0),("time", "none", 1.0), ("G", "none", 1.0)])

coefs = pyEXP.coefs.Coefs.makecoefs(coef, compname)

# Add the coefficients to the container
Expand Down
11 changes: 7 additions & 4 deletions Tutorials/Basis/cylcache python density.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"id": "bedd0139",
"metadata": {},
"outputs": [
Expand All @@ -28,10 +28,13 @@
"import os\n",
"import yaml\n",
"import time\n",
"import pyEXP\n",
"import numpy as np\n",
"import matplotlib.pyplot as plt\n",
"\n",
"import pyEXP\n",
"pyEXP.util.getVersionInfo()\n",
"\n",
"\n",
"# Change to the working directory containing the basis cache file. \n",
"# We assume that you launched your Jupyter server in the Tutorials directory and supply sample data\n",
"# for these tutorials in the Data directory\n",
Expand Down Expand Up @@ -547,7 +550,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
Expand All @@ -561,7 +564,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.3"
"version": "3.11.6"
}
},
"nbformat": 4,
Expand Down
164 changes: 92 additions & 72 deletions Tutorials/Basis/viewing a basis.ipynb

Large diffs are not rendered by default.

175 changes: 92 additions & 83 deletions Tutorials/Coefficients/create coefficients from snapshots.ipynb

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions Tutorials/Coefficients/read and plot coefficients.ipynb

Large diffs are not rendered by default.

87 changes: 73 additions & 14 deletions Tutorials/Coefficients/velocity coefficients from snapshots.ipynb

Large diffs are not rendered by default.

97 changes: 69 additions & 28 deletions Tutorials/Introduction/Part1-Coefficients.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,30 @@
"execution_count": 1,
"id": "1ed1fc36",
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n",
"%%%%% This is EXP 7.9.0 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n",
"%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n",
"%%%%% Repository URL | https://github.com/EXP-code/EXP %\n",
"%%%%% Current branch | suppressclangwarnings %\n",
"%%%%% Current commit | 4c9000a74137e4e0d5737b0007d90cfd72e0adf3 %\n",
"%%%%% Compile time | 2025-12-04 13:38:34 GMT %\n",
"%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n",
"\n"
]
}
],
"source": [
"import os\n",
"import yaml\n",
"\n",
"import pyEXP\n",
"pyEXP.util.getVersionInfo()\n",
"\n",
"# As described in the README, we assume that you have started Jupyter in the `Tutorials` directory and have provided all of the\n",
"# necessary data in the `Data` subdirectory. We move to that directory as a first step:\n",
Expand Down Expand Up @@ -254,7 +273,7 @@
"file group is ['OUT.run0.00010']\n",
"The component names are: ['dark halo', 'star disk']\n",
"Selected dark halo\n",
" for 100000 particles at Time 0.09999999999998707\n",
"Call createFromReader at Time 0.09999999999998707 for 100000 particles\n",
"Created coef\n",
"Added coef\n",
"------------------------------------------------------------\n",
Expand Down Expand Up @@ -371,6 +390,10 @@
" # |\n",
" if coefs is None: # v\n",
" coefs = pyEXP.coefs.Coefs.makecoefs(coef, compname)\n",
"\n",
" # Set the units of the coefficients\n",
" coefs.setUnits([(\"length\", \"none\", 1.0),(\"mass\", \"none\", 1.0),(\"time\", \"none\", 1.0), (\"G\", \"none\", 1.0)])\n",
"\n",
" else:\n",
" coefs.add(coef)\n",
"\n",
Expand Down Expand Up @@ -451,19 +474,19 @@
"----------------------------------------\n",
"---- azi force\n",
"----------------------------------------\n",
"[[-0.00087384 -0.00098027 -0.00113208 ... 0.00053854 0.00058888\n",
" 0.00065692]\n",
" [-0.00104563 -0.00117976 -0.00136719 ... 0.00044353 0.00050006\n",
" 0.00057894]\n",
" [-0.00120132 -0.0013625 -0.00158698 ... 0.00027801 0.00034734\n",
" 0.00044279]\n",
"[[-0.0006179 -0.00071115 -0.00084254 ... 0.0004008 0.00042721\n",
" 0.00046451]\n",
" [-0.00075857 -0.00087931 -0.00104691 ... 0.00033963 0.00037271\n",
" 0.00042 ]\n",
" [-0.00089408 -0.00104332 -0.00125041 ... 0.00021905 0.00026597\n",
" 0.00032954]\n",
" ...\n",
" [-0.00086897 -0.00120733 -0.00153372 ... 0.00364213 0.00354581\n",
" 0.00338669]\n",
" [-0.00081985 -0.00113707 -0.00144417 ... 0.00372749 0.00363169\n",
" 0.00347801]\n",
" [-0.00079396 -0.00109152 -0.00138081 ... 0.00380656 0.00370932\n",
" 0.00355781]]\n",
" [-0.00064673 -0.00092449 -0.00120845 ... 0.0028697 0.00271516\n",
" 0.00252051]\n",
" [-0.00059477 -0.00084749 -0.00110585 ... 0.00285428 0.0027068\n",
" 0.00252317]\n",
" [-0.00056141 -0.00079186 -0.00102766 ... 0.002833 0.00269098\n",
" 0.00251575]]\n",
"----------------------------------------\n",
"---- dens\n",
"----------------------------------------\n",
Expand Down Expand Up @@ -503,19 +526,19 @@
"----------------------------------------\n",
"---- mer force\n",
"----------------------------------------\n",
"[[ 0.00116107 0.0012984 0.00143422 ... 0.00141841 0.00133688\n",
" 0.00125844]\n",
" [ 0.0010585 0.00120293 0.00134758 ... 0.00156861 0.00148209\n",
" 0.00139784]\n",
" [ 0.00094972 0.00110494 0.00126318 ... 0.00172921 0.00163881\n",
" 0.00154933]\n",
"[[ 0.000821 0.00094195 0.00106741 ... 0.00105564 0.00096986\n",
" 0.00088985]\n",
" [ 0.0007679 0.00089658 0.00103189 ... 0.00120115 0.00110464\n",
" 0.00101408]\n",
" [ 0.00070682 0.0008461 0.00099529 ... 0.00136248 0.0012549\n",
" 0.00115308]\n",
" ...\n",
" [-0.00298936 -0.003173 -0.00336324 ... 0.00119402 0.00105672\n",
" 0.00093735]\n",
" [-0.00276366 -0.00292988 -0.0031003 ... 0.00081658 0.00071328\n",
" 0.00062615]\n",
" [-0.00254213 -0.00269264 -0.00284517 ... 0.0004661 0.0003963\n",
" 0.00034138]]\n",
" [-0.0022248 -0.00242968 -0.00264996 ... 0.00094079 0.00080917\n",
" 0.00069761]\n",
" [-0.00200493 -0.00218372 -0.00237401 ... 0.00062529 0.00053163\n",
" 0.00045425]\n",
" [-0.00179756 -0.00195341 -0.00211749 ... 0.00034689 0.0002875\n",
" 0.00024139]]\n",
"----------------------------------------\n",
"---- potl\n",
"----------------------------------------\n",
Expand Down Expand Up @@ -629,6 +652,16 @@
"output_type": "stream",
"text": [
"Nothing to delete\n",
"Coefs::WriteH5Units: wrote units to HDF5 file:\n",
"------------------------------------------------\n",
"Name Unit Value \n",
"---------- ---------- ---------- \n",
"G none 1 \n",
"length none 1 \n",
"mass none 1 \n",
"time none 1 \n",
"------------------------------------------------\n",
"\n",
"Coefficient file saved\n"
]
}
Expand All @@ -639,6 +672,8 @@
" os.remove('test_coefs')\n",
"except:\n",
" print('Nothing to delete')\n",
"\n",
"\n",
"coefs.WriteH5Coefs('test_coefs')\n",
"print('Coefficient file saved')"
]
Expand Down Expand Up @@ -714,11 +749,17 @@
"- [Return to Table of Contents](../README.ipynb)\n",
"- [Go to next notebook](./Part2-Analysis.ipynb)\n"
]
},
{
"cell_type": "markdown",
"id": "0af68cfa",
"metadata": {},
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
Expand All @@ -732,7 +773,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.3"
"version": "3.11.6"
}
},
"nbformat": 4,
Expand Down
3 changes: 3 additions & 0 deletions Tutorials/Introduction/Part1-Coefficients.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,9 @@
# At this point, it makes sense to save the coefficients that you have
# just created. This is sone with the following call:

# Set the units of the coefficients
coefs.setUnits([("length", "none", 1.0),("mass", "none", 1.0),("time", "none", 1.0), ("G", "none", 1.0)])


coefs.WriteH5Coefs('test_coefs')

Expand Down
108 changes: 64 additions & 44 deletions Tutorials/Introduction/Part2-Analysis.ipynb

Large diffs are not rendered by default.

61 changes: 40 additions & 21 deletions Tutorials/Orbits/orbits in an EXP field.ipynb

Large diffs are not rendered by default.

56 changes: 38 additions & 18 deletions Tutorials/Orbits/orbits with a custom force.ipynb

Large diffs are not rendered by default.