[Yt-svn] yt-commit r1285 - in trunk/yt: . lagos raven
mturk at wrangler.dreamhost.com
mturk at wrangler.dreamhost.com
Wed Apr 29 14:14:44 PDT 2009
Author: mturk
Date: Wed Apr 29 14:14:43 2009
New Revision: 1285
URL: http://yt.spacepope.org/changeset/1285
Log:
* Disabled preloading of data for parallel projections. This 'feature' never
really worked for grid-level parallelism, and this should help with memory
problems.
* Added --show-grids option to "yt plot" command
* Made RadialMachNumber explicitly absolute value'd.
* Variable definition in the multi-axes grabber for no-colorbars.
* Got rid of a few unused variables in the Callbacks
* A set of comments in VTKInterface.py
Modified:
trunk/yt/commands.py
trunk/yt/lagos/BaseDataTypes.py
trunk/yt/lagos/UniversalFields.py
trunk/yt/raven/Callbacks.py
trunk/yt/raven/PlotCollection.py
trunk/yt/raven/VTKInterface.py
Modified: trunk/yt/commands.py
==============================================================================
--- trunk/yt/commands.py (original)
+++ trunk/yt/commands.py Wed Apr 29 14:14:43 2009
@@ -129,6 +129,10 @@
action="store_false",
dest="dm_only", default=True,
help="Use all particles"),
+ grids = dict(short="", long="--show-grids",
+ action="store_true",
+ dest="grids", default=False,
+ help="Show the grid boundaries"),
)
def _add_options(parser, *options):
@@ -241,7 +245,7 @@
@add_cmd_options(["width", "unit", "bn", "proj", "center",
"zlim", "axis", "field", "weight", "skip",
- "cmap", "output"])
+ "cmap", "output", "grids"])
@check_args
def do_plot(self, subcmd, opts, arg):
"""
@@ -266,6 +270,7 @@
if opts.projection: pc.add_projection(opts.field, ax,
weight_field=opts.weight, center=center)
else: pc.add_slice(opts.field, ax, center=center)
+ if opts.grids: pc.plots[-1].modify["grids"]()
pc.set_width(opts.width, opts.unit)
pc.set_cmap(opts.cmap)
if opts.zlim: pc.set_zlim(*opts.zlim)
Modified: trunk/yt/lagos/BaseDataTypes.py
==============================================================================
--- trunk/yt/lagos/BaseDataTypes.py (original)
+++ trunk/yt/lagos/BaseDataTypes.py Wed Apr 29 14:14:43 2009
@@ -1104,8 +1104,8 @@
# We do this here, but I am not convinced it should be done here
# It is probably faster, as it consolidates IO, but if we did it in
# _project_level, then it would be more memory conservative
- self._preload(self.source._grids, self._get_dependencies(fields),
- self.hierarchy.queue)
+ #self._preload(self.source._grids, self._get_dependencies(fields),
+ # self.hierarchy.queue)
for level in range(0, self._max_level+1):
my_coords, my_dx, my_fields = self.__project_level(level, fields)
coord_data.append(my_coords)
@@ -1962,12 +1962,6 @@
#raise ValueError
kwargs['num_ghost_zones'] = 0
AMRCoveringGridBase.__init__(self, *args, **kwargs)
- if na.any(self.left_edge == self.pf["DomainLeftEdge"]):
- self.left_edge += self.dds
- self.ActiveDimensions -= 1
- if na.any(self.right_edge == self.pf["DomainRightEdge"]):
- self.right_edge -= self.dds
- self.ActiveDimensions -= 1
def _get_list_of_grids(self):
if na.any(self.left_edge - self.dds < self.pf["DomainLeftEdge"]) or \
Modified: trunk/yt/lagos/UniversalFields.py
==============================================================================
--- trunk/yt/lagos/UniversalFields.py (original)
+++ trunk/yt/lagos/UniversalFields.py Wed Apr 29 14:14:43 2009
@@ -198,7 +198,7 @@
def _RadialMachNumber(field, data):
"""M{|v|/t_sound}"""
- return data["RadialVelocity"] / data["SoundSpeed"]
+ return na.abs(data["RadialVelocity"]) / data["SoundSpeed"]
add_field("RadialMachNumber", function=_RadialMachNumber)
def _MachNumber(field, data):
Modified: trunk/yt/raven/Callbacks.py
==============================================================================
--- trunk/yt/raven/Callbacks.py (original)
+++ trunk/yt/raven/Callbacks.py Wed Apr 29 14:14:43 2009
@@ -226,8 +226,6 @@
#Now makes a copy of the position fields "px" and "py" and adds the
#appropriate shift to the coppied field.
DomainWidth = plot.data.pf["DomainRightEdge"] - plot.data.pf["DomainLeftEdge"]
- px_index = lagos.x_dict[plot.data.axis]
- py_index = lagos.y_dict[plot.data.axis]
#set the cumulative arrays for the periodic shifting.
AllX = na.array([False]*plot.data["px"].size)
Modified: trunk/yt/raven/PlotCollection.py
==============================================================================
--- trunk/yt/raven/PlotCollection.py (original)
+++ trunk/yt/raven/PlotCollection.py Wed Apr 29 14:14:43 2009
@@ -498,6 +498,7 @@
"""
PlotTypes.Initialize()
hf, wf = 1.0/ny, 1.0/nx
+ fudge_x = fudge_y = 1.0
if colorbar.lower() == 'vertical':
fudge_x = nx/(0.25+nx)
fudge_y = 1.0
Modified: trunk/yt/raven/VTKInterface.py
==============================================================================
--- trunk/yt/raven/VTKInterface.py (original)
+++ trunk/yt/raven/VTKInterface.py Wed Apr 29 14:14:43 2009
@@ -320,6 +320,9 @@
return [0.5,0.5,0.5]
def _window_default(self):
+ # Should experiment with passing in a pipeline browser
+ # that has two root objects -- one for TVTKBases, i.e. the render
+ # window, and one that accepts our objects
return ivtk.IVTKWithCrustAndBrowser(size=(800,600), stereo=1)
def _camera_path_default(self):
More information about the yt-svn
mailing list