Hi,I am trying to find abundance of C contained within a sphere through the Profile1D function in yt. I tried something like this:ds=yt.load(filename)sp = ds.sphere("max", (10.0, 'kpc'))profile = yt.Profile1D(sp, "x", 32, rmin, rmax, False, weight_field=None)profile.add_fields(["cell_mass"])profile.add_fields(["c12 "])profile.add_fields(["x"])print profile ["cell_mass"].sum()/Msunprint profile ["c12 "]*["cell_mass"].sum()/Msunand got the following error:File "profile_1D.py", line 74, in <module>print profile ((["c12 "]*["cell_mass"]).sum())/MsunTypeError: can't multiply sequence by non-int of type 'list'
is there any way I can calculate the C12 abundance here?BestTazkera
_______________________________________________
yt-users mailing list
yt-users@lists.spacepope.org
http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org