[yt-users] frb & covering grids

Elizabeth Tasker tasker at astro1.sci.hokudai.ac.jp
Wed May 30 01:12:29 PDT 2012


OK, I've answered all the questions myself! Sorry…..

(In case any other user was wondering about the same thing:

Call for smoothed_covering_grid:

scg = pf.h.smoothed_covering_grid(1, left_edge=na.array([0.,0.,0.]), right_edge=na.array([64.,64.,64.]), dims=na.array([512,512,512])  

It returns a 3D object, so you can access the data like:

scg["Density"][i,j,k]

and it is interpolated, while covering_grid is not.)

Elizabeth




On May 30, 2012, at 4:44 PM, Elizabeth Tasker wrote:

> Hi,
> 
> I want to make a uniform 2D grid of a field from my Enzo simulation data.
> 
> Currently, I take a slice:
> 
> sl = pf.h.slice(0, 32.0, 'Accel3Name')
> 
> and then make an frb:
> 
> frb = sl.to_frb(64.0/pf['kpc'], resolution, center=galaxy_center)
> 
> However, it looks like frb (being really a visualization tool) uses a ngp scheme and doesn't interpolate. Is that true? 
> 
> That being so, would smoothed_covering_grid do what I want? (i.e. give me an interpolated field between two positions where none of the values are the same for different positions)?
> 
> Is it called via:
> 
> scg = pf.h.smoothed_covering_grid(4, na.array([0.,0.,0.]), na.array([32.,32.,32.]))
> 
> Then, I can just grab the appropriate slice of cells? Does it return the 3D data as a 3D array or 1D?
> 
> i.e. can I do:
> 
> scg["Accel3Name"][0,0,0]
> 
> If not, is it obvious to work out which the centre slice of cells are? Or can I use "slice" and specify the scg as the object? 
> 
> Elizabeth
> _______________________________________________
> 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