From 7c7f2a5052fce5982e44eb998834b379ba61894b Mon Sep 17 00:00:00 2001 From: Talon Chandler Date: Mon, 9 Sep 2024 20:22:49 -0700 Subject: [PATCH] fix interaction between padding and wrap safety --- waveorder/models/isotropic_fluorescent_thick_3d.py | 4 ++-- waveorder/models/phase_thick_3d.py | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/waveorder/models/isotropic_fluorescent_thick_3d.py b/waveorder/models/isotropic_fluorescent_thick_3d.py index d67dab8..aebbdf2 100644 --- a/waveorder/models/isotropic_fluorescent_thick_3d.py +++ b/waveorder/models/isotropic_fluorescent_thick_3d.py @@ -57,9 +57,9 @@ def calculate_transfer_function( index_of_refraction_media, numerical_aperture_detection, ) - + zyx_out_shape = (zyx_shape[0] + 2 * z_padding,) + zyx_shape[1:] return sampling.nd_fourier_central_cuboid( - optical_transfer_function, zyx_shape + optical_transfer_function, zyx_out_shape ) diff --git a/waveorder/models/phase_thick_3d.py b/waveorder/models/phase_thick_3d.py index 868b15a..8ccf00d 100644 --- a/waveorder/models/phase_thick_3d.py +++ b/waveorder/models/phase_thick_3d.py @@ -73,12 +73,13 @@ def calculate_transfer_function( ) ) + zyx_out_shape = (zyx_shape[0] + 2 * z_padding,) + zyx_shape[1:] return ( sampling.nd_fourier_central_cuboid( - real_potential_transfer_function, zyx_shape + real_potential_transfer_function, zyx_out_shape ), sampling.nd_fourier_central_cuboid( - imag_potential_transfer_function, zyx_shape + imag_potential_transfer_function, zyx_out_shape ), )