Skip to content

Commit 0bdb6d4

Browse files
committed
Update .gitignore to include markdown files and fix documentation in generate_reference_spiral.py
1 parent 653a791 commit 0bdb6d4

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
# copilot
2+
.github/**/*.md
3+
14
# data
25
data/
3-
src/graphomotor/cache/
46

57
# scripts
68
scripts/

src/graphomotor/utils/generate_reference_spiral.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def _find_theta_for_incremental_arc_length(
5555
spiral_config: Spiral configuration.
5656
5757
Returns:
58-
Angle theta corresponding to the target cumulative arc length.
58+
Angle theta that results in the target arc length increment from current_theta.
5959
"""
6060
solution = optimize.root_scalar(
6161
lambda theta: _calculate_arc_length_between(current_theta, theta, spiral_config)
@@ -74,9 +74,8 @@ def generate_reference_spiral(spiral_config: config.SpiralConfig) -> np.ndarray:
7474
for feature extraction algorithms that compare user-drawn spirals with an ideal
7575
form.
7676
77-
The function first attempts to load a pre-computed spiral from cache. If not found,
78-
it calculates the spiral using numerical computation and automatically saves it
79-
to cache for future use.
77+
This function is decorated with an LRU cache to store pre-computed spirals for
78+
faster retrieval on subsequent calls with the same configuration.
8079
8180
The algorithm works by:
8281
1. Computing the total arc length for the entire spiral,

0 commit comments

Comments
 (0)