[Yt-svn] commit/yt: 2 new changesets

Bitbucket commits-noreply at bitbucket.org
Wed Apr 6 14:01:05 PDT 2011


2 new changesets in yt:

http://bitbucket.org/yt_analysis/yt/changeset/2696c1a9ff45/
changeset:   r4094:2696c1a9ff45
branch:      yt
user:        MatthewTurk
date:        2011-04-06 23:00:20
summary:     Adding a -f command to "yt serve" to find all the pfs in a current directory,
down to a depth of 2.
affected #:  1 file (329 bytes)

--- a/yt/utilities/command_line.py	Wed Apr 06 00:27:52 2011 -0400
+++ b/yt/utilities/command_line.py	Wed Apr 06 17:00:20 2011 -0400
@@ -914,6 +914,9 @@
     @cmdln.option("-p", "--port", action="store",
                   default = 0, dest='port',
                   help="Port to listen on")
+    @cmdln.option("-f", "--find", action="store_true",
+                  default = False, dest="find",
+                  help="At startup, find all *.hierarchy files in the CWD")
     def do_serve(self, subcmd, opts):
         """
         Run the Web GUI
@@ -947,8 +950,10 @@
         import yt.gui.reason.bottle as bottle
         from yt.gui.reason.extdirect_repl import ExtDirectREPL
         from yt.gui.reason.bottle_mods import uuid_serve_functions
-
         hr = ExtDirectREPL(base_extjs_path)
+        if opts.find:
+            # We just have to find them and store references to them.
+            hr.execute("pfs = list(all_pfs(max_depth=2))")
         bottle.debug()
         uuid_serve_functions(open_browser=opts.open_browser,
                     port=int(opts.port), repl=hr)


http://bitbucket.org/yt_analysis/yt/changeset/c729e75909d6/
changeset:   r4095:c729e75909d6
branch:      yt
user:        MatthewTurk
date:        2011-04-06 23:00:56
summary:     Merge
affected #:  1 file (14 bytes)

--- a/yt/utilities/amr_kdtree/amr_kdtree.py	Wed Apr 06 17:00:20 2011 -0400
+++ b/yt/utilities/amr_kdtree/amr_kdtree.py	Wed Apr 06 17:00:56 2011 -0400
@@ -573,8 +573,8 @@
         dds = thisnode.grid.dds
         gle = thisnode.grid.LeftEdge
         gre = thisnode.grid.RightEdge
-        thisnode.li = ((thisnode.l_corner-gle)/dds).astype('int32')
-        thisnode.ri = ((thisnode.r_corner-gle)/dds).astype('int32')
+        thisnode.li = na.rint((thisnode.l_corner-gle)/dds).astype('int32')
+        thisnode.ri = na.rint((thisnode.r_corner-gle)/dds).astype('int32')
         thisnode.dims = (thisnode.ri - thisnode.li).astype('int32')
         # Here the cost is actually inversely proportional to 4**Level (empirical)
         thisnode.cost = (na.prod(thisnode.dims)/4.**thisnode.grid.Level).astype('int64')

Repository URL: https://bitbucket.org/yt_analysis/yt/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.



More information about the yt-svn mailing list