Skip to content
Merged
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
9 changes: 7 additions & 2 deletions src/magnify/stitch.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,15 @@ def __init__(self, overlap: int = 102):
self.overlap = overlap

def __call__(self, assay: xr.Dataset) -> xr.Dataset:
# Take half of overlap from each edge
clip = self.overlap // 2
# Account for odd overlaps
remainder = self.overlap % 2
# Adjust tiles
tiles = assay.tile[
...,
: assay.tile.shape[-2] - self.overlap,
: assay.tile.shape[-1] - self.overlap,
clip : assay.tile.shape[-2] - clip + remainder,
clip : assay.tile.shape[-1] - clip + remainder,
]

# Move the time and channel axes last so we can focus on joining images.
Expand Down
Loading