
Hi Stephen,
from yt.config import ytcfg; ytcfg["yt","serialize"] = "False" from yt.mods import * from yt.analysis_modules.star_analysis.api import * pf = load("DD0088/g1e10s1e11dm1e12_0088") my_disk=pf.h.disk([0.5, 0.5, 0.5], [0, 0, 1], 50/pf["kpc"], 10/pf["kpc"]) sel = (my_disk["particle_type"] == 2) st_ct = my_disk["creation_time"][sel] st_mass = my_disk["ParticleMassMsun"][sel] sfr = StarFormationRate(pf, star_mass = st_mass, star_creation_time = st_ct)
However! The error message you sent shows that the "creation_time" field is problematic in your dataset, so even the example above won't work.
As you say, I also tried selecting particles by particle_type and it didn't work
This looks like an enzo dataset, can you try this command and tell me what the output is?
h5ls DD0088/g1e10s1e11dm1e12_0088.cpu0000/Grid00000001
Sorry, I forgot to mention it but you're right, this is an enzo dataset. Here is the output:
$ h5ls DD0088/g1e10s1e11dm1e12_0088.cpu0000/Grid00000001 Density Dataset {128, 128, 128} Metal_Density Dataset {128, 128, 128} Temperature Dataset {128, 128, 128} TotalEnergy Dataset {128, 128, 128} x-velocity Dataset {128, 128, 128} y-velocity Dataset {128, 128, 128} z-velocity Dataset {128, 128, 128}
Thanks! Fernando