Skip to content
Merged
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
12 changes: 7 additions & 5 deletions proofs/fork-angle/MANIFEST.sha256
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
c7cd0fc55d4b88bc4ed87b1cdc33670d9046174ab762188a0f2ce10290bb56e0 .gitignore
32fbac54c9ff9c52e61949813b761d9b6f937e0f3aed225a497b0a19fc63b898 README.md
8925cc8718767e5951eb8e50009618dd7ba2a1125cdd1a51452981b0730835cf README.md
9dc4e6866903f7a8bfe767e1dc7f8a277a8f5e90e35b85f84924e71aa86b37cf record/arc.txt
f6cc516d404bb0f925167e03090ce98bc6c650a5b1c13c69ebe31c755a66bdbd record/balance.txt
658b991e727303a3e0727b81f89c926878f8d53c3bdf1ca26184adc1d92abdd8 record/birth.txt
d270e226bd37510b5477fb372fb335a7ecff5ea158355254ef2cceb1597be2d6 record/cond.txt
7c8b049a7e3d67a99b7ee8d9f336020e370ec8387123acd4be2049808cd4f502 record/control.txt
e3c96d2c7b46ff85d5b80dc6ef16f93b0633de42199244239a435eb91e0b028b record/count.txt
a782ced4ceb54e5f6759c23ab3b1c3d926a19419372449eb535de98fb7571d7b record/data.sha256
26db305f064c79553858a533234ef743c85c38b3119da6d26b7597c1ec543c5b record/forks3d.tsv
b8fdac12ee32a0dffd016db70b273ba32f4f3fb85793fd420f03a76e72e3069d record/forks3d.txt
Expand All @@ -15,25 +16,26 @@ ec809f9630258e6313dffb034cdda660365db2a330cd4035c3e88d8a9a0a4dbe record/line2.t
400d2025fe444cca5784b21d40f7b02936ff7bc97a402e0a9f9f4430a1c6132f record/own.txt
723aca8ddd6b1562aaf6c5bc45fe8c5d04febdd1a41e873516b98e481e7bd6e6 record/profile.txt
779953f51e28f76cdc1992295bc5044d656bb120a4f1d7c7567986c0df990b31 record/ride.txt
b6770cef1b51b4196d9824cb7afa515d5626f8f0a0834c9aa1d58ce2f5dc247d record/scan_control.txt
f60066ab5839cf80c3ff98655d3e90088b6a7db881f7a102de6d0058ecf32c3e record/scan.txt
b6770cef1b51b4196d9824cb7afa515d5626f8f0a0834c9aa1d58ce2f5dc247d record/scan_control.txt
a90e1edbd6ef86e7e68a12577bd9600f36bd102750ba3eb7f3e797e72b0f6a26 record/theory.txt
d1644e2f48582836e2f8098c41c14a9f37d8eb61d6135d5860d76a3371aee589 record/where.txt
a6b0cb78131b624323af24ca2ba50ae361af59538d143413bb6938426d468ea7 replay.sh
b329de079df76ac145633e9573aed94d05641bc53acfc1183fb2539b8f266c8a replay.sh
77f962ded2446c590c33418f262cc114d506931f5ca68a0cc673c94d9327b5d3 src/fork3d_theory.py
3516d74bff4b8af9db0d2ae7fd14da8a7b7fdff7571109b9b072af794e75ac60 src/forks3d.py
f7f28a4fe66b8a3527744bc988131d099c08def8b6950d5a12a471cb1bc7bc0d src/forks3d_arc.py
c4033cc0bf51354ede22c19e215d6b188d5083263254cc59dbd352c170efe015 src/forks3d_balance.py
6b04188d3e6eee82248335175dc363791d3ed055d80436b57476985ba2d0b64e src/forks3d_birth.py
aa1de17760a1468cc30eef1d5cb3df7640c0d0776ebf5772934e8e3ec5467306 src/forks3d_cond.py
aefc89f06e8a0a7f89d73b1fd11146390e2b15cd3e5bcea2d02618730a597cf4 src/forks3d_count.py
1d075c0a8fe39fe408b083862c81e0565ec57ec6f45fef8f9851c5d0d237291d src/forks3d_line.py
c9954a28dce0742d2e72497f12efe426dcfa60fa671ed00dd23e286304feb5f6 src/forks3d_line2.py
9019afaedcb525dd839022ac9999b2f2f4dafa4d50af0f4ab1cc8449e76026e7 src/forks3d_own.py
f767fecc1c1a378d732035efebf3da3d25dc899cee91a33d1e75bd844b31bf00 src/forks3d_profile.py
7c8e91fc269f2315323bc50ac035b3399847271ddf407d9ea89f1ab47f6d6371 src/forks3d_ride.py
2871926ddeb2f4d5dc4b208701801778224530c7a19660bd274680f4b42d3ea4 src/forks3d_scan_control.py
ab7f8439c418de15a950e5a5091be3a3ef3e1e4f3370e60a781f765951fc0ac3 src/forks3d_scan.py
2871926ddeb2f4d5dc4b208701801778224530c7a19660bd274680f4b42d3ea4 src/forks3d_scan_control.py
4061a7e18ac4d7686e6cc72ec07a6aaa729b0fabdddacf3cb53c28b8c1c55f31 src/forks3d_where.py
3516d74bff4b8af9db0d2ae7fd14da8a7b7fdff7571109b9b072af794e75ac60 src/forks3d.py
f209d2581bee37ad4150ca1531478225ed072c333557b392b837642a6dc6a64a src/geometry-tools/mat5load.py
5e43bd046c06850c80b1b97bbcbc6a33172edb7dae3380a9a4548dac658238b8 src/heat_fork.py
7525377cb52f1b35b0232bd70f3a842ae26dc7ffee3edb2c1d02f84157c68bbb src/heat_kernel.py
Expand Down
2 changes: 1 addition & 1 deletion proofs/fork-angle/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ The same 689 forks read in successive stretches of path (`forks3d_profile.py`):
| forks with at least 3 points there | 113 | 282 | 420 | 398 | 398 | 683 | 689 | 689 | 689 | 689 |
| opening, median | 71.6 | 70.4 | 68.7 | 67.2 | 65.4 | 62.1 | 58.4 | 54.3 | 50.2 | 46.2 |

