Skip to content

Commit

Permalink
fix rollover zero error in trimming
Browse files Browse the repository at this point in the history
  • Loading branch information
MaartenBransen committed Nov 27, 2023
1 parent b3835da commit 85cf3d5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scm_confocal/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,8 @@ def align_stack(images,startim=0,threshold=0,binning=1,smooth=0,upsample=1,
#trim down the edges of the dataset to only area which is always in view
if trim=='valid':
slices = tuple([slice(None)] + [slice(
int(max(imshift[:,d])) if max(imshift[:,d])>0 else None,
int(min(imshift[:,d])) if min(imshift[:,d])<0 else None,
int(max(imshift[:,d])) if int(max(imshift[:,d]))>0 else None,
int(min(imshift[:,d])) if int(min(imshift[:,d]))<0 else None,
None
) for d in range(ndims)])
if apply_shift:
Expand Down

0 comments on commit 85cf3d5

Please sign in to comment.