%%time import yt ds = yt.load('IsolatedGalaxy/galaxy0030/galaxy0030') # 'deposit' means this is a deposited field - i.e. yt needs to construct it using a CIC operation. # 'all' means that this field is based on all of the particles. This is only important if your dataset has multiple particle types (i.e. dark matter, stars, etc.) # 'cic' means we are asking for a cloud-in-cell deposition. There's also 'density' (nearest-neighbot) 'mass' and 'count'. field = ('deposit', 'all_cic') ad = ds.all_data() print ad[field] slc = yt.SlicePlot(ds, 2, field) slc.show() [field for field in ds.derived_field_list if field[0] == 'deposit'] n_particles = len(ds.all_data()['all', 'particle_mass']) print 'This dataset contains %s particles' % n_particles