Commits

Christopher Moody committed 2b50508

added particle index

Comments (0)

Files changed (2)

yt/frontends/art/definitions.py

     'particle_velocity_x',
     'particle_velocity_y',
     'particle_velocity_z',
-    'particle_type'
+    'particle_type',
+    'particle_index'
 ]
 
 particle_star_fields = [

yt/frontends/art/io.py

         del particle_velocity
         self.particle_data['particle_type'] = np.zeros(nparticles,dtype='int')
         self.particle_data['particle_mass'] = np.zeros(nparticles,dtype='float64')
+        self.particle_data['particle_index'] = np.arange(nparticles,dtype'int64')
         a=0
         for i,(b,m) in enumerate(zip(lspecies,wspecies)):
             if i == self.particle_star_index: