Hi all, Elizabeth, Britton and I worked on this off-list on IRC. What I have deduced is that the star particles in her simulation are not located at the finest resolution element. After discussing it with her, this seems to me to be likely related to how she generated the data, by restarting data written by an older version of Enzo with a recent version of Enzo, having it write the potential field, and then outputting again. What happens with data in a projection, or a slice for instance, is that higher-resolution grids are assumed to contain *better* data than the lower-resolution grids. So while actual plots of the *particles* looked fine (I verified this) the fluid quantities, particle_density etc etc, were being generated for coarse level grids and then overwritten by finer level grids. Unfortunately, those finer level grids did not contain any particles. So their fluid values were zero, and were overwriting coarser level information which was non-zero. This is desired behavior; but I cannot think of any solution to this problem that will work in all cases. So, this will continue to go 'unfixed' for now, as well-formed outputs are assumed to have their particles located at the locally-finest level of resolution, and this dataset does not meet that criterion. Best, Matt On Mon, Jun 13, 2011 at 11:04 AM, Britton Smith <brittonsmith@gmail.com> wrote:
Ok, that at least tells us it's not a problem with the filter that's looking for just the star particles. Can you run this script: http://paste.enzotools.org/show/1704/ on your data, pipe the output to a file and send that back? Just give the path to your dataset on the command line. This should check to see if there are any inconsistencies in the grid dx's and positions.
Britton
On Mon, Jun 13, 2011 at 1:38 PM, Elizabeth Tasker <taskere@mcmaster.ca> wrote:
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
_______________________________________________ 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