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.
Sent from my computer.
I am very new to Ytini's mailing list, mailing lists as well as Houdini.
So please bear with me while I pick up the etiquette around this medium.
With that out of the way here's my first question:
After having succeeded installing Ytini for Houdini on a Mac OS X 10.14 I
would now like to achieve the same with my Houdini install on a Windows 10
I have tried to somewhat reproduce all steps described here
http://www.ytini.com/getstarted.html#collapseTwoOut (Houdini 17.5 Tested on
Mac OS X) on my Windows machine but wasn't surprised to learn that of
course Houdini could not find the ytini module when I tried to import it in
the python shell.
Is there somebody, that could point me . in the right direction of how to
install Ytini for Houdini on a Windows 10 OS environment?
Not afraid of reading so even hints a re more than welcome.
Many Thanks in advance
I ran both HOP and Rockstar halo finders on the same ART simulations,
and the mass functions match very well (attached hmf_m.pdf file).
However, when I compare virial radii (attached hmf_r.pdf file), they
don't match. Even if I try rescaling the Rockstar virial radius by 1.5,
the match is much worse than for mass functions.
How are the 'virial_radius' fields defined for both halo finders?
This is a z=7 simulations, so all mass definitions are the same, Mvir =
M200m = M200c.
I also attach the script to plot virial radii if you want to check it,
although it is trivial.
Many thanks (as usual),
I am currently attempting to compare a catalog with Mvir and Rvir units of
Mpc/h and Kpc/h comoving to a catalog with Mpc and Kpc proper. I am
currently using yt version 3.5.1, which I just checked for updates.
When doing this conversion of units within yt, there appears to be a
problem where an amount of h*h is not handeled properly. I have included a
screenshot of a jupyter session that outlines the problem as well as a .py
and jupyter script so it can be tested.
The problem arises when I try to calculate delta_vir, which is the density
of a galaxy/ critical density. The correct value for both catalogs I am
comparing is around 170. When I use yt to calculate the critical density at
z = 2, it get the correct value, which I convert to Mpc*h*h//kpc/kpc/kpc to
match with my /h catalog. Then, when I divide the densities, even thought
their units are identical, their division is different than if just the
float values are divided, by an exact factor of h*h. I wonder if there is
something wrong with how I am initializing my values with the ytquantity,
or if there is something wrong going on in the code.
[image: Screen Shot 2019-07-31 at 2.36.01 PM.png]
I recently installed Anaconda3 with Python 3.7, as well as the latest yt 3.4.1. But when I ran my code, calculating the center of mass and angular momentum, an error saying:
count_values() got an unexpected keyword argument 'particle_type'
Is there anything I can do to fix it except installing an Anaconda with Python 3.6?
With the merger today of https://github.com/yt-project/yt/pull/2163 ,
Python 2 support has been removed from the yt-4 branch. Those of you
using the master branch or any release will not be affected, but if
you're on yt-4, keep this in mind.
When making projection plots of total gas density and cold gas density, averaged over the projection length (i.e. with a uniform weighting), and using cut_region() to filter out hot gas to make the cold gas plots, it appears that some areas in the cold gas plot have a higher density than the corresponding areas in the total gas plot, which shouldn't happen. If you look at the top-middle of the two plots (link below) and compare the densities, the cold gas appears to have a higher density there. The code is below:
(link to plots: https://drive.google.com/drive/folders/1UJ6fmKNFQzGr8cfjov5-GwOzfS8nt2e8?us…)
ds = yt.load("/tigress/cen/CZ15/redshift0100")
z = 0.62
# the box size is 120/0.7/(1+z) Mpc, where z is redshift
boxSize = 120e3/0.7/(1+z)
# virial radius in code units, r_v is virial radius in kpc
codeWidth = r_v / boxSize
center = [xCoord, yCoord, zCoord]
left_edge = [xCoord-2.1*codeWidth, yCoord-2.1*codeWidth, zCoord-2.1*codeWidth]
right_edge = [xCoord+2.1*codeWidth, yCoord+2.1*codeWidth, zCoord+2.1*codeWidth]
# want a box with full width about 4 times the virial radius
reg = ds.region(center, left_edge,right_edge)
# total gas plot
prj = yt.ProjectionPlot(ds, "x", "density", center=center, width=(4*r_v, 'kpc'),
data_source=reg, method='integrate', weight_field='ones')
u = 100 / 0.048
l = 0.07 / 0.048
# cold gas plot
cold_reg = reg.cut_region(["obj['temperature'] < 1e5"])
prj = yt.ProjectionPlot(ds, "x", "density", center=center, width=(4*r_v, 'kpc'),
data_source=cold_reg, method='integrate', weight_field='ones')
I am trying to plot streamlines using SlicePlot(x axis) and
annotate_streamlines (script below). The resulting image (google drive link
below) gives the orientation of streamlines along y axis. I would like to
have the streamlines orient along z-axis. I have tried switching the
variables on "SlicePlot" and "annotate_streamlines" but the streamlines
stays the same.
Can you give me any suggestions?
Thank you in advance
import numpy as np
import matplotlib.pylab as pl
from yt.visualization.api import Streamlines
from yt.units import km
from mpl_toolkits.mplot3d import Axes3D
ms = 24000000
dims = (200,200,200)
x = x.reshape((8000000, 3), order="F")
field1 = x[:,2].reshape(dims, order="F")
field2 = x[:,1].reshape(dims, order="F")
field3 = x[:,0].reshape(dims, order="F")
data = dict(field_x = field1,
field_y = field2,
field_z = field3)
bbox = np.array([[-100, 99], [-100, 99], [-100, 99]])
pf = yt.load_uniform_grid(data, dims, km, bbox=bbox, nprocs=1)
slc = yt.SlicePlot(pf, 0, ["field_z"], width=(200,'km'))
#slc.set_log('field_z', True, linthresh=0.001)
slc.annotate_line((0.36, 0), (0.36, 1),
slc.annotate_line((0.64, 0), (0.64, 1),
# larger the value of factor lesser the quiver
#slc.annotate_quiver('field_y', 'field_z', factor=20, normalize=True)
slc.annotate_sphere([0.5, 0.5, 0.5], radius=(9,
On Thu, Jan 10, 2019 at 11:00 AM <yt-users-request(a)python.org> wrote:
> Send yt-users mailing list submissions to
> To subscribe or unsubscribe via the World Wide Web, visit
> or, via email, send a message with subject or body 'help' to
> You can reach the person managing the list at
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of yt-users digest..."
> Today's Topics:
> 1. ANN: yt dev workshop, March 4-6 (Matthew Turk)
> Date: Thu, 10 Jan 2019 09:58:14 -0600
> From: Matthew Turk <matthewturk(a)gmail.com>
> Subject: [yt-users] ANN: yt dev workshop, March 4-6
> To: yt-dev(a)python.org, Discussion of the yt analysis package
> Cc: "Campbell, Mary Terese" <mtc(a)illinois.edu>, Samantha Walkow
> <samwalkow(a)gmail.com>, Madicken Munk <madicken.munk(a)gmail.com>
> Content-Type: text/plain; charset="UTF-8"
> Hi everyone!
> We are delighted to invite you to a yt development workshop at the
> University of Illinois Urbana-Champaign, March 4-6 of 2019. Please
> feel encouraged to pass this information on to others that may find it
> Information on logistics and registration may be found at the workshop
> This workshop will be focused on extending existing functionality,
> building collaborations with other software projects, and ingestion of
> new types and classes of data into yt.
> The workshop will take place at the National Center for Supercomputing
> Applications building on the north end of the UIUC campus. The NCSA
> building is about a block away from the conference hotel and is next
> door to a parking structure that offers metered all-day parking. There
> are a number of food trucks nearby, a university-run cafeteria about 2
> blocks away, and a university business district with many good lunch
> restaurants about a half a mile away.
> We are planning to offer funding for hotel and travel for those
> requesting support. If you request funding, you will be notified of
> available funds by February 16. Travel awards will be made in the
> form of arranged lodging and airfare, with reservations being made by
> the conference organizers.
> Best regards,
> The Organizing Committee
> MT Campbell
> Nathan Goldbaum
> Madicken Munk
> Matt Turk
> Samantha Walkow
> Subject: Digest Footer
> yt-users mailing list -- yt-users(a)python.org
> To unsubscribe send an email to yt-users-leave(a)python.org
> End of yt-users Digest, Vol 131, Issue 8
*"**Claiming that something can move faster than light is a good
conversation-stopper in physics. People edge away from you in cocktail
parties; friends never return phone calls. You just don’t mess with Albert
I could not find a solution for my issue in the archived threads so I am posting it here.
I use FLASH to run my MHD simulation and then use the output hdf5 plotfile to create and save a yt PhasePlot of number density and adiabatic index 'gamma' (user-defined fields) color-coded by the cell mass:
The axes labels are smaller than what I would like them to be. If I increase the font-size to a higher value (say, plot.set_font_size(30)), the axes labels are of the appropriate font size, but the x-axis tick labels also increase in size and overlap with the figure boundary. This might be because my tick labels have exponents (10^(11), 10^(12), etc.). Is there a way to only change the axes label size and not the tick label size while using yt?
Thanks in Advance,