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()/Msun
print profile ["c12 "]*["cell_mass"].sum()/Msun


and got the following error:

 File "profile_1D.py", line 74, in <module>
    print profile ((["c12 "]*["cell_mass"]).sum())/Msun
TypeError: can't multiply sequence by non-int of type 'list'



is there any way  I can calculate the C12 abundance here?



Best
Tazkera