From 79ba2cfdddcdf53f958971eb1ff5e6ca9ff78df5 Mon Sep 17 00:00:00 2001 From: Michael O'Brien Date: Tue, 14 Jan 2025 10:12:13 -0500 Subject: [PATCH] lift error if underfocus is passed --- .../simulator/_transfer_theory/contrast_transfer_theory.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cryojax/simulator/_transfer_theory/contrast_transfer_theory.py b/src/cryojax/simulator/_transfer_theory/contrast_transfer_theory.py index 6ca181a4..4a0a6f21 100644 --- a/src/cryojax/simulator/_transfer_theory/contrast_transfer_theory.py +++ b/src/cryojax/simulator/_transfer_theory/contrast_transfer_theory.py @@ -60,7 +60,7 @@ def __init__( - `amplitude_contrast_ratio`: The amplitude contrast ratio. - `phase_shift`: The additional phase shift. """ - self.defocus_in_angstroms = error_if_negative(defocus_in_angstroms) + self.defocus_in_angstroms = jnp.asarray(defocus_in_angstroms) self.astigmatism_in_angstroms = jnp.asarray(astigmatism_in_angstroms) self.astigmatism_angle = jnp.asarray(astigmatism_angle) self.spherical_aberration_in_mm = error_if_negative(spherical_aberration_in_mm)