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.
Hi all,
I have trouble running yt in parallel on Blue Waters. I installed yt using
miniconda, the version of yt is
~/miniconda/lib $yt version
yt module located at:
/u/sciteam/madcpf/miniconda/lib/python2.7/site-packages/yt-3.3.dev0-py2.7-linux-x86_64.egg
The current version and changeset for the code is:
---
Version = 3.3-dev
Changeset = 90f900be7a36+ yt
Then with miniconda/bin in PATH I installed mpi4py-2.0.0. But when I tried
to make the following simple output in parallel, I get:
import yt
yt.enable_parallelism()
from yt.utilities.parallel_tools.parallel_analysis_interface import\
parallel_objects, communication_system
comm = communication_system.communicators[-1]
print comm.rank, comm.size
0 1
0 1
0 1
0 1
0 1
0 1
0 1
0 1
...
When I run a similar code but with yt-2.x also on Blue Waters, I get what I
expect:
7 16
15 16
6 16
9 16
11 16
8 16
0 16
4 16
...
I'm confused about it. Could anyone give me some suggestions please?
Thanks,
Pengfei
Hi,
I am trying to find abundance of C contained within a sphere through the
Profile1D function in yt. I tried something like this:
*ds=yt.load(filename)*
* sp = ds.sphere("max", (10.0, 'kpc'))*
* profile = yt.Profile1D(sp, "x", 32, rmin, rmax, False, weight_field=None)*
* profile.add_fields(["cell_mass"])*
* profile.add_fields(["c12 "])*
* profile.add_fields(["x"])*
*print profile ["cell_mass"].sum()/Msun*
*print profile ["c12 "]*["cell_mass"].sum()/Msun*
and got the following error:
* File "profile_1D.py", line 74, in <module>*
* print profile ((["c12 "]*["cell_mass"]).sum())/Msun*
*TypeError: can't multiply sequence by non-int of type 'list'*
*is there any way I can calculate the C12 abundance here?*
*Best*
*Tazkera*
I am very new to yt and am having trouble installing it. I am running on a
Macbook pro 2011 with OS X El Capitan version 10.11.5
This steps I took:
$ hg clone https://bitbucket.org/yt_analysis/yt
$ cd yt
$ chmod +x ./doc/install_script.sh
$ ./doc/install_script.sh
After sometime installing... I get this:
********************************************
FAILURE REPORT:
********************************************
from
//System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h:11,
from
//System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:35,
from
//System/Library/Frameworks/Carbon.framework/Headers/Carbon.h:24,
from Include/pymactoolbox.h:10,
from Python/mactoolboxglue.c:27:
//System/Library/Frameworks/CoreGraphics.framework/Headers/CGFont.h:53:1:
error: initializer element is not constant
static const CGFontIndex kCGGlyphMax = kCGFontIndexMax;
^
Makefile:1286: recipe for target 'Python/mactoolboxglue.o' failed
make: *** [Python/mactoolboxglue.o] Error 1
********************************************
********************************************
Failure. Check
/Users/elliote/Desktop/Theia_Streaming_Tutorial/yt/yt-x86_64/yt_install.log.
The last 10 lines are above.
Does anyone have any ideas on how I can go about fixing this?
Thanks!
Hi yt-users,
I'm trying to play around with yt for SPH type data (there's no frontend
for this code). I found out how to load generic particle data via the
load_particle_data stream
(http://yt-project.org/docs/dev/examining/generic_particle_data.html#generic…)
and I found some information on SPH type data
(http://yt-project.org/doc/analyzing/fields.html#sph-fields) but I can't
seem to figure out how to tell yt that I have a smoothing length and a
particle I want to smooth. Is there a way to do this?
I attach a non-working script showing roughly what I'm trying to do.
Thanks in advance!
Best,
Jonah
To whom it may concern,
I am having trouble loading GIZMO data to make a simple slice plot and this
is the error I get:
yt.utilities.exceptions.YTDomainOverflow: Particle bounds (-934.41559,
-727.99188, -1092.047) and (509.55978, 797.46954, 1034.1028) exceed domain
bounds [ 0. 0. 0.] code_length and [ 10000. 10000. 10000.] code_length
Any help would be really useful. Please send me any questions you may have.
Please and thank you,
Adrianna Perez
Hi yt-users,
So I am using the developers yt-conda version of yt. I am trying to review
a pull request, but have no idea what I am doing. All I ever do is
yt update
I literally just broke yt 5 days ago, so I am a bit unwilling to just poke
around trying out random hg commands to see what happens. Is this what I
am supposed to do once I have activated yt?
hg clone https://bitbucket.org/yt_analysis/ytcd yt
hg update yt
python setup.py install --user --prefix=
And *if* this is right, how do I grab a specific change set?
Thanks so much!
Stephanie
--
Dr. Stephanie Tonnesen
Alvin E. Nashman Postdoctoral Fellow
Carnegie Observatories, Pasadena, CA
stonnes(a)gmail.com
Hello yt users,
I have a question about projection. I used ds.proj() and to_frb() to get an
image array of the projected 'Electron_Density' of an entire dataset. I
multiplied the mean of projected 'Electron_Density' by the entire area of
x-y plane and got a sum of total mass of electrons. Then, I used
ds.all_data() and mean() to get the mean of 'Electron_Density' in
3-dimensional. I multiplied the mean by the volume of the entire box of the
dataset and got another sum of total mass of electrons. However, this sum
did not match the sum I got from the projected 'Electron_Density'
previously. Here are the codes I used:
import yt
import numpy as np
ds = yt.load("redshift0100/redshift0100")
print("Redshift =", ds.current_redshift)
p = yt.ProjectionPlot(ds, 2, 'Electron_Density')
density_image = p.frb['Electron_Density']
ed = density_image['Electron_Density'].convert_to_cgs()
ed_ndarr = ed.to_ndarray()
sum1 = ed_ndarr.mean() * ((105.82 * 3.085677581e+24)**2)
print(sum1)
dd = ds.all_data()
ed_3d = dd['Electron_Density'].convert_to_cgs()
sum2 = ed_3d.mean() * ((105.82 * 3.085677581e+24)**3)
print(sum2)
(105.82 * 3.085677581e+24) is the width of entire box in cm. I think sum1
and sum2 should be close to each other, but the result was that the two
values did not match with each other. Is there any problem in the codes I
used to get the values of sum1 and sum2? Could some one give me some help?
Thank you very much!
Sincerely,
Hansheng
Hi yt people,
I need a little help creating a derived field which will return me the
negative gradient of gravitational potential
*@derived_field(name = "gradient_gravpot", units = " cm/s**2")*
*def _gradient (field, data):*
* G = add_gradient_fields(("gas"," gravitational_potental"))*
* return (- data["gravitational_potential_gradient_x"])*
and I got this error
*NameError: global name 'add_gradient_fields' is not defined*
please suggest the right method to define the field. thanks
Best
Turhan
Hi yt-ers,
I am trying to make a quick edit to the source code to see if it works, and
don't know how to actually implement the changes. Can I just make clean
and then re-make yt in my yt directory? I basically have no idea what I am
doing here...
Thanks for all advice!
Stephanie
--
Dr. Stephanie Tonnesen
Alvin E. Nashman Postdoctoral Fellow
Carnegie Observatories, Pasadena, CA
stonnes(a)gmail.com