Skip to content

Commit

Permalink
Fix features outdated location during filtering
Browse files Browse the repository at this point in the history
Resolve 'List Index Out of Range' error in PCC filtering due to
outdated features' locations.
  • Loading branch information
alexbolfa committed Dec 22, 2023
1 parent e35d222 commit 4ce02c1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/napari_psf_extractor/extractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,14 @@ def extract_psf(min_mass, max_mass, stack, features, wx, wy, wz, pcc_min, usf):
shape=(wz, wy, wx)
)

# Filter locations
locations = psfe.localize_psfs(psfs, integrate=False)

# Filter PCC if enabled
if pcc_min != None:
features_pearson = filter_pcc(pcc_min, features_extracted, psfs)
psfs, features_extracted = psfe.extract_psfs(stack, features=features_pearson, shape=(wz, wy, wx))

# Filter locations
locations = psfe.localize_psfs(psfs, integrate=False)

loc_filtered, features_filtered, psfs_filtered = psfe.filt_locations(
locations,
features_extracted,
Expand Down

0 comments on commit 4ce02c1

Please sign in to comment.