Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion deeptrack/scatterers.py
Original file line number Diff line number Diff line change
Expand Up @@ -747,7 +747,7 @@ def get(
-mask.shape[1] // 2 : mask.shape[1] // 2,
]
mask = np.exp(-0.5 * (x**2 + y**2) / ((sigma) ** 2))

mask = image.maybe_cupy(mask)
arr = arr * mask

fourier_field = np.fft.fft2(arr)
Expand Down
24 changes: 23 additions & 1 deletion deeptrack/test/test_scatterers.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,28 @@ def test_MieSphere(self):

imaged_scatterer_1.update().resolve()

def test_MieSphere_Coherence_length(self):
optics_1 = Brightfield(
NA=0.15,
wavelength=633e-9,
resolution=2e-6,
magnification=1,
output_region=(0, 0, 256, 256),
return_field=True,
)

scatterer = scatterers.MieSphere(
position=(128, 128),
radius=3e-6,
refractive_index=1.45 + 0.1j,
z=2612 * 1e-6,
coherence_length=5.9e-05,
)

imaged_scatterer_1 = optics_1(scatterer)

imaged_scatterer_1.update().resolve()

def test_MieStratifiedSphere(self):
optics_1 = Brightfield(
NA=0.7,
Expand Down Expand Up @@ -324,4 +346,4 @@ def test_MieStratifiedSphere(self):


if __name__ == "__main__":
unittest.main()
unittest.main()