j: Next unread message
k: Previous unread message
j a: Jump to all threads
j l: Jump to MailingList overview
I also have a follow-up question. My previous question was about the build-in deposited fields. But when I try to do that myself, units seem to be screwed up.
import yt import numpy as np
def StellarMass2(field,data): ms = data[('STAR','particle_mass')] if('FieldDetector' in str(type(data))): return ms else: return ms.in_units("Msun")
d = yt.load("rei10_a0.1001/rei10_a0.1001.art")
xcen = d.arr([5,5,5],"Mpccm/h") s = d.sphere(xcen,(100,"kpc")) sf = ('STAR','mass2') df = ('deposit','STAR_nn_mass2')
> 1625.2196373326824 Msun 1625.2196373326824 Msun
I.e, the units of the deposited field are that of mass, rather than density.
Even worse, if I treat the deposited field as the mass per cell rather than density, it does not add up:
So, I am totally lost about what add_deposited_particle_field() function actually does.