Skip to content

Commit 1ea16a6

Browse files
committed
Fib-Kronecker: start counting at 1 on golden ratio axis
1 parent 34f6544 commit 1ea16a6

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

model/distributions/cylinder/partially_wraped_normal/fibonacci_kronecker.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,15 @@ def sample(self, sample_options, distribution_options):
2020
sample_count = sample_options[0].state
2121

2222
indices = np.arange(0, sample_count)
23+
indices_p1 = np.arange(0, sample_count + 1)
2324
gol = (1+5**0.5)/2
2425

2526
# centered rank-1 lattice generator
2627
equidistant_generator = (2 * indices + 1) / (2 * sample_count)
2728

2829
t = equidistant_generator
29-
p = (indices / gol) % 1
30+
p = (indices_p1 / gol) % 1
31+
p = p[1:]
3032

3133

3234
fib_grid = np.column_stack((t , p))

model/distributions/torus/wrapped_normal/fibonacci_kronecker.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,15 @@ def sample(self, sample_options, distribution_options):
2020
sample_count = sample_options[0].state
2121

2222
indices = np.arange(0, sample_count)
23+
indices_p1 = np.arange(0, sample_count + 1)
2324
gol = (1+5**0.5)/2
2425

2526
# centered rank-1 lattice generator
2627
equidistant_generator = (2 * indices + 1) / (2 * sample_count)
2728

2829
t = equidistant_generator
29-
p = (indices / gol) % 1
30+
p = (indices_p1 / gol) % 1
31+
p = p[1:]
3032

3133

3234
fib_grid = np.column_stack((t , p))

0 commit comments

Comments
 (0)