File: simple_projection_weighted.py

package info (click to toggle)
yt 4.1.4-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 76,192 kB
  • sloc: python: 125,909; ansic: 6,303; cpp: 3,590; sh: 556; javascript: 352; makefile: 131; csh: 36
file content (11 lines) | stat: -rw-r--r-- 321 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
import yt

# Load the dataset.
ds = yt.load("GalaxyClusterMerger/fiducial_1to3_b0.273d_hdf5_plt_cnt_0175")

# Create density-weighted projections of temperature (weighted line integrals)

for normal in "xyz":
    yt.ProjectionPlot(
        ds, normal, ("gas", "temperature"), weight_field=("gas", "density")
    ).save()