That depends on the star particle formation and feedback algorithm you used and how Enzo is writing the star particle data to disk. If both the alive and dead particles have particle type set to 2 in the Enzo outputs then yes your filter will select both. You would need to add more criterions to your filter definition to separate different kinds of star particles.On Wed, Jun 27, 2018 at 10:06 AM, tyuta <y0u1t1a5.t@gmail.com> wrote:______________________________Dear yt users,Hi, I want to ask about star particles in enzo simulation. I want to know whether "star particle filter" only give me "alive" star particles or also counts "dead" particles (which have exploded in the past).I defined the "star particle" with particle filter like this:import ytfrom yt.data_objects.particle_filters import add_particle_filter def stars(pfilter, data):filter = data[(pfilter.filtered_type, "particle_type")] == 2return filterdef DMparticles(pfilter, data):filter = data[(pfilter.filtered_type, "particle_type")] == 1return filteryt.add_particle_filter("Stars", function=stars, filtered_type='io', requires=["particle_type"])yt.add_particle_filter("DMparticles", function=DMparticles, filtered_type='io', requires=["particle_type"])ds = yt.load("~/IsolatedGalaxy/galaxy0030/galaxy0030") ds.add_particle_filter('Stars') ds.add_particle_filter('DMparticles') ad = ds.all_data()stellar_mass = ad[("Stars", "particle_mass")].in_units('Msun') print(stellar_mass)Does this "stellar_mass" contain both alive and dead stars ?Best,Y.T._________________
yt-users mailing list -- yt-users@python.org
To unsubscribe send an email to yt-users-leave@python.org
_______________________________________________
yt-users mailing list -- yt-users@python.org
To unsubscribe send an email to yt-users-leave@python.org