Hi, It is possible to create a custom particle filter. For example, until I switched to using the particle_type, I was using the following snippet def dm_filter(pfilter, data): ''' Select DM particlesbased on their ''' filter = (data['io','particle_birth_time'] == 0) & (data['io','particle_identity'] > 0) return filter yt.add_particle_filter("dm", function=dm_filter, filtered_type="io") ds.add_particle_filter("dm") Hope this helps! You can similarly distinguish star particles using (or any weird RAMSES combination of ids, mass, etc...). def star_filter(pfilter, data): filter = (data['io','particle_birth_time'] != 0) return filter You will then be able to access your filtered particles using, e.g. ds.r['dm', 'particle_position']. I hope this helps! Cheers, Corentin On 29/11/2018 09.59, Vadlamani Samhitha wrote:
Hi, I would like to know if it’s possible to have a particle filter based on the mass resolutions of the particles. I am using RAMSES data where I can distinguish stars and dark matter only from their mass resolutions (no particle_type). Any help is highly appreciated.
_______________________________________________ yt-users mailing list -- yt-users@python.org To unsubscribe send an email to yt-users-leave@python.org