#!/usr/bin/env python # coding: utf-8 # In[1]: import yt # In[2]: ds = yt.load("GasSloshing/sloshing_nomag2_hdf5_plt_cnt_0100") # In[3]: sp = ds.sphere("c", (500.,"kpc")) # In[4]: fn = sp.save_as_dataset(fields=["density","kT","velocity_x","velocity_y","velocity_z"]) # In[5]: ds2 = yt.load(fn) # In[6]: ad = ds2.all_data() # In[7]: ad.quantities.angular_momentum_vector()