Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust cell spacing #985

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
14 changes: 6 additions & 8 deletions hnn_core/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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),
}

Expand Down
Loading