The forks start wide and close with distance, about 2 degrees per millimetre at the median.
The forks start wide and close with distance, about 2 degrees per millimetre at the median. A fork is followed when both daughters are at least 16 mm and each has stored points at 3 to 5 mm and at 12 to 16 mm from the fork: 398 of the 689. Of those 398, 397 close and 1 opens, at -0.88 degrees per mm; the closing has median 1.96 and quartiles 1.54 and 2.61 (`src/forks3d_count.py`, `record/count.txt`).

`forks3d_where.py`, `forks3d_balance.py`, `forks3d_ride.py`: forks with both daughters at least 16 mm and both stretches present, 398. The closing is the opening at 3 to 5 mm less the opening at 12 to 16 mm, per mm. z is the height of the parent's last point. The discharges start near z = -5 at the pin, and the stored paths end at z = 67.3 (99.5th percentile of all stored z, taken as the plate).

Expand Down
3 changes: 3 additions & 0 deletions proofs/fork-angle/record/count.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
forks with both daughters at least 16 mm: 689; followed through both stretches: 398
close: 397; open: 1; neither: 0
closing, degrees per mm: median 1.96, quartiles 1.54 and 2.61; the one that opens -0.88
1 change: 1 addition & 0 deletions proofs/fork-angle/replay.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ same forks3d.tsv "the 728 forks, one line each"
"$PY" -I src/forks3d_profile.py "$DATA" > "$B/profile.txt"; same profile.txt "opening by stretch of path, 689 forks"
"$PY" -I src/forks3d_cond.py "$DATA" > "$B/cond.txt"; same cond.txt "opening by stretch, by condition"
"$PY" -I src/forks3d_where.py "$DATA" > "$B/where.txt"; same where.txt "closing by place in the gap, by condition"
"$PY" -I src/forks3d_count.py "$DATA" > "$B/count.txt"; same count.txt "the 398 forks followed: how many close, fork by fork"
"$PY" -I src/forks3d_balance.py "$DATA" > "$B/balance.txt"; same balance.txt "closing and opening against place, diameter, speed"
"$PY" -I src/forks3d_ride.py "$DATA" > "$B/ride.txt"; same ride.txt "closing against opening over distance left to the plate"
"$PY" -I src/forks3d_birth.py "$DATA" > "$B/birth.txt"; same birth.txt "carry-back at the measured 0.87"
Expand Down
33 changes: 33 additions & 0 deletions proofs/fork-angle/src/forks3d_count.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
"""usage: python -I forks3d_count.py DIR_OF_DataExp_FILES
How many of the forks followed close, fork by fork. A fork is followed when both daughters are at least 16 mm
long and each has stored points at 3 to 5 mm and at 12 to 16 mm from the fork. Its closing is the opening at
3 to 5 mm less the opening at 12 to 16 mm, per mm, the closing of forks3d_where.py."""
import os
import sys

sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
import numpy as np

from forks3d import ang, arclen, load, rows, window_dir

d = sys.argv[1]
closing, n16 = [], 0
for fn in sorted(os.listdir(d)):
if not fn.endswith("DataExp.mat"):
continue
for c in load(os.path.join(d, fn))["DataExp"]:
if not c or len(c[0]["Segment"]) != 3:
continue
T = [rows(s[0]["Traj"]) for s in c[0]["Segment"]]
if min(arclen(T[1])[-1], arclen(T[2])[-1]) < 16:
continue
n16 += 1
a1, b1 = window_dir(T[1], 3, 5), window_dir(T[2], 3, 5)
a2, b2 = window_dir(T[1], 12, 16), window_dir(T[2], 12, 16)
if a1 is None or b1 is None or a2 is None or b2 is None:
continue
closing.append((ang(a1, b1) - ang(a2, b2)) / 9.5)
C = np.array(closing)
print("forks with both daughters at least 16 mm: %d; followed through both stretches: %d" % (n16, len(C)))
print("close: %d; open: %d; neither: %d" % ((C > 0).sum(), (C < 0).sum(), (C == 0).sum()))
print("closing, degrees per mm: median %.2f, quartiles %.2f and %.2f; the one that opens %.2f" % (np.median(C), *np.percentile(C, [25, 75]), C.min()))
Loading