[yt-svn] commit/yt: 2 new changesets
Bitbucket
commits-noreply at bitbucket.org
Tue Feb 14 15:37:32 PST 2012
2 new commits in yt:
https://bitbucket.org/yt_analysis/yt/changeset/4790d2c390e0/
changeset: 4790d2c390e0
branch: yt
user: samskillman
date: 2012-02-15 00:36:32
summary: The communication system should be popped, not the .communicators list. This resets the topcomm communicator. Thanks to Nathan Goldbaum for exposing the bug!
affected #: 1 file
diff -r 782b3dd8bb92b1697124d6b05416b943679096a7 -r 4790d2c390e0f8e3f09be39a85cf40973b98c672 yt/utilities/parallel_tools/parallel_analysis_interface.py
--- a/yt/utilities/parallel_tools/parallel_analysis_interface.py
+++ b/yt/utilities/parallel_tools/parallel_analysis_interface.py
@@ -349,7 +349,7 @@
else:
yield obj
if parallel_capable:
- communication_system.communicators.pop()
+ communication_system.pop()
if storage is not None:
# Now we have to broadcast it
new_storage = my_communicator.par_combine_object(
https://bitbucket.org/yt_analysis/yt/changeset/f96f0096469a/
changeset: f96f0096469a
branch: yt
user: samskillman
date: 2012-02-15 00:37:06
summary: Merging
affected #: 2 files
diff -r 4790d2c390e0f8e3f09be39a85cf40973b98c672 -r f96f0096469af66d338293c221c74aba96eb721a yt/gui/reason/html/js/widget_plotwindow.js
--- a/yt/gui/reason/html/js/widget_plotwindow.js
+++ b/yt/gui/reason/html/js/widget_plotwindow.js
@@ -43,7 +43,78 @@
}
this.widget_keys = new Ext.KeyMap(document, [
- {key: 'z', fn: function(){control_panel.get("zoom10x").handler();}}
+ {key: 'z',
+ shift: false,
+ fn: function(){
+ control_panel.get("zoom10x").handler();
+ }
+ },
+ {key: 'Z',
+ shift: true,
+ fn: function(){
+ control_panel.get("zoom2x").handler();
+ }
+ },
+ {key: 'x',
+ shift: false,
+ fn: function(){
+ control_panel.get("zoomout10x").handler();
+ }
+ },
+ {key: 'X',
+ shift: true,
+ fn: function(){
+ control_panel.get("zoomout2x").handler();
+ }
+ },
+ {key: 'k',
+ shift: false,
+ fn: function(){
+ control_panel.get("singleuparrow").handler();
+ }
+ },
+ {key: 'j',
+ shift: false,
+ fn: function(){
+ control_panel.get("singledownarrow").handler();
+ }
+ },
+ {key: 'h',
+ shift: false,
+ fn: function(){
+ control_panel.get("singleleftarrow").handler();
+ }
+ },
+ {key: 'l',
+ shift: false,
+ fn: function(){
+ control_panel.get("singlerightarrow").handler();
+ }
+ },
+ {key: 'K',
+ shift: true,
+ fn: function(){
+ control_panel.get("doubleuparrow").handler();
+ }
+ },
+ {key: 'J',
+ shift: true,
+ fn: function(){
+ control_panel.get("doubledownarrow").handler();
+ }
+ },
+ {key: 'H',
+ shift: true,
+ fn: function(){
+ control_panel.get("doubleleftarrow").handler();
+ }
+ },
+ {key: 'L',
+ shift: true,
+ fn: function(){
+ control_panel.get("doublerightarrow").handler();
+ }
+ },
]);
var widget_keys = this.widget_keys;
widget_keys.disable();
@@ -159,6 +230,7 @@
/* the single buttons for 10% pan*/
xtype:'button',
iconCls: 'singleuparrow',
+ id: 'singleuparrow',
//text: 'North',
x: 40,
y: 10,
@@ -170,6 +242,7 @@
}, {
xtype:'button',
iconCls: 'singlerightarrow',
+ id: 'singlerightarrow',
//text:'East',
x : 60,
y : 30,
@@ -182,6 +255,7 @@
}, {
xtype:'button',
iconCls: 'singledownarrow',
+ id: 'singledownarrow',
//text: 'South',
x: 40,
y: 50,
@@ -194,6 +268,7 @@
}, {
xtype: 'button',
iconCls: 'singleleftarrow',
+ id: 'singleleftarrow',
//text: 'West',
x: 20,
y: 30,
@@ -208,6 +283,7 @@
{
xtype:'button',
iconCls: 'doubleuparrow',
+ id:'doubleuparrow',
//text: 'North',
x: 40,
y: 80,
@@ -219,6 +295,7 @@
}, {
xtype:'button',
iconCls: 'doublerightarrow',
+ id:'doublerightarrow',
//text:'East',
x : 60,
y : 100,
@@ -232,6 +309,7 @@
xtype:'button',
iconCls: 'doubledownarrow',
//text: 'South',
+ id: 'doubledownarrow',
x: 40,
y: 120,
handler: function(b,e) {
@@ -243,6 +321,7 @@
}, {
xtype: 'button',
iconCls: 'doubleleftarrow',
+ id: 'doubleleftarrow',
//text: 'West',
x: 20,
y: 100,
@@ -270,6 +349,7 @@
},{
xtype: 'button',
text: 'Zoom In 2x',
+ id: "zoom2x",
x: 10,
y: 185,
width: 80,
@@ -282,6 +362,7 @@
},{
xtype: 'button',
text: 'Zoom Out 2x',
+ id:'zoomout2x',
x: 10,
y: 210,
width: 80,
@@ -294,6 +375,7 @@
},{
xtype: 'button',
text: 'Zoom Out 10x',
+ id:'zoomout10x',
x: 10,
y: 235,
width: 80,
diff -r 4790d2c390e0f8e3f09be39a85cf40973b98c672 -r f96f0096469af66d338293c221c74aba96eb721a yt/visualization/plot_window.py
--- a/yt/visualization/plot_window.py
+++ b/yt/visualization/plot_window.py
@@ -36,6 +36,11 @@
from yt.funcs import *
from yt.utilities.amr_utils import write_png_to_string
+from yt.utilities.definitions import \
+ x_dict, x_names, \
+ y_dict, y_names, \
+ axis_names, \
+ axis_labels
def invalidate_data(f):
@wraps(f)
@@ -309,7 +314,11 @@
<br>
Field of View: %(x_width)0.3f %(unit)s<br>
Minimum Value: %(mi)0.3e %(units)s<br>
-Maximum Value: %(ma)0.3e %(units)s
+Maximum Value: %(ma)0.3e %(units)s<br>
+Central Point: (data coords)<br>
+ %(xc)0.14f<br>
+ %(yc)0.14f<br>
+ %(zc)0.14f
"""
class PWViewerExtJS(PWViewer):
@@ -402,11 +411,21 @@
y_width = self.ylim[1] - self.ylim[0]
unit = get_smallest_appropriate_unit(x_width, self._frb.pf)
units = self.get_field_units(field)
+ center = getattr(self._frb.data_source, "center", None)
+ if center is None or self._frb.axis == 4:
+ xc, yc, zc = -999, -999, -999
+ else:
+ center[x_dict[self._frb.axis]] = 0.5 * (
+ self.xlim[0] + self.xlim[1])
+ center[y_dict[self._frb.axis]] = 0.5 * (
+ self.ylim[0] + self.ylim[1])
+ xc, yc, zc = center
md = _metadata_template % dict(
pf = self._frb.pf,
x_width = x_width*self._frb.pf[unit],
y_width = y_width*self._frb.pf[unit],
- unit = unit, units = units, mi = mi, ma = ma)
+ unit = unit, units = units, mi = mi, ma = ma,
+ xc = xc, yc = yc, zc = zc)
return md
def image_recenter(self, img_x, img_y, img_size_x, img_size_y):
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