Skip to content

Commit cd9501c

Browse files
JaerongAttngu207
andauthored
Apply suggestions from code review
Co-authored-by: Thinh Nguyen <thinh@datajoint.com>
1 parent 9fc7477 commit cd9501c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

element_array_ephys/probe.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ def create_neuropixels_probe(probe_type: str = "neuropixels 1.0 - 3A"):
149149
with ProbeType.connection.transaction:
150150
ProbeType.insert1(probe_type, skip_duplicates=True)
151151
ProbeType.Electrode.insert(
152-
[{**e} for e in electrode_layouts], skip_duplicates=True
152+
electrode_layouts, skip_duplicates=True
153153
)
154154

155155

@@ -252,7 +252,7 @@ def build_electrode_layouts(
252252
"shank_col": c_id,
253253
"shank_row": r_id,
254254
"x_coord": x + (shank_no * (shank_spacing or 1)),
255-
"y_coord": y if y_origin == "bottom" else -y,
255+
"y_coord": {"top": -y, "bottom": y}[y_origin],
256256
}
257257
for shank_no in range(shank_count)
258258
for e_id, (c_id, r_id, x, y) in enumerate(

0 commit comments

Comments
 (0)