I am trying to calculate the total HI mass within a sphere. I have a field called 'HI_Density'. And I tried to use the script
HI_Mass = sphere['enzo','HI_Density'].in_units('Msun').sum()
But I got an error that says the unit code_mass/code_length**3 cannot be converted to code_mass.
So I thought I might need to create a derived_field called 'HI_Mass' which mutiplies the HI_Density with code_length**3. But I don't see that there is any existing field of cell length/volume. So how should I do this? Or is there an easier way to compute the total HI mass without deriving a field?
Jingjing Chen [ firstname.lastname@example.org ]
Department of Astronomy
550 West 120th Street
New York, New York 10027
Cell Phone: +1(347)5746709