Hi, Everybody!
Does anyone out there have a technique for getting the variance out of
a profile object? A profile object is good at getting <X> vs. B, I'd
then like to get < (X - <X>)^2 > vs B. Matt and I had spittballed the
possibility some time ago, but I was wondering if anyone out there had
successfully done it.
Thanks,
d.
--
Sent from my computer.
Hello everyone.
I was wondering if anyone has had experience with producing a profile plot
from a 2d projection object (FRB object).
Essentially, what I am trying to do is plot the stellar surface density of
a galaxy as a function of radius.
This is achieved by doing the following from a disk YT object called
cylinder (in which the origional simulation object is called shot)
center = cylinder.get_field_parameter("center")
normal = cylinder.get_field_parameter("normal")
image_width = (100,"kpc")
three_image_width = YTArray((image_width[0], image_width[0],
image_width[0]),image_width[1])
left = center - image_width
right = center + image_width
region = shot.region(center, left, right)
proj =
yt.ProjectionPlot(cylinder.ds,"z",[("deposit","stars_density")],center=center,width=image_width,data_source=region,axes_unit="kpc")
the error arrises here
prof =
yt.create_profile(proj,bin_fields="cylindrical_r",fields=[("deposit","stars_density")],n_bins=128,weight_field=None
)
where I get the error
/gpfs/home/........./profiles.pyc in create_profile(data_source,
bin_fields, fields, n_bins, extrema, logs, units, weight_field,
accumulation, fractional)
1304 else:
1305 raise NotImplementedError
-> 1306 bin_fields = data_source._determine_fields(bin_fields)
1307 fields = data_source._determine_fields(fields)
1308 if units is not None:
AttributeError: 'FixedResolutionBuffer' object has no attribute
'_determine_fields'
Any ideas how to get around this error?
Also some other things to add as a postscript. Since how the projection
works, if I provide weights=None as a keyword argument within the
ProjectionPlot object, I get a surface density (g/cm^2). But also a
"cylindrical_r" in cm^2 as well. I *think* the way to get around this is to
do another projection where weights="ones", get the radius values out of
that profile.. and then in matplotlib, useing the surface density array
from the former profile, and the radius bin array from the latter...
Produce a plot of the surface density as a function of radius from those
two arrays (I might check by hand afterwards to see if this does the
trick). This seems kinda convoluted so I am wondering if there is an easier
way than this.
_______________________________________________
yt-users mailing list
yt-users(a)lists.spacepope.org
http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
Hi all,
I am trying to locally install yt on Blue Waters.
I did a module of swap to PrgEnv-gnu and then bash install_script.sh.
Has anyone run into this error before?
http://paste.yt-project.org/show/5576/
Thanks,
Kenza
Hi,
I want to render a Volume Plot based on data from a FLASH file, which
uses HDF5 file format. I tried the tutorial at
http://yt-project.org/doc/cookbook/simple_plots.html#cookbook-simple-volume… with my file, but I always get this
error:
yt\units\yt_array.py:764: RuntimeWarning: divide by zero encountered in divide
return YTArray(super(YTArray, self).__rdiv__(lo))
yt\data_objects\image_array.py:229: RuntimeWarning: invalid value
encountered in multiply
np.multiply(self[:, :, :3], 1.0/cmax, out[:, :, :3])
This is the complete log:
yt : [INFO ] 2015-05-29 20:51:30,302 integer runtime parameter
checkpointfilenumber overwrites a simulation scalar of the same name
yt : [INFO ] 2015-05-29 20:51:30,302 integer runtime parameter
forcedplotfilenumber overwrites a simulation scalar of the same name
yt : [INFO ] 2015-05-29 20:51:30,302 integer runtime parameter
nbegin overwrites a simulation scalar of the same name
yt : [INFO ] 2015-05-29 20:51:30,302 integer runtime parameter
particlefilenumber overwrites a simulation scalar of the same name
yt : [INFO ] 2015-05-29 20:51:30,302 integer runtime parameter
plotfilenumber overwrites a simulation scalar of the same name
yt : [INFO ] 2015-05-29 20:51:30,331 Parameters: current_time
= 1.10472907814e+17
yt : [INFO ] 2015-05-29 20:51:30,331 Parameters: domain_dimensions
= [16 16 16]
yt : [INFO ] 2015-05-29 20:51:30,332 Parameters: domain_left_edge
= [ -2.20000000e+25 -2.20000000e+25 -2.20000000e+25]
yt : [INFO ] 2015-05-29 20:51:30,332 Parameters: domain_right_edge
= [ 2.20000000e+25 2.20000000e+25 2.20000000e+25]
yt : [INFO ] 2015-05-29 20:51:30,332 Parameters:
cosmological_simulation = 0.0
yt : [INFO ] 2015-05-29 20:51:32,513 Loading field plugins.
yt : [INFO ] 2015-05-29 20:51:32,513 Loaded angular_momentum (8
new fields)
yt : [INFO ] 2015-05-29 20:51:32,515 Loaded astro (15 new fields)
yt : [INFO ] 2015-05-29 20:51:32,515 Loaded cosmology (22 new fields)
yt : [WARNING ] 2015-05-29 20:51:32,515 Field ('gas',
'number_density') already exists. To override use force_override=True.
yt : [INFO ] 2015-05-29 20:51:32,516 Loaded fluid (63 new fields)
yt : [INFO ] 2015-05-29 20:51:32,516 Loaded fluid_vector (95 new fields)
yt : [INFO ] 2015-05-29 20:51:32,516 Loaded geometric (111 new fields)
yt : [INFO ] 2015-05-29 20:51:32,517 Loaded local (111 new fields)
yt : [INFO ] 2015-05-29 20:51:32,517 Loaded magnetic_field (119
new fields)
yt : [INFO ] 2015-05-29 20:51:32,519 Loaded my_plugins (119 new fields)
yt : [INFO ] 2015-05-29 20:51:32,519 Loaded species (121 new fields)
yt : [INFO ] 2015-05-29 20:51:42,595 Warning: no_ghost is
currently True (default). This may lead to artifacts at grid boundaries.
Ray casting100% ||||||||||||||||||||||||||||||||||||||||||||||| Time: 00:00:01
C:\Anaconda\lib\site-packages\yt\units\yt_array.py:764:
RuntimeWarning: divide by zero encountered in divide
return YTArray(super(YTArray, self).__rdiv__(lo))
C:\Anaconda\lib\site-packages\yt\data_objects\image_array.py:229:
RuntimeWarning: invalid value encountered in multiply
np.multiply(self[:, :, :3], 1.0/cmax, out[:, :, :3])
The image itself is created, but only black, also the rendering
process is instantly finished.
I've tried it with the "Enzo_64/DD0043/data0043" file as used for the
tutorial, this works with errors. Then I've tried using a given FLASH
dataset, the "GalaxyClusterMerger" - same result as my dataset, also
the error.
I'm using Win 8.1 64-bit Anaconda distribution and yt-project 3.1.
Also tried the same thing on Ubuntu 14 with freshly installed
yt-project, same error.
Is there a solution to create a volume render with FLASH files?
Thank you for your attention!
Kilian
Helly yt-crowd.
I am doing some volume rendering in yt and getting some errors when I try to grow the image size. I am trying to write a png image that is 1024 x 1024. I get the following errors:
image_array.py:229: RuntimeWarning: invalid value encountered in multiply
np.multiply(self[:, :, :3], 1.0/cmax, out[:, :, :3])
yt_array.py:764: RuntimeWarning: divide by zero encountered in divide
return YTArray(super(YTArray, self).__rdiv__(lo))
The largest image I can generate is about 800x 800. It is a nice image too I tell ya. Just wish I could do a bigger one to submit for publication.
Attached is the script I am using. Any help would be great.
Thanks,
Dave Semeraro
_______________________________________________
yt-users mailing list
yt-users(a)lists.spacepope.org
http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
Hi, Everybody--
I have a dumb question about temperature in enzo. Where is it? I thought
I rememberd that being a stock derived field, but I don't see it in the
enzo frontends. I can go ahead and make a PR for that if there's not
something obvious I'm missing.
Thanks!
d.
--
-- Sent from a computer.
_______________________________________________
yt-users mailing list
yt-users(a)lists.spacepope.org
http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
Dear users,
This there a simple way to store multiple values at each step using
parallel_objects? I'm doing:
########################################################
yt.enable_parallelism()
num_procs = 4
plot = glob.glob(./plot*)
my_storage = {}
for sto, p in yt.parallel_objects(plots, num_procs, my_storage):
sto.result_id = 'energy' + p
sto.resutl = dd["total_energy"]
sto.result_id = 'Px' + p
sto.result = dd["total_mom_x"]
######################################################
which is just overwriting my energy with the momentum. I also tried to just
set to different dictionaries without passing it to yt.parallel_objects as
storage, but of course each proc as only a local copy then.
Cordially,
Josh
_______________________________________________
yt-users mailing list
yt-users(a)lists.spacepope.org
http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
Hi, Everyone--
I'm trying to get code units from enzo for a cosmology run, but
in_units('code_density')
seems to do nothing.
'code_mass/code_length**3'
seems to work. Is this a bug, or a feature?
>>> ad['density'].in_units('code_mass/code_length**3')
YTArray([ 0.9970247 , 0.99774731, 0.99854185, ..., 0.99993769,
0.99914176, 0.99841755]) code_mass/code_length**3
>>> ad['density'].in_units('code_density')
YTArray([ 1.87321000e-29, 1.87456764e-29, 1.87606042e-29, ...,
1.87868293e-29, 1.87718755e-29, 1.87582689e-29]) code_density
Thanks!
d.
--
-- Sent from a computer.
_______________________________________________
yt-users mailing list
yt-users(a)lists.spacepope.org
http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
Hi Jonah,
That's right -- the volume rendering won't work, but slices will. The
VR should be working relatively soon, though.
-Matt
On Sun, May 24, 2015 at 8:47 PM, Jonah Miller
<jonah.maxwell.miller(a)gmail.com> wrote:
> Oh, I should add that I don't think 3D visualization is possible with
> hexahedral meshes at the moment. The pixelizer doesn't support them yet...
> At least that's my understanding. If you really need a 3D visualization, you
> might want to try transforming your data into a regularly spaced grid (using
> another tool) and then loading uniformly spaced data as in this example:
> http://yt-project.org/docs/dev/examining/spherical_data.html
>
> Best,
> Jonah
>
>
> On 15-05-24 09:41 PM, Jonah Miller wrote:
>
> Hi Katharina, Andrew,
>
> There is a convenience function to create the coordinates and connectivity
> arguments: hexahedral_connectivity. This function takes three 1D arrays,
> which are the projections of your grid points onto your coordinate axes,
> here called x,y, and z. The function then returns the connectivity and
> coordinates arrays.
>
> Here's an example:
> http://yt-project.org/docs/dev/examining/loading_data.html#semi-structured-…
>
> Best,
> Jonah
>
> On 15-05-24 09:35 PM, Andrew Myers wrote:
>
> Hi Katharina,
>
> I don't have an example handy, but the "coordinates" and "connectivity"
> arguments are arrays you construct that describe the vertices and zones of
> the hexahedral mesh you want. The "coordinates" argument is supposed to be a
> (N_vertices, 3) - shaped array of floats that has the x, y, and z positions
> of all the vertices in the hexahedral mesh. The "connectivity" argument is a
> (N_zone, 8) - shaped array of ints that gives, for each zone, the indices of
> the 8 vertices that surround it. So for example, if connectivity[0][2] is
> '12', then coordinates[12] would give the position coordinate of the third
> vertex surrounding the first zone, if that makes sense.
>
> Once you've constructed those arrays from the information in your dataset
> and fed them into "load_hexadral_mesh", yt shouldn't care whether the data
> came from an HDF5 file or not.
>
> -Andrew
>
> On Sun, May 24, 2015 at 11:46 AM, Katharina Wollenberg
> <kwollenberg89(a)gmail.com> wrote:
>>
>> Hello together,
>>
>> for visualising a 3D disk from ZEUS-MP HDF5 data in yt, I need to load a
>> single spherical polar coordinate grid where x1,x2,x3 are R,T,P and R has
>> ratioed zones. For that I want to use the command
>> yt.load_hexahedral_mesh(data, connectivity, coordinates, length_unit=None,
>> ...) . However, since I am new to yt, I am a little bit stuck right now…
>> I am not quite sure what is meant in detail by the arguments connectivity
>> and coordinates and how to formulate them in the load_hexahedral_mesh
>> command.
>>
>> Furthermore, do I need to pay particular attention on some commands
>> because of using HDF5 data?
>>
>> If anyone has an example for me, that’d be very helpful!
>>
>> Thanks a lot!
>>
>> Katharina Wollenberg
>>
>>
>>
>> _______________________________________________
>> yt-users mailing list
>> yt-users(a)lists.spacepope.org
>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>>
>
>
>
> _______________________________________________
> yt-users mailing list
> yt-users(a)lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>
>
>
>
> _______________________________________________
> yt-users mailing list
> yt-users(a)lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>
_______________________________________________
yt-users mailing list
yt-users(a)lists.spacepope.org
http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
Hello together,
for visualising a 3D disk from ZEUS-MP HDF5 data in yt, I need to load a single spherical polar coordinate grid where x1,x2,x3 are R,T,P and R has ratioed zones. For that I want to use the command yt.load_hexahedral_mesh(data, connectivity, coordinates, length_unit=None, ...) . However, since I am new to yt, I am a little bit stuck right now…
I am not quite sure what is meant in detail by the arguments connectivity and coordinates and how to formulate them in the load_hexahedral_mesh command.
Furthermore, do I need to pay particular attention on some commands because of using HDF5 data?
If anyone has an example for me, that’d be very helpful!
Thanks a lot!
Katharina Wollenberg
_______________________________________________
yt-users mailing list
yt-users(a)lists.spacepope.org
http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org