Skip to content

Commit

Permalink
refactor phase and fluorescence to use "filter bank" functions
Browse files Browse the repository at this point in the history
  • Loading branch information
talonchandler committed Feb 11, 2025
1 parent 4334ec2 commit 59df17c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion waveorder/models/isotropic_fluorescent_thick_3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,10 @@ def apply_inverse_transfer_function(
inverse_filter = tikhonov_regularized_inverse_filter(
optical_transfer_function, regularization_strength
)
f_real = apply_filter_bank(inverse_filter, zyx_padded)

# [None]s and [0] are for applying a 1x1 "bank" of filters.
# For further uniformity, consider returning (1, Z, Y, X)
f_real = apply_filter_bank(inverse_filter[None, None], zyx_padded[None])[0]
elif reconstruction_algorithm == "TV":
raise NotImplementedError
f_real = util.single_variable_admm_tv_deconvolution_3D(
Expand Down
5 changes: 4 additions & 1 deletion waveorder/models/phase_thick_3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,10 @@ def apply_inverse_transfer_function(
inverse_filter = tikhonov_regularized_inverse_filter(
effective_transfer_function, regularization_strength
)
f_real = apply_filter_bank(inverse_filter, zyx)

# [None]s and [0] are for applying a 1x1 "bank" of filters.
# For further uniformity, consider returning (1, Z, Y, X)
f_real = apply_filter_bank(inverse_filter[None, None], zyx[None])[0]

elif reconstruction_algorithm == "TV":
raise NotImplementedError
Expand Down

0 comments on commit 59df17c

Please sign in to comment.