[yt-users] Creating 1-D Radial Profile

Lu, Yinghe ylv4 at illinois.edu
Sat Dec 13 21:59:32 PST 2014


Hi everyone,

        I have a question using the create_profile routine. I am currently using yt for analyzing FLASH data (creating 1D radial density profile namely). Now I am encountering trouble where after creating the profile, the field value is outputting a lot of zeros around the domain centre.

ds = yt.load(filename)
sphere = ds.sphere(ds.domain_center, (300.0, "kpc"))
print sphere["density"][1:50].value
profile = yt.create_profile(sphere, "radius", "density",
                                   weight_field = "cell_volume",units = {'radius': 'kpc'})
print profile["density"][1:50].value


    After creating the sphere, the field value has no zeros; they only start to occur after creating the profile. I have used other methods to check my simulation and there are no zero densities involved. So I was wondering if there is something in the create_profile routine (maybe the weighting or binning) is causing this, and how could I get rid of the them?


      Thanks all,
      Yinghe

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20141214/100a7028/attachment-0001.htm>
-------------- next part --------------
_______________________________________________
yt-users mailing list
yt-users at lists.spacepope.org
http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org


More information about the yt-users mailing list