Skip to content

Commit 0d206e0

Browse files
committed
in other news, gradient descent is still broken
1 parent 14c80ff commit 0d206e0

10 files changed

+8
-4
lines changed

drive.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,14 @@ def plot(index):
5151
# print(result.attrs["material"], result.predicted_halfthickness.apply(lambda row:row.value).mean())
5252

5353
def process(indx, ax=None):
54-
t, smin = sMinFit(results[indx], RelativeIntersity, lr = 5e-4 if "tissue" == results[indx].attrs["material"] else 2e-7)
54+
attrs = results[indx].attrs
55+
t, smin = sMinFit(results[indx], RelativeIntersity, lr = 5e-4 if "tissue" == attrs['material'] else 2e-7)
5556

5657
inches, logits, logits_err = unwrap(results[indx])
5758
t_min, t_max = calculateSfitUncert(t, smin, smin+1, lambda T: SSE(inches, T, logits, logits_err, RelativeIntersity), ax=ax, low=0.1, high=30)
5859

5960
if ax is not None:
61+
ax.set_title(f"{attrs['material']} {attrs['source']}")
6062
ax.set_xlabel(f"T ({results[7].attrs['material']})")
6163
ax.set_ylabel("S(T)")
6264
ax.legend()
@@ -72,6 +74,8 @@ def process(indx, ax=None):
7274
# >>>>>>> 68cb3cc3a83d6f09391e99a4e1cc04d712bebe16
7375

7476
if __name__ == '__main__':
75-
fig, ax = plt.subplots()
76-
print(process(7, ax))
77-
plt.show()
77+
print(len(results))
78+
for i in range(9):
79+
fig, ax = plt.subplots()
80+
print(process(i, ax))
81+
plt.savefig(f"out/{i}_{results[i].attrs['material']}_{results[i].attrs['source']}.png")

out/0_lead_orange.png

34 KB
Loading

out/1_aluminum_uraniumcup.png

34.4 KB
Loading

out/2_plastic_orange.png

26.8 KB
Loading

out/3_aluminum_green.png

29.3 KB
Loading

out/4_lead_uraniumcup.png

33.1 KB
Loading

out/5_tissue_orange.png

35.3 KB
Loading

out/6_tissue_uraniumcup.png

31 KB
Loading

out/7_tissues_yellow.png

38.2 KB
Loading

out/8_aluminium_green.png

33.4 KB
Loading

0 commit comments

Comments
 (0)