Skip to content

Commit

Permalink
style fixes by ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
jingjingwu1225 authored and github-actions[bot] committed Nov 13, 2024
1 parent 30fa21b commit 8781cba
Showing 1 changed file with 17 additions and 12 deletions.
29 changes: 17 additions & 12 deletions linc_convert/modalities/df/multi_slice.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,16 +174,21 @@ def convert(
x = floordiv(shape[-2] - subdat_size[-2], 2)
y = floordiv(shape[-1] - subdat_size[-1], 2)


for channel in range(3):
if max_load is None or (subdat_size[-2] < max_load and subdat_size[-1] < max_load):
array[channel, idx, x : x + subdat_size[-2], y : y + subdat_size[-1]] = (
subdat[channel:channel+1, ...][0]
)
for channel in range(3):
if max_load is None or (
subdat_size[-2] < max_load and subdat_size[-1] < max_load
):
array[
channel, idx, x : x + subdat_size[-2], y : y + subdat_size[-1]
] = subdat[channel : channel + 1, ...][0]

for channel in range(3):
if max_load is None or (subdat_size[-2] < max_load and subdat_size[-1] < max_load):
array[channel, idx, x : x + subdat_size[-2], y : y + subdat_size[-1]] = subdat[channel: channel + 1, ...][0]
if max_load is None or (
subdat_size[-2] < max_load and subdat_size[-1] < max_load
):
array[
channel, idx, x : x + subdat_size[-2], y : y + subdat_size[-1]
] = subdat[channel : channel + 1, ...][0]
else:
ni = ceildiv(subdat_size[-2], max_load)
nj = ceildiv(subdat_size[-1], max_load)
Expand All @@ -206,11 +211,11 @@ def convert(
x + start_x : x + end_x,
y + start_y : y + end_y,
] = subdat[
channel: channel+1,
start_x : end_x,
start_y : end_y,
channel : channel + 1,
start_x:end_x,
start_y:end_y,
][0]

print("")

# Write OME-Zarr multiscale metadata
Expand Down

0 comments on commit 8781cba

Please sign in to comment.