Skip to content

Commit

Permalink
new naming conventions
Browse files Browse the repository at this point in the history
  • Loading branch information
mjo22 committed Dec 18, 2024
1 parent 1bf6fa4 commit d8b74b1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ def __call__(
frequency_grid_in_angstroms: Float[Array, "y_dim x_dim 2"],
*,
voltage_in_kilovolts: Float[Array, ""] | float = 300.0,
defocus_offset: Float[Array, ""] | float = 0.0,
) -> Float[Array, "y_dim x_dim"] | Complex[Array, "y_dim x_dim"]:
raise NotImplementedError

Expand All @@ -29,7 +28,7 @@ class AbstractTransferTheory(Module, strict=True):
@abstractmethod
def __call__(
self,
fourier_phase_or_wavefunction_at_exit_plane: (
array: (
Complex[
Array,
"{instrument_config.padded_y_dim} "
Expand All @@ -41,7 +40,6 @@ def __call__(
]
),
instrument_config: InstrumentConfig,
defocus_offset: Float[Array, ""] | float = 0.0,
) -> (
Complex[
Array,
Expand All @@ -51,5 +49,5 @@ def __call__(
Array, "{instrument_config.padded_y_dim} {instrument_config.padded_x_dim}"
]
):
"""Pass an image through the transfer theory."""
"""Pass a quantity through the transfer theory."""
raise NotImplementedError
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def __init__(
@override
def __call__(
self,
fourier_phase_at_exit_plane: Complex[
object_spectrum_at_exit_plane: Complex[
Array,
"{instrument_config.padded_y_dim} {instrument_config.padded_x_dim//2+1}",
],
Expand All @@ -145,6 +145,6 @@ def __call__(
)
# ... compute the contrast as the CTF multiplied by the exit plane
# phase shifts
fourier_contrast_at_detector_plane = ctf_array * fourier_phase_at_exit_plane
contrast_spectrum_at_detector_plane = ctf_array * object_spectrum_at_exit_plane

return fourier_contrast_at_detector_plane
return contrast_spectrum_at_detector_plane
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def __init__(
@override
def __call__(
self,
fourier_wavefunction_at_exit_plane: Complex[
wavefunction_spectrum_at_exit_plane: Complex[
Array,
"{instrument_config.padded_y_dim} {instrument_config.padded_x_dim}",
],
Expand All @@ -132,8 +132,8 @@ def __call__(
)
# ... compute the contrast as the CTF multiplied by the exit plane
# phase shifts
fourier_wavefunction_at_detector_plane = (
wtf_array * fourier_wavefunction_at_exit_plane
wavefunction_spectrum_at_detector_plane = (
wtf_array * wavefunction_spectrum_at_exit_plane
)

return fourier_wavefunction_at_detector_plane
return wavefunction_spectrum_at_detector_plane

0 comments on commit d8b74b1

Please sign in to comment.