I downloaded the example script of light cone projectoin(
to my laptop and changed the Enzo simulation parameter file and redshifts.
But when I ran it the following error occurred:
File "light_cone_projection.py", line 19, in <module>
line 158, in __init__
line 44, in __init__
File "/Users/madcpf/Documents/dev_yt/src/yt-hg/yt/convenience.py", line
131, in simulation
line 81, in __init__
line 343, in __init__
line 273, in _parse_parameter_file
param, vals = (i.strip() for i in line.split("="))
ValueError: need more than 1 value to unpack
Does the parameters "near_redshift" and "far_redshift" in LightCone need to
be the same with "CosmologyFinalRedshift" and "CosmologyInitialRedshift" in
enzo parameter file?
Does anyone know how to solve this?
Thank you all!
I'm quite confused on a number of points related to running the rockstar
halo finder, so I hope its alright that I put all these questions into this
1. I can't seem to run the rockstar halo finder at all without getting this
error followed by a segmentation fault and crash.
[Warning] Network IO Failure (PID XXXXXX): Connection reset by peer
[Network] Packet receive retry count at: 1
It sort of seems like this issue (
but I couldn't really figure out what the resolution was from the thread.
Im attempting to run this on kraken and it doesn't matter if I use a single
compute node or multiple, I get the same error. (I hope this isn't the
infiniband issue the docs warned about, I couldn't figure out if that is
how kraken is connected and I got an error that the suggested flag doesn't
exist so I didn't press the issue.)
2. Whenever I finally do get the halo finder to work, I need the results to
be in a form that the merger tree can use. It seems as though the
MergerTree needs the results in the same form as the other halo finders
give, so would getting the halo list and then dumping it as usual be the
appropriate strategy? Ie:
halo_list = rh.halo_list()
2.5. The docs sort of give mixed messages on whether or not I could just be
calling MergerTree with the argument halo_finder_function =
RockstarHaloFinder. At this point I've pretty thoroughly convinced myself
that I can't, but it would be nice if that was clarified. (Just a
thoroughly overwhelmed new user's perspective!)
3. I'm a little confused as to whether or not I have to use a
TimeSeriesData object rather than the usual single time output when
instantiating the halo finder. Under "Rockstar Halo Finding" it uses
TimeSeriesData, unlike the rest of the examples, but under the subheading
"Output Analysis" it just uses pf. The "Output Analysis" example also
doesn't call the run() method, which leads me to believe something else
entirely is going on, but its not quite clear.
Hi Again, Everyone!
So I would also like my figures to be in physical units, instead of in my
code units. I *think* the Athena frontend doesn't read in what the unit
conversions are (and I am not sure how it would do that). Can I just do
something simple like:
DensityUnits = 3.
density_physunits = grid['density'] * DensityUnits
Then, of course, I don't know how I would do a SlicePlot, ProjectionPlot or
phaseplot in physical units...
Any help/advice/direction is appreciated!
I am having an issue in creating off axis projection plots with short
depths in yt. I am looking for disks around particles which necessitates
using the off axis projection functionality. What I want to do is create a
projection where the depth is the same as or similar to the width of the
plot. However, I am finding that unless the depth is orders of magnitude
larger than the width I will always create a blank plot (for example, the
width is ~100 au, the depth to get a plot has to be ~1000xwidth, I want a
plot where the width and depth are ~100 au). I have tried using both
off_axis_projection and the OffAxisProjection methods with similar (bad)
As a comparison, I ran a low resolution FLASH simulation that did not seem
to have this problem. I also know that such a plot was possible with ORION2
data in the recent past (spring of this year) since a colleague was able
produce such a plot. That same script now also fails.
Does anyone know of a way around this problem? Has there been any recent
changes that broke volume rendering for chombo/orion2 data?
I have been trying to load RAMSES data into yt 2.5. Orginaly it was loading in but the graphs I was able to produce didn’t make sense. So I tried to change to yt3 using the commands
hg pull http://bitbucket.org/yt_analysis/yt-3.0
hg up -C yt-3.0
python2.7 setup.py build_ext -i -f
The commands appear to have worked. But when I try to use yt to load in RAMSES data I now get this error:
Traceback (most recent call last): File "/Applications/Code/yt/yt-x86_64/src/yt-hg/yt/gui/reason/basic_repl.py", line 81, in execute exec code in self.locals File "", line 1, in File "/Applications/Code/yt/yt-x86_64/src/yt-hg/yt/convenience.py", line 76, in load if c._is_valid(*args, **kwargs): candidates.append(n) File "/Applications/Code/yt/yt-x86_64/src/yt-hg/yt/frontends/art/data_structures.py", line 427, in _is_valid amr_header_vals = read_attrs(fh, amr_header_struct, '>') File "/Applications/Code/yt/yt-x86_64/src/yt-hg/yt/utilities/fortran_utils.py", line 62, in read_attrs vals = list(struct.unpack(net_format, f.read(size))) error: unpack requires a string argument of length 892
Any idea what I need to do?
I am trying to install scipy by using the install script, but it keeps
failing all the time. Could you help me to check what's wrong with it?
Thank you very much for your help! Here are the last few lines in the log
Processing dependencies for distribute==0.6.32
Finished processing dependencies for distribute==0.6.32
After install bootstrap.
Searching for pip
Best match: pip 1.4.1
pip 1.4.1 is already the active version in easy-install.pth
Installing pip script to /home/yzheng/yt-x86_64/bin
Installing pip-2.7 script to /home/yzheng/yt-x86_64/bin
Processing dependencies for pip
Finished processing dependencies for pip
Running from scipy source directory.
libraries mkl,vml,guide not found in ['/home/yzheng/yt-x86_64/lib',
'/usr/local/lib', '/usr/lib', '/usr/lib/x86_64-linux-gnu']
libraries ptf77blas,ptcblas,atlas not found in
['/home/yzheng/yt-x86_64/lib', '/usr/local/lib', '/usr/lib',
libraries f77blas,cblas,atlas not found in ['/home/yzheng/yt-x86_64/lib',
'/usr/local/lib', '/usr/lib', '/usr/lib/x86_64-linux-gnu']
Atlas (http://math-atlas.sourceforge.net/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [atlas]) or by setting
the ATLAS environment variable.
I am running merger tree on Enzo simulations following the recipe given in
YT documentation. YT crashes by producing the following error. I am using
yt version "b118390aa42c". Any ideas what is going on here?
FOF CPU TIME: 2.408634 secs
========== Cycle 00009 (z=9.999997) ==========
Parent halo = 0
--> Most massive progenitor == Halo -1
========== Cycle 00008 (z=14.999989) ==========
========== Cycle 00007 (z=19.999992) ==========
========== Cycle 00006 (z=29.999961) ==========
Traceback (most recent call last):
File "enzo.py", line 33, in <module>
line 507, in save_halo_evolution
halo_id = self.levels[cycle_fin].halo_id
IndexError: list index out of range
Thanks in advance,
I am hoping to calculate the flux of mass ("mdot") and angular momentum
("Ldot") through a series of concentric spherical surfaces in a simulation
snapshot (centered around an absorbing "sink" within the grid).
So far, I've attempted this along these lines:
pf = load(fn) # load data
rad = 0.1
sp = pf.h.sphere([0,0,0],1.1*rad)
surf = pf.h.surface(sp,"Radius",rad)
flux = surf.calculate_flux("x-velocity","y-velocity","z-velocity","Density")
where flux gets assigned to the mass accretion rate in this case. I
believe I could do the angular momentum by calculating the flux of a
derived variable that is defined as
data["SpecificAngularMomentumZ"] * data["Density"]
such that the resulting units are angular momentum per volume.
I was wondering if there is a better way to go about this calculation, it
seems that others must have tried to look at similar questions. In
particular, defining an "isoradius" surface seems to accomplish what I was
hoping to do, but there must be a cleaner way.
Thanks so much for your advice,
I would like to create a derived field which should return a value
according to specified conditions. My definition of new field is shown
below.. But it is giving error.
@derived_field(name = "MyField")
def my_new_field(field, data):
if data.pf["MachNumber"] < 2 :
return (.5* (data["MachNumber"])**2) - 1
elif data.pf["MachNumber"] < 100 :
return (.5* (data["MachNumber"])**4) + (.5* (data["MachNumber"])**3)
Please suggest me how to implement if, elif, else statements in creating a
Reju Sam John
Okay, so I am trying to make a SlicePlot, a ProjectionPlot, and a
phase_object for a bunch of different outputs. My code keeps using up all
my memory and dying after the first loop. I am not using variables, I
think, so how do I free up my memory at the end of each loop?
See code below.
import matplotlib.pylab as pl
from mpl_toolkits.mplot3d import Axes3D
from yt.mods import *
i = 0
while i < len(outstring):
p = SlicePlot(pf,"x","Density")
p2 = ProjectionPlot(pf,"x","Density")
alld = pf.h.all_data()
pc = PlotCollection(pf)
tracerp25 = alld.cut_region(["grid['specific_scalar'] > 0.25",
"grid['z'] > 0.04"])
tp25extrema = tracerp25.quantities["Extrema"]("Density")
i = i+1