Hi, Doesn't dm_density require the particle creation time to be less than or equal to zero? That is: field = pf.field_info["dm_density"] ------> print(field.get_source()) def _dmpdensity(field, data): blank = na.zeros(data.ActiveDimensions, dtype='float32') if data.NumberOfParticles == 0: return blank filter = data['creation_time'] <= 0.0 if not filter.any(): return blank amr_utils.CICDeposit_3(data["particle_position_x"][filter].astype(na.float64), data["particle_position_y"][filter].astype(na.float64), data["particle_position_z"][filter].astype(na.float64), data["particle_mass"][filter].astype(na.float32), na.int64(na.where(filter)[0].size), blank, na.array(data.LeftEdge).astype(na.float64), na.array(data.ActiveDimensions).astype(na.int32), na.float64(data['dx'])) return blank It is zero in my simulation; I checked. The particle_density field though works ok (well.... it looks the same as the stars!) and I've attached a projection of it. Elizabeth Matthew Turk wrote:
Hi Elizabeth,
We're basically trying to break down where the problem is.
Here are the definitions of star_density:
http://hg.enzotools.org/yt/src/tip/yt/frontends/enzo/fields.py#cl-269 http://hg.enzotools.org/yt/src/tip/yt/data_objects/universal_fields.py#cl-38...
Alternately to plotting the dm_density would just be particle_density:
http://hg.enzotools.org/yt/src/tip/yt/data_objects/universal_fields.py#cl-90...
Additionally, trying without the grid overplot would also be helpful. The specific item we're focusing on with the particle_density etc is whether it's the grids that are causing a problem or the particle selection.
Thanks,
-Matt
On Mon, Jun 13, 2011 at 9:11 AM, Elizabeth Tasker <taskere@mcmaster.ca> wrote:
Hi Britton,
I don't have any DM in my simulations, so I don't think that will produce anything?
Elizabeth
Britton Smith wrote:
Hi Elizabeth,
Matt and I are still puzzling over this. It's not clear right now if the issue is related to projecting particles in general in your data or projecting star particles specifically. Can you do another full box projection for us, but this time with the field dm_density? That should help us to narrow down the problem.
Britton
On Mon, Jun 13, 2011 at 10:31 AM, Elizabeth Tasker <taskere@mcmaster.ca <mailto:taskere@mcmaster.ca>> wrote:
Hi Matt and Britton,
I've attached the image for the stars over the whole disk; it shows the same issue, with the grids (and also any gas property) showing the region correctly, but the stars only appearing in a small patch.
Matt, your script gives:
Min: [('x', 5.6774955112245706), ('y', 5.7878015648296586), ('z', 15.07668303734844)] Max: [('x', 26.537083788811703), ('y', 25.802074691296504), ('z', 17.201602159672426)]
Which are the values I expect.
It could be, as Britton suggests, a problem with the box size not being 0-1. Although, that is a particularly random patch it's decided to fill in.
Elizabeth
Matthew Turk wrote:
Hi Elizabeth,
Weird.
This script should help us find out where the stars live. What's it give you? (Replace the loaded dataset with your own.)
http://paste.enzotools.org/show/1696/
Also, it'd be nice to see that image Britton requested.
-Matt
On Fri, Jun 10, 2011 at 2:02 PM, Elizabeth Tasker <taskere@mcmaster.ca <mailto:taskere@mcmaster.ca>> wrote:
Oddly, neither of those make any difference.
Elizabeth
Britton Smith wrote:
I would also suggest trying some projections instead of slices as well. Both of those fields are created using the CIC_deposit interpolation method with just the star particles. I could see a field like that being problematic when doing slices.
Britton
On Fri, Jun 10, 2011 at 4:10 PM, Cameron Hummels <chummels@astro.columbia.edu <mailto:chummels@astro.columbia.edu> <mailto:chummels@astro.columbia.edu <mailto:chummels@astro.columbia.edu>>> wrote:
Try using the field StarMassMsun instead of star_density and see what it yields. I've had better luck with that field.
Cameron
On 6/10/11 4:00 PM, Elizabeth Tasker wrote:
Hi,
Slices of the star_density field are only showing a tiny patch of the area in the corner, rather than the whole region. My script looks like:
pc = PlotCollection(pf, center=[17.,11.5, 16]) p = pc.add_slice("star_density", 2) pc.set_width(10, 'kpc') p.modify["grids"]()
Density comes out fine and the grids are drawn in but then only a few of them get stars.
Elizabeth
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org <mailto:yt-users@lists.spacepope.org> <mailto:yt-users@lists.spacepope.org <mailto:yt-users@lists.spacepope.org>>
http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org <mailto:yt-users@lists.spacepope.org> <mailto:yt-users@lists.spacepope.org <mailto:yt-users@lists.spacepope.org>>
http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
------------------------------------------------------------------------
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org <mailto:yt-users@lists.spacepope.org>
http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org <mailto:yt-users@lists.spacepope.org> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org <mailto:yt-users@lists.spacepope.org> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org <mailto:yt-users@lists.spacepope.org> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
------------------------------------------------------------------------
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org