Created
March 12, 2025 15:51
-
-
Save alisterburt/5deac08b2bbbe26e5243bbe453fc0cbf to your computer and use it in GitHub Desktop.
how to simulate tomograms for ayse
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
from scipy.spatial.transform import Rotation as R | |
from torch_fourier_slice import project_3d_to_2d, backproject_2d_to_3d | |
tilt_angles = np.linspace(-60, 60, 41, endpoint=True) | |
rotation_matrices = R.from_euler('y', angles=tilt_angles, degrees=True).as_matrix() | |
volume = simulate_volume() | |
projections = project_3d_to_2d(volume, rotation_matrices) | |
simulated_tomogram = backproject_2d_to_3d(projections, rotation_matrices) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment