From 2d4b41d747a67d60e9f6ddcc129121802053b9bd Mon Sep 17 00:00:00 2001 From: Carolina Fernandez Date: Thu, 30 Jan 2025 12:26:24 -0500 Subject: [PATCH] remove basket cell offsets in network.py --- hnn_core/network.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/hnn_core/network.py b/hnn_core/network.py index fc338181f..04824c1df 100644 --- a/hnn_core/network.py +++ b/hnn_core/network.py @@ -64,7 +64,7 @@ def _calc_pyramidal_coord(xxrange, yyrange, zdiff): list_coords = [pos for pos in it.product(xxrange, yyrange, [zdiff])] return list_coords - def _calc_basket_coord(n_pyr_x, n_pyr_y, zdiff, inplane_distance, weight): + def _calc_basket_coord(n_pyr_x, n_pyr_y, zdiff, inplane_distance): xzero = np.arange(0, n_pyr_x, 3) * inplane_distance xone = np.arange(1, n_pyr_x, 3) * inplane_distance # split even and odd y vals @@ -76,7 +76,7 @@ def _calc_basket_coord(n_pyr_x, n_pyr_y, zdiff, inplane_distance, weight): coords_sorted = sorted(coords, key=lambda pos: pos[1]) # append the z value for position - list_coords = [(pos_xy[0], pos_xy[1], weight * zdiff) + list_coords = [(pos_xy[0], pos_xy[1], zdiff) for pos_xy in coords_sorted] return list_coords @@ -97,12 +97,10 @@ def _calc_origin(xxrange, yyrange, zdiff): pos_dict = { 'L5_pyramidal': _calc_pyramidal_coord(xxrange, yyrange, zdiff=0), 'L2_pyramidal': _calc_pyramidal_coord(xxrange, yyrange, zdiff=zdiff), - 'L5_basket': _calc_basket_coord(n_pyr_x, n_pyr_y, zdiff, - inplane_distance, weight=0.2 - ), - 'L2_basket': _calc_basket_coord(n_pyr_x, n_pyr_y, zdiff, - inplane_distance, weight=0.8 - ), + 'L5_basket': _calc_basket_coord(n_pyr_x, n_pyr_y, zdiff=0, + inplane_distance=inplane_distance), + 'L2_basket': _calc_basket_coord(n_pyr_x, n_pyr_y, zdiff=zdiff, + inplane_distance=inplane_distance), 'origin': _calc_origin(xxrange, yyrange, zdiff), }