Skip to content

Commit

Permalink
Update test_remove_background_noise.py
Browse files Browse the repository at this point in the history
  • Loading branch information
dmilkie committed Oct 19, 2023
1 parent a60edcd commit c7c4903
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/test_remove_background_noise.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ def test_filter(kargs):
Will generate the filter response for removing background filters (dog and na_and_background_filter)
"""
high_sigma = 1.5 # sets the low frequency cutoff.
high_sigma = 3.0 # sets the low frequency cutoff.
low_sigma: float = 0.7

# Create lattice SyntheticPSF so we can get the NA Mask
samplepsfgen = SyntheticPSF(
Expand Down Expand Up @@ -72,10 +73,10 @@ def test_filter(kargs):
"""

# filter the real space image. Remove DC.
FFTfiltered_realsp = na_and_background_filter(realsp, low_sigma=0.7, high_sigma=high_sigma, samplepsfgen=samplepsfgen)
FFTfiltered_realsp = na_and_background_filter(realsp, low_sigma=low_sigma, high_sigma=high_sigma, samplepsfgen=samplepsfgen)
FFTfiltered_realsp -= np.mean(FFTfiltered_realsp)

dogfiltered_realsp = dog(realsp, low_sigma=0.7, high_sigma=high_sigma)
dogfiltered_realsp = dog(realsp, low_sigma=low_sigma, high_sigma=high_sigma)
dogfiltered_realsp -= np.mean(dogfiltered_realsp)

imwrite(f'{base_folder}/FFTfiltered_realsp.tif', np.abs(cp.asnumpy(FFTfiltered_realsp)).astype(np.float32))
Expand Down

0 comments on commit c7c4903

Please sign in to comment.