Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor updates #13

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
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
15 changes: 10 additions & 5 deletions How-To/Utilities/visualize Cylinder basis.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ def main(prog, argv) -> int:
#
params = pyEXP.basis.Cylindrical.cacheInfo(cfile)

print(params)

Mmax = int(params['mmax'])

bconfig = """
Expand All @@ -67,19 +69,22 @@ def main(prog, argv) -> int:
hcyl: {}
mmax: {}
nmax: {}
ncylorder: {}
ncylodd: {}
lmaxfid: {}
nmaxfid: {}
ncylnx: {}
ncylny: {}
eof_file: {}
cachename: {}
...
""".format(params['ascl'], params['hscl'], params['mmax'], params['nmax'],
params['norder'], params['numx'], params['numy'], cfile)
params['nodd'], params['lmaxfid'], params['nmaxfid'],
params['numx'], params['numy'], cfile)

# Construct the basis instance
#
basis = pyEXP.basis.Basis.factory(bconfig)

Norder = int(params['norder'])
Norder = int(params['nmax'])

# Plot the matrices as images with a greyscale color map
#
Expand All @@ -106,7 +111,7 @@ def main(prog, argv) -> int:
if n<Norder:
ax = plt.subplot(gs[n])
plt.axis('off')
cx = plt.contourf(xv, yv, grid[m][n].transpose())
cx = plt.contourf(xv, yv, grid[m][n]['potential'].transpose())
n += 1

plt.annotate("m={}".format(m), (0.5, 0.95), xycoords='figure fraction')
Expand Down
557 changes: 557 additions & 0 deletions Tutorials/Basis/cylcache python density.ipynb

Large diffs are not rendered by default.

37 changes: 16 additions & 21 deletions Tutorials/Introduction/Part1-Coefficients.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -519,19 +519,19 @@
"----------------------------------------\n",
"---- potl\n",
"----------------------------------------\n",
"[[-0.0729711 -0.0746728 -0.07639428 ... -0.07643711 -0.07471762\n",
" -0.07301702]\n",
" [-0.07466856 -0.07648817 -0.07833603 ... -0.07837951 -0.07653369\n",
" -0.07471516]\n",
" [-0.07638423 -0.07833 -0.08031277 ... -0.08035868 -0.07837775\n",
" -0.07643281]\n",
"[[-0.9169819 -0.9383662 -0.95999885 ... -0.960537 -0.9389293\n",
" -0.917559 ]\n",
" [-0.9383129 -0.9611787 -0.9843996 ... -0.984946 -0.96175075\n",
" -0.93889844]\n",
" [-0.95987254 -0.98432374 -1.0092399 ... -1.009817 -0.98492396\n",
" -0.960483 ]\n",
" ...\n",
" [-0.07633456 -0.07827479 -0.0802502 ... -0.08030772 -0.07833853\n",
" -0.07640438]\n",
" [-0.07461557 -0.07642901 -0.07826892 ... -0.07832243 -0.076488\n",
" -0.07468001]\n",
" [-0.07291635 -0.07461157 -0.07632488 ... -0.07637327 -0.07466494\n",
" -0.07297471]]\n",
" [-0.9592484 -0.98363 -1.0084537 ... -1.0091766 -0.984431\n",
" -0.9601257 ]\n",
" [-0.93764687 -0.9604352 -0.98355633 ... -0.98422873 -0.9611766\n",
" -0.9384567 ]\n",
" [-0.91629386 -0.9375966 -0.9591268 ... -0.9597348 -0.9382673\n",
" -0.9170273 ]]\n",
"----------------------------------------\n",
"---- potl m=0\n",
"----------------------------------------\n",
Expand Down Expand Up @@ -628,6 +628,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Nothing to delete\n",
"Coefficient file saved\n"
]
}
Expand Down Expand Up @@ -667,7 +668,8 @@
"output_type": "stream",
"text": [
"Type is sphere\n",
"Times are the same, now checking parameters at each time\n"
"Times are the same, now checking parameters at each time\n",
"Parameters are the same, now checking coefficients\n"
]
},
{
Expand All @@ -679,13 +681,6 @@
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Parameters are the same, now checking coefficients\n"
]
}
],
"source": [
Expand Down Expand Up @@ -724,7 +719,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.3"
"version": "3.10.12"
}
},
"nbformat": 4,
Expand Down
94 changes: 47 additions & 47 deletions Tutorials/Introduction/Part2-Analysis.ipynb

Large diffs are not rendered by default.