Skip to content

Commit

Permalink
tidy up
Browse files Browse the repository at this point in the history
  • Loading branch information
TomTranter committed Feb 8, 2024
1 parent 5b565f5 commit bc1a56c
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 155 deletions.
9 changes: 2 additions & 7 deletions docs/examples/02 Network from an image.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
"import os\n",
"import copy"
"import copy\n",
"from ipywidgets import interactive"
]
},
{
Expand Down Expand Up @@ -258,12 +259,6 @@
}
],
"source": [
"import numpy as np\n",
"import matplotlib.pyplot as plt\n",
"from ipywidgets import interactive\n",
"\n",
"# Assuming img is your 2D array image\n",
"# For demonstration, create a sample 2D array if you don't have an image\n",
"im_low = 10000\n",
"im_high = 25000\n",
"\n",
Expand Down
4 changes: 2 additions & 2 deletions jellybamm/__funcs__.py
Original file line number Diff line number Diff line change
Expand Up @@ -525,8 +525,8 @@ def lump_thermal_props(param):
]
all_props = np.zeros([len(props), len(layers)])
for i, prop in enumerate(props):
for j, l in enumerate(layers):
all_props[i][j] = param[l + " " + prop]
for j, layer in enumerate(layers):
all_props[i][j] = param[layer + " " + prop]
# Break them up
lens = all_props[:, 0]
rhos = all_props[:, 1]
Expand Down
10 changes: 5 additions & 5 deletions post_scripts/paper_figures_46800.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,16 +217,16 @@ def jellyroll_one_plot(data, title, dp=3):
spm_res = net["throat.spm_resistor"]
spm_res_arc_index = net["pore.arc_index"][net["throat.conns"][spm_res]][:, 0]
spm_res_layer = np.ones_like(spm_res_arc_index) * -1
l = 0
layer = 0
nspm = len(spm_res_layer)
for ires in range(nspm):
spm_res_layer[ires] = l
spm_res_layer[ires] = layer
if ires == nspm - 1:
pass
elif spm_res_arc_index[ires + 1] < spm_res_arc_index[ires]:
l += 1
if l > 39:
l = 0
layer += 1
if layer > 39:
layer = 0
dp = 2
fig, axes = plt.subplots(2, 1)
arrs = []
Expand Down
6 changes: 3 additions & 3 deletions run_scripts/make_logo.py → random/make_logo.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@ def __round(self, xy, pad):

ax.set_aspect(1)
ax.axis("off")
l = x3.max() * 1.1
ax.set_xlim(-l, l)
ax.set_ylim(-l, l)
limit = x3.max() * 1.1
ax.set_xlim(-limit, limit)
ax.set_ylim(-limit, limit)
# OpenPNM project
project, arc_edges = jellybamm.make_spiral_net(
Nlayers=n,
Expand Down
90 changes: 0 additions & 90 deletions run_scripts/liionpack_spiral.py

This file was deleted.

48 changes: 0 additions & 48 deletions utility/data_fit.py

This file was deleted.

1 change: 1 addition & 0 deletions utility/pnm_transient_heat.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,4 @@ def run_transport(
plt.plot(hrs, center)
plt.plot(hrs, mid)
plt.plot(hrs, end)
plt.show()

0 comments on commit bc1a56c

Please sign in to comment.