Hi,
I'm trying to add text to a particular point in my slice. I've got:
position = na.array([20.2, 13.8, 16.0])
pc = PlotCollection(pf, center=position)
p = pc.add_projection("Density", 2)
p.set_width(2, 'kpc')
for c in range(len(t1clouds)):
r = abs(t1clouds[c]['position']-position)
if r[0] < 1.0 and r[1] < 1.0:
p.modify["point"](t1clouds[c]['position'], str(t1clouds[c]['track']))
p.modify["marker"](t1clouds[c]['position'], marker='o')
pc.save("%s_tracking" % (fn))
But python complains with:
TypeError: text() argument after ** must be a mapping, not NoneType
Did I call the modifier incorrectly?
Elizabeth
Hi all,
There's been quite a bit of discussion on yt-dev about changing the
internal convention in yt of using "na" for numpy (which originally
stood for "numarray") to "np", which is the commonly used shorthand.
We'll keep around "na" in the yt.mods namespace, which means your
scripts should *not* need any adjustment. But, if you have made a
number of substantial changes to the internals of yt in your version,
any updates after this change is made may pose problems and may need
to be hand-modified.
If you'd like to contribute to the discussion (we're waiting until
next week to make the switch) please do so on yt-dev or here. This
change, which touches many many files, was not decided on lightly and
we're trying to ensure that the transition is smooth without any
external effects. Here's the thread:
http://lists.spacepope.org/pipermail/yt-dev-spacepope.org/2012-August/002...
(Note that tomorrow starts a new archive month, so you might need to
switch the URL for any new messages after today.)
Again, this should not pose any issues for you unless you have
modified yt internals. If you have done so and would like help
updating, please reply to this message or contact yt-dev.
Best,
Matt
Hi all,
Just as a heads up, if you are on the development branch and have been
using fields that used the field_parameter "height", this has been
changed to fit better with other areas of the code and is now the
field_parameter "normal". Thanks to Mike Kuhlen for fixing up our
cylindrical coordinates fields!
Relevant changeset:
https://bitbucket.org/yt_analysis/yt/changeset/edc2b99212bd100a4357083f3f...
-Matt
Everybody good afternoon,
about Fortran kD Tree Setup, just to keep thread with my fix.
1) I downloaded the YT-DEV version and it didn't fix my problem.
However, when I downloaded Forthon-0.8.7.tgz it did the trick.
2) Now I want to talk about another issue that I am getting. This time
is with clumps. I am using an enzo data, with the code example in the
YT documentation. this is my code:
-----
import sys
from yt.mods import * # set up our namespace
from yt.analysis_modules.level_sets.api import *
import yt.frontends.enzo.api
yt.frontends.enzo.api.EnzoHierarchy._bn = "%s.grid.cpu%%04i"
fn = "/astro/data/redshift0058/redshift0058" # parameter file to load
field = "Density"
step = 10.0
pf = load(fn) # load data
c = [0.403290331 , 0.471765608 , 0.461319029]
r = [0.411690331 , 0.480165608 , 0.469719029]
l = [0.394890331 , 0.463365608 , 0.452919029]
data_source = pf.h.region(c,l,r)
c_min = 10**na.floor(na.log10(data_source[field]).min() )
c_max = 10**na.floor(na.log10(data_source[field]).max()+1)
master_clump = Clump(data_source, None, field)
find_clumps(master_clump, c_min, c_max, step)
f = open('%s_clump_hierarchy.txt' % pf,'w')
write_clump_hierarchy(master_clump, 0, f)
f.close()
f = open('%s_clumps.txt' % pf,'w')
write_clumps(master_clump,0,f)
f.close()
---------
and I got the follow error.
Traceback (most recent call last):
File "/astro/py/clump.py", line 34, in <module>
find_clumps(master_clump, c_min, c_max, step)
File
"/astro/yt-dev/yt-x86_64/src/yt-hg/yt/analysis_modules/level_sets/clump_handling.py", line 181,
in
find_clumps
find_clumps(clump, min_val*d_clump, max_val, d_clump)
File
"/astro/yt-dev/yt-x86_64/src/yt-hg/yt/analysis_modules/level_sets/clump_handling.py", line 181,
in
find_clumps
find_clumps(clump, min_val*d_clump, max_val, d_clump)
File
"/astro/yt-dev/yt-x86_64/src/yt-hg/yt/analysis_modules/level_sets/clump_handling.py", line 190,
in
find_clumps
elif (child._isValid()):
File
"/astro/yt-dev/yt-x86_64/src/yt-hg/yt/analysis_modules/level_sets/clump_handling.py", line 144,
in
_isValid
self.function_value = eval(self.function)
File "<string>", line 1, in <module>
File
"/astro/yt-dev/yt-x86_64/src/yt-hg/yt/data_objects/derived_quantities.py",
line 94, in __call__
return self._call_func_unlazy(args, kwargs)
File
"/astro/yt-dev/yt-x86_64/src/yt-hg/yt/data_objects/derived_quantities.py",
line 119, in _call_func_unlazy
retval = self.func(self._data_source, *args, **kwargs)
File
"/astro/yt-dev/yt-x86_64/src/yt-hg/yt/data_objects/derived_quantities.py",
line 360, in _IsBound
thermal = (data["ThermalEnergy"] * mass_to_use).sum()
File
"/astro/yt-dev/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py",
line
327, in __getitem__
self.get_data(key)
File
"/astro/yt-dev/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py",
line
2536, in get_data
if self._generate_field(field):
File
"/astro/yt-dev/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py",
line
359, in _generate_field
self[field] = self.pf.field_info[field](self)
File
"/astro/yt-dev/yt-x86_64/src/yt-hg/yt/data_objects/field_info_container.py",
line 316, in __call__
dd = self._function(self, data)
File
"/astro/yt-dev/yt-x86_64/src/yt-hg/yt/frontends/enzo/fields.py", line
134, in _ThermalEnergy
return data["TotalEnergy"]
File
"/astro/yt-dev/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py",
line
327, in __getitem__
self.get_data(key)
File
"/astro/yt-dev/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py",
line
2536, in get_data
if self._generate_field(field):
File
"/astro/yt-dev/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py",
line
363, in _generate_field
raise KeyError(field)
KeyError: 'TotalEnergy'
I did it with the whole data (it took forever), however, I got the
same exactly error. Anybody has an advice??
--
Francia F.R.
Dear All,
First, thank you for the previous help that I got from the ML. Now I
have another issue.
Traceback (most recent call last):
File "/astro/py/halo_finder.py", line 14, in <module>
hp = HP.HaloProfiler(fn, halo_list_file='HopAnalysis.out')
File
"/astro/yt/yt-x86_64/src/yt-hg/yt/analysis_modules/halo_profiler/multi_halo_profiler.py", line 310,
in
__init__
self._load_halo_data()
File
"/astro/yt/yt-x86_64/src/yt-hg/yt/analysis_modules/halo_profiler/multi_halo_profiler.py", line 967,
in
_load_halo_data
self._run_hop(hop_file)
File
"/astro/yt/yt-x86_64/src/yt-hg/yt/analysis_modules/halo_profiler/multi_halo_profiler.py", line 1124,
in
_run_hop
**self.halo_finder_kwargs)
File
"/astro/yt/yt-x86_64/src/yt-hg/yt/analysis_modules/halo_finding/halo_objects.py", line 2268,
in
__init__
premerge=premerge, tree=self.tree)
File
"/astro/yt/yt-x86_64/src/yt-hg/yt/analysis_modules/halo_finding/halo_objects.py", line 1639,
in
- Ignored:
__init__
HaloList.__init__(self, data_source, dm_only)
File
"/astro/yt/yt-x86_64/src/yt-hg/yt/analysis_modules/halo_finding/halo_objects.py", line 1067,
in
__init__
self._run_finder()
File
"/astro/yt/yt-x86_64/src/yt-hg/yt/analysis_modules/halo_finding/halo_objects.py", line 1667,
in
_run_finder
tree=self.tree)
File
"/astro/yt/yt-x86_64/src/yt-hg/yt/analysis_modules/halo_finding/parallel_hop/parallel_hop_interface.py", line 73,
in
__init__
self._chain_hop()
File
"/astro/yt/yt-x86_64/src/yt-hg/yt/analysis_modules/halo_finding/parallel_hop/parallel_hop_interface.py", line 1536,
in
_chain_hop
self._init_kd_tree()
File
"/astro/yt/yt-x86_64/src/yt-hg/yt/analysis_modules/halo_finding/parallel_hop/parallel_hop_interface.py", line 351,
in
_init_kd_tree
fKD.dens = na.zeros(self.size, dtype='float64', order='F')
NameError: global name 'fKD' is not defined
I tried to install Fortran kD Tree Setup
http://yt-project.org/doc/analysis_modules/running_halofinder.html?highli...
But I got the follow error.
Using Forthon ()
Forthon -F gfortran --compile_first fKD_source --no2underscores
--with-numpy --fopt "-O3" fKD fKD_source.f90
Usage: Forthon [options] pkgname [extra Fortran or C files to be
compiled or objects to link] [options for distutils]
Forthon: error: no such option: --with-numpy
make: *** [fKD] Error 2
X-Riesco-Francia:kdtree friesco$ sudo make
Using Forthon ()
Forthon -F gfortran --compile_first fKD_source --no2underscores
--with-numpy --fopt "-O3" fKD fKD_source.f90
Usage: Forthon [options] pkgname [extra Fortran or C files to be
compiled or objects to link] [options for distutils]
Forthon: error: no such option: --with-numpy
make: *** [fKD] Error 2
I am using Mac IOS Lion 10.7.4 and the latest YT build
Thank in Advance
Dear YT users,
I have a problem in installing the SciPy library when using YT python, what happens is that:
-when installing from packages, also after activating yt (i.e. through the command sudo apt-get install python-scipy) I get the confirmation that SciPy is correctly installed but i cannot
import it in YT python, since probably the installation is connected to
the system python instead.
-when installing from source (by downloading the packages) I get a lot of
errors concerning missing libraries (mainly blas and atlas).
I installed them and added the paths to a "site.cfg" file, but I am still getting the same error.
Also, I appended the system SciPy path through the sys.path.append()
function, in this way I can succesfully import SciPy, but I cannot
import any sublibrary such as SciPy.optimize (which is the one I particularly need).
By browsing the YT Mailing List I found a user with a similar problem
(http://lists.spacepope.org/htdig.cgi/yt-users-spacepope.org/2011-July/001...), but there are no suggestions in reply.
I would like to ask if there is a way to get SciPy installed under YT or make it available to be included.
Cheers,
Roberto
John,
as of right now, I have just "successfully" built XSPEC for Lion, with
the patch applied that Matt pointed me to for Python. I had no errors in
the build, and I'll attempt to use it shortly and let you know off-line if
anything fails.
Cheers,
Eric
The other problem is that XSPEC doesn't do 64-bit builds on Mac because of
X11, or so they say. If you can get it to work please let me know. I tried
this earlier this week with no luck.
John ZuHone
Laboratory for High-Energy Astrophysics
NASA/Goddard Space Flight Center
8800 Greenbelt Rd., Code 662
Greenbelt, MD 20771
(w) 301-286-2531
(m) 773-758-0172
jzuhone(a)gmail.com
john.zuhone(a)nasa.gov
On Aug 24, 2012, at 5:02 PM, Eric Hallman <hallman13(a)gmail.com> wrote:
Matt,
thanks for the heads up. I made the patch and am trying to rebuild.
Thanks!
Eric
Matt wrote:
Hi Eric,
Looks like this is known for non-framework builds of Python on OSX.
(We don't build it Framework-wise because it caused a bunch of
problems in the past and mainly only allowed usage of a few native
widgets.) Here is a patch you can apply and then rebuild Python with
to (possibly) get it to work:
http://bugs.python.org/issue1602133
-Matt
On Fri, Aug 24, 2012 at 4:46 PM, Eric Hallman <hallman13(a)gmail.com> wrote:
Hello,
I know this is not a yt specific issue, however it involves an interaction
of the yt installed python and XSPEC. Maybe some of you on this list have
done an XSPEC install on Mac OS X (Lion in this case) and run into this. At
link time during the build of XSPEC, it gives the following error:
Undefined symbols for architecture x86_64:
"_environ", referenced from:
_initposix in libpython2.7.a(posixmodule.o)
ld: symbol(s) not found for architecture x86_64
Originally on my Mac, XSPEC tried to build 32-bit, and failed with python
linkages (since python is 64 bit in the yt install build). Once I went to
64-bit, this was the only remaining error. Does anyone have ideas?
Thanks!
Eric Hallman
_______________________________________________
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
Matt,
thanks for the heads up. I made the patch and am trying to rebuild.
Thanks!
Eric
Matt wrote:
Hi Eric,
Looks like this is known for non-framework builds of Python on OSX.
(We don't build it Framework-wise because it caused a bunch of
problems in the past and mainly only allowed usage of a few native
widgets.) Here is a patch you can apply and then rebuild Python with
to (possibly) get it to work:
http://bugs.python.org/issue1602133
-Matt
On Fri, Aug 24, 2012 at 4:46 PM, Eric Hallman <hallman13(a)gmail.com> wrote:
Hello,
I know this is not a yt specific issue, however it involves an interaction
of the yt installed python and XSPEC. Maybe some of you on this list have
done an XSPEC install on Mac OS X (Lion in this case) and run into this. At
link time during the build of XSPEC, it gives the following error:
Undefined symbols for architecture x86_64:
"_environ", referenced from:
_initposix in libpython2.7.a(posixmodule.o)
ld: symbol(s) not found for architecture x86_64
Originally on my Mac, XSPEC tried to build 32-bit, and failed with python
linkages (since python is 64 bit in the yt install build). Once I went to
64-bit, this was the only remaining error. Does anyone have ideas?
Thanks!
Eric Hallman
_______________________________________________
yt-users mailing list
yt-users(a)lists.spacepope.org
http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
Hello,
I know this is not a yt specific issue, however it involves an
interaction of the yt installed python and XSPEC. Maybe some of you on
this list have done an XSPEC install on Mac OS X (Lion in this case) and
run into this. At link time during the build of XSPEC, it gives the
following error:
Undefined symbols for architecture x86_64:
"_environ", referenced from:
_initposix in libpython2.7.a(posixmodule.o)
ld: symbol(s) not found for architecture x86_64
Originally on my Mac, XSPEC tried to build 32-bit, and failed with python
linkages (since python is 64 bit in the yt install build). Once I went to
64-bit, this was the only remaining error. Does anyone have ideas?
Thanks!
Eric Hallman
Hello all,
I'm taking my first stab at editing my own fork of yt-dev and need some help.
I'm trying to add several more species to the list in frontends/enzo/fields.py which act exactly like the fields already there. I've edited the code to add these new fields then ran "python setup.py develop" from the yt-hg directory. When I did this I never saw a message about compiling/building this edited file. When I load a data set it still treats my fields as 'unknown'.
1) Are there any other files I should be editing to add new species fields (akin to HII_Density)?
2) What is the proper way to build yt once I've made these changes?
Thanks,
Carolyn