Hi,
Here is the data and simple script to make a scatter or profile plot of my
simulation output,
https://www.dropbox.com/sh/ibpda938ltsxl0j/2AA2FYDUH8#/
This is a spherically symmetric (cartesian [-0.5,0.5]^3, 32cells^3) hydro
simulation with initial conditions
density = 1.0 if radius <= 1/3;
density falls off as 1/r^2 if r > 1/3;
velocity is everywhere 0
The output with these ICs is WP12.0000.vtk. When I run my script the first
time using iyt I get the first image with the expected ICs. Running it
again gives the second image and I don't know why. I'm hoping those other
points don't actually exist in my data. Maybe I am just missing something
simple?
The evolved data, WP12.0030.vtk, is provided as well. Running this data
'cleans the slate' so that I can then go back to see the problem with my
initial conditions again. Of course, the problem shows up in this data too.
Thanks in advance!
Tim
Dear yt gurus,
I've enjoyed using yt for a number of FLASH problems in cartesian geometry.
Right now I'm just starting on a setup in FLASH 2D polar (eventually also
in 3D cylindrical) geometries.
These are ordered
2D polar: r, theta
3D cylindrical: r, theta, z
I was intrigued when I noticed this image on the yt-blog (
http://blog.yt-project.org/post/WhatsUpWith30.html) -- which is almost
exactly what I would like to do.
[image: http://blog.yt-project.org/attachments/cylindrical_pixelizer.png]
I have updated to yt-3.0, and tried the simplest "Sliceplot" of the data:
fn = "const_rho_g_atm_hdf5_plt_cnt_0013"
pf = load(fn)
fig = SlicePlot(pf, 2,'dens').save("myfig.png")
This reads loads the 2D polar plot file correctly, but renders the result
in a cartesian sense.
Does anyone have advice/recipes for how to proceed with Slices rendered
"cylindrically"? I understand that this feature set is not yet fully
developed but I was curious if there was a solution (or parts of a
solution) floating around out there.
Thanks so much,
Morgan MacLeod
-------------------------------------------------
Graduate Student
Astronomy & Astrophysics
UC Santa Cruz
Hey guys,
I've been trying to make slices of density only looking at cooler
gas (i.e. with a cut in Temperature). I've found a nice way to do this for
simple projections. But my strategy breaks for Off-Axis projections.
Specifically, this works fine:
*
*
*field_parameters={'field_cuts':["grid['Temperature'] < 1e6 "]})*
*cold_proj =
ProjectionPlot(pf,0,'Density',field_parameters=field_parameters)*
* *
but this does not:
*cold_proj = OffAxisProjectionPlot(pf,axis,'Density',north_vector=north,*
* field_parameters= field_parameters)*
sensibly enough, since field_parameters is not a keyword argument for off
axis projections.
Is there a decent workaround for this? Or would this be simple to add into
yt's functionality? I've looked briefly into the
source<http://yt-project.org/doc/_modules/yt/visualization/plot_window.html#OffAxi…>and
it doesn't seem obvious how to slip this in.
thanks!
Munier
--
Munier A. Salem // 845.489.6450
Hello Everyone!
So, I have a question about how does covering grid actually works. I have a
Flash simulation output of a 28*28 Mpc box containing a cluster. I am
trying to simulate the spectra from a region of size (0.08 Mpc x, 0.08 Mpc
y, 28 Mpc z) around the centre, (I will assume z is my line of sight) so I
use this line to define the region:
#The shape of my region
cube = pf.h.covering_grid(level_max, left_edge=newlep,
right_edge=newrep,dims=[6, 6, 128])
where level = 5 (max level of refinement for my Flash data), "newlep" is
centre coordinates (Mpc) minus 0.08 Mpc and newrep is centre coordinates
plus 0.08 Mpc, and then into percentage units.
I put them into an array of dimensions [6,6,128] because I want 36 spectra
(one for each pixel of the ccd) so I will fix an (x,y) position and write
an XSPEC file for all z elements. (I need basically temperature and density
of all the elements).
My question is: how does covering grid makes a single field value
(temperature, for example) inside the (x,y,z) position? because I am
arbitrarily saying to divide the region into 6 pixel, but the data file
might have many simulation pixels inside , so how are the field values
calculated? is it just an average? or are just certain points taken into
consideration?
Thanks for any hints/tips/help!
Barbara Ramirez
University of Innsbruck, Austria
Hi Nathan,
thanks a lot for your suggestions! I updated yt to the current
development version, which didn't fix the problem. So I tried what you
suggested:
On 08/06/2013 07:52 PM, yt-users-request(a)lists.spacepope.org wrote:
> and then try your script again. If the issue isn't fixed by updating, I
> would then try applying the following diff to the nyx frontend:
>
> diff -r f936432ed45d yt/frontends/nyx/data_structures.py
> --- a/yt/frontends/nyx/data_structures.py Tue Jul 30 10:08:24 2013
> -0700
> +++ b/yt/frontends/nyx/data_structures.py Tue Aug 06 08:10:25 2013
> -0700
> @@ -611,7 +611,7 @@
> # aliases we need
> self.parameters["TopGridRank"] =
> len(self.parameters["TopGridDimensions"]
> self.dimensionality = self.parameters["TopGridRank"]
> - self.domain_dimensions = self.parameters["TopGridDimensions"]
> + self.domain_dimensions =
> np.array(self.parameters["TopGridDimensions"])
> self.refine_by = self.parameters.get("RefineBy", 2) # 2 is silent
> defaul
>
> # Nyx is always cosmological.
>
I replaced the definition of self.domain_dimensions with the np.array
thing. Now, the script actually reads in the data, but then another
problem is encountered when an FFT is applied to the data:
Searching grids for values 100%
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Time: 00:03:04
yt : [ERROR ] 2013-08-07 11:56:48,958 Covering problem: 16777216
cells are uncovered
Traceback (most recent call last):
File "/usr/users/wschmid2/scripts/spect_sb.py", line 72, in <module>
velx_hat = na.fft.fftn( cg['xmom']/cg['density'] )/cg['xmom'].size
File
"/home/uni05/wschmid2/yt-i686/src/yt-hg/yt/data_objects/data_containers.py",
line 332, in __getitem__
self.get_data(key)
File
"/home/uni05/wschmid2/yt-i686/src/yt-hg/yt/data_objects/data_containers.py",
line 3776, in get_data
raise KeyError(n_bad)
KeyError: 16777216
The line with the fft actually used to work and it still works just fine
if I use an old yt version (which, fortunately, I was able to dig out).
Do you understand what is the problem here?
Cheers,
Wolfram
Hi, everybody--
I'm having trouble getting plot_window coordinages and annotate_image_line
coordinates to agree. I have a small region that I'm trying to annotate
with lines, and zoom in on. I'm having trouble getting my coordinates
working together.
If I do
proj = oober.pf.h.proj(ax,'Density',source=source)
pw = proj.to_pw(center=proj_center,origin='domain' )
pw.zoom( 1/size)
I have the object centered on the plot and zoomed appropriately. If I do
proj = oober.pf.h.proj(ax,'Density',source=source)
pw = proj.to_pw()
pw.annotate_image_line(p1, p2, data_coords=True)
the lines show up in the position I expect relative to my object. However,
if I include both the re-centering in to_pw and the call to
annotate_image_line, the line doesn't show up where I want relative to the
object. If I skip the data_coords or origin argument it doesn't seem to
help. I've dug around the docs and source but haven't sorted how to make
the plot window coordinages and annotate_image_line coordinates agree.
Thanks!
d.
--
-- Sent from a computer.