I'm getting this error on an old script I used to create the halo mass function on Triton I had on top from yt.analysis_modules.halo_finding.api import HaloMassFcn and got: Traceback (most recent call last): File "parallelHF.py", line 52, in <module> hmf = HaloMassFcn(pf, halo_file=filename[3]+"ParallelHopAnalysis.out", NameError: name 'HaloMassFcn' is not defined I was wondering if this is because yt was updated to 2.0 on triton? in the email there's an example of what to use for HaloFinder from yt.analysis_modules.halo_finding.api import HaloFinder so for HaloMassFcn do I do from yt.analysis_modules.halo_????.api import HaloMassFcn can someone fill in what ???? is, or how I can find that information? Or is the 2.0 manual out that I'm not aware of that has this information already? From G.S.
Hi Geoffrey,
can someone fill in what ???? is, or how I can find that information? Or is the 2.0 manual out that I'm not aware of that has this information already?
The manual is coming out as soon as I can get it ready. Currently the triton installation is actually still the stable branch, so all the current documentation *should* be valid. If you can post more of the traceback when you use the old notation, that would be helpful. (And for anyone out there who is also a bit annoyed at the reorganization, I'm working on rebuilding a new set of docs with revamped API documentation, but the "stable" branch in mercurial is the old version with the old names.) -Matt
I ran into the same problem today. The following works for me: from yt.mods import * from yt.analysis_modules.halo_mass_function.api import * I figured this out by looking in $YTDIR/yt/analysis_modules/. Mike gso@physics.ucsd.edu wrote:
I'm getting this error on an old script I used to create the halo mass function on Triton
I had on top from yt.analysis_modules.halo_finding.api import HaloMassFcn
and got:
Traceback (most recent call last): File "parallelHF.py", line 52, in <module> hmf = HaloMassFcn(pf, halo_file=filename[3]+"ParallelHopAnalysis.out", NameError: name 'HaloMassFcn' is not defined
I was wondering if this is because yt was updated to 2.0 on triton? in the email there's an example of what to use for HaloFinder
from yt.analysis_modules.halo_finding.api import HaloFinder
so for HaloMassFcn do I do
from yt.analysis_modules.halo_????.api import HaloMassFcn
can someone fill in what ???? is, or how I can find that information? Or is the 2.0 manual out that I'm not aware of that has this information already?
From G.S.
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
-- ********************************************************************* * * * Dr. Michael Kuhlen Theoretical Astrophysics Center * * email: mqk@astro.berkeley.edu UC Berkeley * * cell phone: (831) 588-1468 601 Campbell Hall * * skype username: mikekuhlen Berkeley, CA 94720 * * * *********************************************************************
Hi Mike and Geoffrey, To help alleviate with this, I've added a new list (which is created at runtime, but can be re-created) called "available_analysis_modules" to yt.mods. So right now it looks like this:
from yt.mods import * available_analysis_modules
['coordinate_transformation', 'halo_finding', 'halo_mass_function', 'halo_merger_tree', 'halo_profiler', 'hierarchy_subset', 'level_sets', 'light_cone', 'light_ray', 'simulation_handler', 'spectral_integrator', 'star_analysis', 'two_point_functions'] So you can then import from any of the api's in those directories. This just uses a very simple guess at where the directory analysis_modules is located, and won't support things like extensions in external packages etc etc. But it should get us most of the way there... -Matt On Wed, Sep 8, 2010 at 7:06 PM, Michael Kuhlen <mqk@astro.berkeley.edu> wrote:
I ran into the same problem today. The following works for me:
from yt.mods import * from yt.analysis_modules.halo_mass_function.api import *
I figured this out by looking in $YTDIR/yt/analysis_modules/.
Mike
gso@physics.ucsd.edu wrote:
I'm getting this error on an old script I used to create the halo mass function on Triton
I had on top from yt.analysis_modules.halo_finding.api import HaloMassFcn
and got:
Traceback (most recent call last): File "parallelHF.py", line 52, in <module> hmf = HaloMassFcn(pf, halo_file=filename[3]+"ParallelHopAnalysis.out", NameError: name 'HaloMassFcn' is not defined
I was wondering if this is because yt was updated to 2.0 on triton? in the email there's an example of what to use for HaloFinder
from yt.analysis_modules.halo_finding.api import HaloFinder
so for HaloMassFcn do I do
from yt.analysis_modules.halo_????.api import HaloMassFcn
can someone fill in what ???? is, or how I can find that information? Or is the 2.0 manual out that I'm not aware of that has this information already?
From G.S.
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
-- ********************************************************************* * * * Dr. Michael Kuhlen Theoretical Astrophysics Center * * email: mqk@astro.berkeley.edu UC Berkeley * * cell phone: (831) 588-1468 601 Campbell Hall * * skype username: mikekuhlen Berkeley, CA 94720 * * * ********************************************************************* _______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
I had to cut and paste some of the errors because I used 64 cores, but I think here's all of them: /projects/lca-group/local-dev/lib/python2.6/site-packages/pytz/__init__.py:29: UserWarning: Module readline was already imported from /projects/lca-group/lo$ from pkg_resources import resource_stream Traceback (most recent call last): File "parallelHF.py", line 3, in <module> from yt.analysis_modules.halo_mass_function.api import * ImportError: No module named analysis_modules.halo_mass_function.api this is with Mike's from yt.analysis_modules.halo_mass_function.api import * looks like it can't find the corresponding module. Am I the only one seeing this on triton? Just curious, might be something wrong with my env variable etc? From G.S.
Hi Mike and Geoffrey,
To help alleviate with this, I've added a new list (which is created at runtime, but can be re-created) called "available_analysis_modules" to yt.mods. So right now it looks like this:
from yt.mods import * available_analysis_modules
['coordinate_transformation', 'halo_finding', 'halo_mass_function', 'halo_merger_tree', 'halo_profiler', 'hierarchy_subset', 'level_sets', 'light_cone', 'light_ray', 'simulation_handler', 'spectral_integrator', 'star_analysis', 'two_point_functions']
So you can then import from any of the api's in those directories. This just uses a very simple guess at where the directory analysis_modules is located, and won't support things like extensions in external packages etc etc. But it should get us most of the way there...
-Matt
On Wed, Sep 8, 2010 at 7:06 PM, Michael Kuhlen <mqk@astro.berkeley.edu> wrote:
I ran into the same problem today. The following works for me:
from yt.mods import * from yt.analysis_modules.halo_mass_function.api import *
I figured this out by looking in $YTDIR/yt/analysis_modules/.
Mike
gso@physics.ucsd.edu wrote:
I'm getting this error on an old script I used to create the halo mass function on Triton
I had on top from yt.analysis_modules.halo_finding.api import HaloMassFcn
and got:
Traceback (most recent call last): File "parallelHF.py", line 52, in <module> hmf = HaloMassFcn(pf, halo_file=filename[3]+"ParallelHopAnalysis.out", NameError: name 'HaloMassFcn' is not defined
I was wondering if this is because yt was updated to 2.0 on triton? in the email there's an example of what to use for HaloFinder
from yt.analysis_modules.halo_finding.api import HaloFinder
so for HaloMassFcn do I do
from yt.analysis_modules.halo_????.api import HaloMassFcn
can someone fill in what ???? is, or how I can find that information? Or is the 2.0 manual out that I'm not aware of that has this information already?
From G.S.
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
-- ********************************************************************* * * * Dr. Michael Kuhlen Theoretical Astrophysics Center * * email: mqk@astro.berkeley.edu UC Berkeley * * cell phone: (831) 588-1468 601 Campbell Hall * * skype username: mikekuhlen Berkeley, CA 94720 * * * ********************************************************************* _______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
Hi Geoffrey, As I mentioned earlier, the version installed on Triton is from before the reorganization. Use the yt documentation to get the imports correctly, and debug the imports on a single core -- you can run the imports just interactively on the login node. You don't need the analysis_modules stuff. :) This worked for me: from yt.mods import * from yt.extensions.halo_mass_function import * taken from here: http://yt.enzotools.org/doc/howto/hmf_howto.html -Matt On Wed, Sep 8, 2010 at 10:37 PM, <gso@physics.ucsd.edu> wrote:
I had to cut and paste some of the errors because I used 64 cores, but I think here's all of them:
/projects/lca-group/local-dev/lib/python2.6/site-packages/pytz/__init__.py:29: UserWarning: Module readline was already imported from /projects/lca-group/lo$ from pkg_resources import resource_stream Traceback (most recent call last): File "parallelHF.py", line 3, in <module> from yt.analysis_modules.halo_mass_function.api import * ImportError: No module named analysis_modules.halo_mass_function.api
this is with Mike's from yt.analysis_modules.halo_mass_function.api import * looks like it can't find the corresponding module.
Am I the only one seeing this on triton? Just curious, might be something wrong with my env variable etc?
From G.S.
Hi Mike and Geoffrey,
To help alleviate with this, I've added a new list (which is created at runtime, but can be re-created) called "available_analysis_modules" to yt.mods. So right now it looks like this:
from yt.mods import * available_analysis_modules
['coordinate_transformation', 'halo_finding', 'halo_mass_function', 'halo_merger_tree', 'halo_profiler', 'hierarchy_subset', 'level_sets', 'light_cone', 'light_ray', 'simulation_handler', 'spectral_integrator', 'star_analysis', 'two_point_functions']
So you can then import from any of the api's in those directories. This just uses a very simple guess at where the directory analysis_modules is located, and won't support things like extensions in external packages etc etc. But it should get us most of the way there...
-Matt
On Wed, Sep 8, 2010 at 7:06 PM, Michael Kuhlen <mqk@astro.berkeley.edu> wrote:
I ran into the same problem today. The following works for me:
from yt.mods import * from yt.analysis_modules.halo_mass_function.api import *
I figured this out by looking in $YTDIR/yt/analysis_modules/.
Mike
gso@physics.ucsd.edu wrote:
I'm getting this error on an old script I used to create the halo mass function on Triton
I had on top from yt.analysis_modules.halo_finding.api import HaloMassFcn
and got:
Traceback (most recent call last): File "parallelHF.py", line 52, in <module> hmf = HaloMassFcn(pf, halo_file=filename[3]+"ParallelHopAnalysis.out", NameError: name 'HaloMassFcn' is not defined
I was wondering if this is because yt was updated to 2.0 on triton? in the email there's an example of what to use for HaloFinder
from yt.analysis_modules.halo_finding.api import HaloFinder
so for HaloMassFcn do I do
from yt.analysis_modules.halo_????.api import HaloMassFcn
can someone fill in what ???? is, or how I can find that information? Or is the 2.0 manual out that I'm not aware of that has this information already?
From G.S.
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
-- ********************************************************************* * * * Dr. Michael Kuhlen Theoretical Astrophysics Center * * email: mqk@astro.berkeley.edu UC Berkeley * * cell phone: (831) 588-1468 601 Campbell Hall * * skype username: mikekuhlen Berkeley, CA 94720 * * * ********************************************************************* _______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
yup that worked, I guess my script was older than old heh, it had a diff syntax. thanks guys! From G.S.
Hi Geoffrey,
As I mentioned earlier, the version installed on Triton is from before the reorganization. Use the yt documentation to get the imports correctly, and debug the imports on a single core -- you can run the imports just interactively on the login node. You don't need the analysis_modules stuff. :)
This worked for me:
from yt.mods import * from yt.extensions.halo_mass_function import *
taken from here:
http://yt.enzotools.org/doc/howto/hmf_howto.html
-Matt
On Wed, Sep 8, 2010 at 10:37 PM, <gso@physics.ucsd.edu> wrote:
I had to cut and paste some of the errors because I used 64 cores, but I think here's all of them:
/projects/lca-group/local-dev/lib/python2.6/site-packages/pytz/__init__.py:29: UserWarning: Module readline was already imported from /projects/lca-group/lo$ from pkg_resources import resource_stream Traceback (most recent call last): File "parallelHF.py", line 3, in <module> from yt.analysis_modules.halo_mass_function.api import * ImportError: No module named analysis_modules.halo_mass_function.api
this is with Mike's from yt.analysis_modules.halo_mass_function.api import * looks like it can't find the corresponding module.
Am I the only one seeing this on triton? Just curious, might be something wrong with my env variable etc?
From G.S.
Hi Mike and Geoffrey,
To help alleviate with this, I've added a new list (which is created at runtime, but can be re-created) called "available_analysis_modules" to yt.mods. So right now it looks like this:
from yt.mods import * available_analysis_modules
['coordinate_transformation', 'halo_finding', 'halo_mass_function', 'halo_merger_tree', 'halo_profiler', 'hierarchy_subset', 'level_sets', 'light_cone', 'light_ray', 'simulation_handler', 'spectral_integrator', 'star_analysis', 'two_point_functions']
So you can then import from any of the api's in those directories. This just uses a very simple guess at where the directory analysis_modules is located, and won't support things like extensions in external packages etc etc. But it should get us most of the way there...
-Matt
On Wed, Sep 8, 2010 at 7:06 PM, Michael Kuhlen <mqk@astro.berkeley.edu> wrote:
I ran into the same problem today. The following works for me:
from yt.mods import * from yt.analysis_modules.halo_mass_function.api import *
I figured this out by looking in $YTDIR/yt/analysis_modules/.
Mike
gso@physics.ucsd.edu wrote:
I'm getting this error on an old script I used to create the halo mass function on Triton
I had on top from yt.analysis_modules.halo_finding.api import HaloMassFcn
and got:
Traceback (most recent call last): File "parallelHF.py", line 52, in <module> hmf = HaloMassFcn(pf, halo_file=filename[3]+"ParallelHopAnalysis.out", NameError: name 'HaloMassFcn' is not defined
I was wondering if this is because yt was updated to 2.0 on triton? in the email there's an example of what to use for HaloFinder
from yt.analysis_modules.halo_finding.api import HaloFinder
so for HaloMassFcn do I do
from yt.analysis_modules.halo_????.api import HaloMassFcn
can someone fill in what ???? is, or how I can find that information? Or is the 2.0 manual out that I'm not aware of that has this information already?
From G.S.
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
-- ********************************************************************* * * * Dr. Michael Kuhlen Theoretical Astrophysics Center * * email: mqk@astro.berkeley.edu UC Berkeley * * cell phone: (831) 588-1468 601 Campbell Hall * * skype username: mikekuhlen Berkeley, CA 94720 * * * ********************************************************************* _______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
participants (3)
-
gso@physics.ucsd.edu
-
Matthew Turk
-
Michael Kuhlen