Created
October 19, 2023 15:05
-
-
Save chrishavlin/1c24b7cdb96d8e7e9af8766d1214be5b to your computer and use it in GitHub Desktop.
yt_off_axis_proj_varying_center_fixed_depth.py
This file contains 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 yt | |
ds = yt.load_sample("gizmo_64") # 3ish GB download | |
center = ds.domain_center.to('Mpc').d | |
z_hat_original = ds.arr([0.3, 0.3, 0.3], 'kpc') | |
y_hat_original = ds.arr([1., 0., 0.], 'kpc') | |
for x_loc in list(range(2,19,1)): | |
c = ((x_loc, center[1], center[2]), 'Mpc') | |
prj = yt.ProjectionPlot(ds, - z_hat_original, | |
center = c, | |
fields=('gas', 'density'), | |
depth = (2, 'Mpc'), | |
north_vector = - y_hat_original, | |
) | |
prj.save(f"x_loc_{str(x_loc).zfill(2)}_proj.png") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment