From 8eefe34b78e1a8066a2da1acc77c237cafe1b1f6 Mon Sep 17 00:00:00 2001 From: Joris Vincent Date: Fri, 16 Dec 2022 18:08:09 +0100 Subject: [PATCH] Bugfixes --- stimuli/components/__init__.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/stimuli/components/__init__.py b/stimuli/components/__init__.py index 1d4efee7..58764ab3 100644 --- a/stimuli/components/__init__.py +++ b/stimuli/components/__init__.py @@ -129,7 +129,6 @@ def mask_elements( # Mark elements with integer idx-value mask = np.zeros(base["shape"], dtype=int) for idx, edge in zip(reversed(range(len(edges))), reversed(edges)): - edge = np.round(edge, 10) mask[distances <= edge] = int(idx + 1) # Assemble output @@ -284,8 +283,8 @@ def resolve_grating_params( ) # Accumulate edges of phases - edges = [*itertools.accumulate(itertools.repeat(phase_width, int(np.ceil(n_phases))))] - if "period" == "ignore": + edges = [*itertools.accumulate(itertools.repeat(phase_width, int(n_phases)))] + if period == "ignore": edges += [visual_angle] return {