[Yt-svn] commit/yt: MatthewTurk: Merging in JC's change

Bitbucket commits-noreply at bitbucket.org
Tue Jul 26 12:36:52 PDT 2011


1 new changeset in yt:

http://bitbucket.org/yt_analysis/yt/changeset/497f1161966d/
changeset:   497f1161966d
branch:      yt
user:        MatthewTurk
date:        2011-07-26 21:32:09
summary:     Merging in JC's change
affected #:  50 files (2.1 KB)

--- a/setup.py	Tue Jul 26 09:00:24 2011 +0200
+++ b/setup.py	Tue Jul 26 15:32:09 2011 -0400
@@ -95,7 +95,7 @@
                        quiet=True)
     
     config.make_config_py()
-    config.make_svn_version_py()
+    #config.make_svn_version_py()
     config.add_subpackage('yt','yt')
     config.add_scripts("scripts/*")
 


--- a/yt/analysis_modules/absorption_spectrum/absorption_spectrum.py	Tue Jul 26 09:00:24 2011 +0200
+++ b/yt/analysis_modules/absorption_spectrum/absorption_spectrum.py	Tue Jul 26 15:32:09 2011 -0400
@@ -144,8 +144,9 @@
             column_density = field_data[continuum['field_name']] * field_data['dl']
             delta_lambda = continuum['wavelength'] * field_data['redshift']
             if use_peculiar_velocity:
-                delta_lambda += continuum['wavelength'] * field_data['los_velocity'] / \
-                    speed_of_light_cgs
+                # include factor of (1 + z) because our velocity is in proper frame.
+                delta_lambda += continuum['wavelength'] * (1 + field_data['redshift']) * \
+                    field_data['los_velocity'] / speed_of_light_cgs
             this_wavelength = delta_lambda + continuum['wavelength']
             right_index = na.digitize(this_wavelength, self.lambda_bins).clip(0, self.n_lambda)
             left_index = na.digitize((this_wavelength * 
@@ -178,8 +179,9 @@
             column_density = field_data[line['field_name']] * field_data['dl']
             delta_lambda = line['wavelength'] * field_data['redshift']
             if use_peculiar_velocity:
-                delta_lambda += line['wavelength'] * field_data['los_velocity'] / \
-                    speed_of_light_cgs
+                # include factor of (1 + z) because our velocity is in proper frame.
+                delta_lambda += line['wavelength'] * (1 + field_data['redshift']) * \
+                    field_data['los_velocity'] / speed_of_light_cgs
             thermal_b = km_per_cm * na.sqrt((2 * boltzmann_constant_cgs * 
                                              field_data['Temperature']) / 
                                             (amu_cgs * line['atomic_mass']))


--- a/yt/analysis_modules/coordinate_transformation/setup.py	Tue Jul 26 09:00:24 2011 +0200
+++ b/yt/analysis_modules/coordinate_transformation/setup.py	Tue Jul 26 15:32:09 2011 -0400
@@ -8,5 +8,5 @@
     from numpy.distutils.misc_util import Configuration
     config = Configuration('coordinate_transformation',parent_package,top_path)
     config.make_config_py() # installs __config__.py
-    config.make_svn_version_py()
+    #config.make_svn_version_py()
     return config


--- a/yt/analysis_modules/halo_finding/fof/setup.py	Tue Jul 26 09:00:24 2011 +0200
+++ b/yt/analysis_modules/halo_finding/fof/setup.py	Tue Jul 26 15:32:09 2011 -0400
@@ -12,5 +12,5 @@
                                      "kd.c"],
                                     libraries=["m"])
     config.make_config_py() # installs __config__.py
-    config.make_svn_version_py()
+    #config.make_svn_version_py()
     return config


--- a/yt/analysis_modules/halo_finding/halo_objects.py	Tue Jul 26 09:00:24 2011 +0200
+++ b/yt/analysis_modules/halo_finding/halo_objects.py	Tue Jul 26 15:32:09 2011 -0400
@@ -228,7 +228,8 @@
         r"""Returns a sphere source.
 
         This will generate a new, empty sphere source centered on this halo,
-        with the maximum radius of the halo.
+        with the maximum radius of the halo. This can be used like any other
+        data container in yt.
         
         Parameters
         ----------
@@ -974,6 +975,34 @@
         """
         return self.max_radius
 
+    def get_sphere(self):
+        r"""Returns a sphere source.
+
+        This will generate a new, empty sphere source centered on this halo,
+        with the maximum radius of the halo. This can be used like any other
+        data container in yt.
+        
+        Parameters
+        ----------
+        center_of_mass : bool, optional
+            True chooses the center of mass when calculating the maximum radius.
+            False chooses from the maximum density location for HOP halos
+            (it has no effect for FOF halos).
+            Default = True.
+        
+        Returns
+        -------
+        sphere : `yt.data_objects.api.AMRSphereBase`
+            The empty data source.
+
+        Examples
+        --------
+        >>> sp = halos[0].get_sphere()
+        """
+        cen = self.center_of_mass()
+        r = self.maximum_radius()
+        return self.pf.h.sphere(cen, r)
+
 class HaloList(object):
 
     _fields = ["particle_position_%s" % ax for ax in 'xyz']
@@ -2216,4 +2245,4 @@
         LoadedHaloList.__init__(self, pf, self.basename)
 
 
-        
\ No newline at end of file
+        


--- a/yt/analysis_modules/halo_finding/hop/setup.py	Tue Jul 26 09:00:24 2011 +0200
+++ b/yt/analysis_modules/halo_finding/hop/setup.py	Tue Jul 26 15:32:09 2011 -0400
@@ -15,5 +15,5 @@
                                      "hop_slice.c",
                                      "hop_smooth.c",])
     config.make_config_py() # installs __config__.py
-    config.make_svn_version_py()
+    #config.make_svn_version_py()
     return config


--- a/yt/analysis_modules/halo_finding/parallel_hop/setup.py	Tue Jul 26 09:00:24 2011 +0200
+++ b/yt/analysis_modules/halo_finding/parallel_hop/setup.py	Tue Jul 26 15:32:09 2011 -0400
@@ -8,5 +8,5 @@
     from numpy.distutils.misc_util import Configuration
     config = Configuration('parallel_hop',parent_package,top_path)
     config.make_config_py() # installs __config__.py
-    config.make_svn_version_py()
+    #config.make_svn_version_py()
     return config


--- a/yt/analysis_modules/halo_finding/setup.py	Tue Jul 26 09:00:24 2011 +0200
+++ b/yt/analysis_modules/halo_finding/setup.py	Tue Jul 26 15:32:09 2011 -0400
@@ -11,5 +11,5 @@
     config.add_subpackage("hop")
     config.add_subpackage("parallel_hop")
     config.make_config_py() # installs __config__.py
-    config.make_svn_version_py()
+    #config.make_svn_version_py()
     return config


--- a/yt/analysis_modules/halo_mass_function/setup.py	Tue Jul 26 09:00:24 2011 +0200
+++ b/yt/analysis_modules/halo_mass_function/setup.py	Tue Jul 26 15:32:09 2011 -0400
@@ -8,5 +8,5 @@
     from numpy.distutils.misc_util import Configuration
     config = Configuration('halo_mass_function',parent_package,top_path)
     config.make_config_py() # installs __config__.py
-    config.make_svn_version_py()
+    #config.make_svn_version_py()
     return config


--- a/yt/analysis_modules/halo_merger_tree/setup.py	Tue Jul 26 09:00:24 2011 +0200
+++ b/yt/analysis_modules/halo_merger_tree/setup.py	Tue Jul 26 15:32:09 2011 -0400
@@ -8,5 +8,5 @@
     from numpy.distutils.misc_util import Configuration
     config = Configuration('halo_merger_tree',parent_package,top_path)
     config.make_config_py() # installs __config__.py
-    config.make_svn_version_py()
+    #config.make_svn_version_py()
     return config


--- a/yt/analysis_modules/halo_profiler/setup.py	Tue Jul 26 09:00:24 2011 +0200
+++ b/yt/analysis_modules/halo_profiler/setup.py	Tue Jul 26 15:32:09 2011 -0400
@@ -8,5 +8,5 @@
     from numpy.distutils.misc_util import Configuration
     config = Configuration('halo_profiler',parent_package,top_path)
     config.make_config_py() # installs __config__.py
-    config.make_svn_version_py()
+    #config.make_svn_version_py()
     return config


--- a/yt/analysis_modules/hierarchy_subset/setup.py	Tue Jul 26 09:00:24 2011 +0200
+++ b/yt/analysis_modules/hierarchy_subset/setup.py	Tue Jul 26 15:32:09 2011 -0400
@@ -8,5 +8,5 @@
     from numpy.distutils.misc_util import Configuration
     config = Configuration('hierarchy_subset',parent_package,top_path)
     config.make_config_py() # installs __config__.py
-    config.make_svn_version_py()
+    #config.make_svn_version_py()
     return config


--- a/yt/analysis_modules/level_sets/setup.py	Tue Jul 26 09:00:24 2011 +0200
+++ b/yt/analysis_modules/level_sets/setup.py	Tue Jul 26 15:32:09 2011 -0400
@@ -8,5 +8,5 @@
     from numpy.distutils.misc_util import Configuration
     config = Configuration('level_sets',parent_package,top_path)
     config.make_config_py() # installs __config__.py
-    config.make_svn_version_py()
+    #config.make_svn_version_py()
     return config


--- a/yt/analysis_modules/light_cone/setup.py	Tue Jul 26 09:00:24 2011 +0200
+++ b/yt/analysis_modules/light_cone/setup.py	Tue Jul 26 15:32:09 2011 -0400
@@ -8,5 +8,5 @@
     from numpy.distutils.misc_util import Configuration
     config = Configuration('light_cone',parent_package,top_path)
     config.make_config_py() # installs __config__.py
-    config.make_svn_version_py()
+    #config.make_svn_version_py()
     return config


--- a/yt/analysis_modules/light_ray/setup.py	Tue Jul 26 09:00:24 2011 +0200
+++ b/yt/analysis_modules/light_ray/setup.py	Tue Jul 26 15:32:09 2011 -0400
@@ -8,5 +8,5 @@
     from numpy.distutils.misc_util import Configuration
     config = Configuration('light_ray',parent_package,top_path)
     config.make_config_py() # installs __config__.py
-    config.make_svn_version_py()
+    #config.make_svn_version_py()
     return config


--- a/yt/analysis_modules/setup.py	Tue Jul 26 09:00:24 2011 +0200
+++ b/yt/analysis_modules/setup.py	Tue Jul 26 15:32:09 2011 -0400
@@ -5,7 +5,7 @@
     from numpy.distutils.misc_util import Configuration
     config = Configuration('analysis_modules',parent_package,top_path)
     config.make_config_py() # installs __config__.py
-    config.make_svn_version_py()
+    #config.make_svn_version_py()
     config.add_subpackage("absorption_spectrum")
     config.add_subpackage("coordinate_transformation")
     config.add_subpackage("halo_finding")


--- a/yt/analysis_modules/simulation_handler/setup.py	Tue Jul 26 09:00:24 2011 +0200
+++ b/yt/analysis_modules/simulation_handler/setup.py	Tue Jul 26 15:32:09 2011 -0400
@@ -8,5 +8,5 @@
     from numpy.distutils.misc_util import Configuration
     config = Configuration('simulation_handler',parent_package,top_path)
     config.make_config_py() # installs __config__.py
-    config.make_svn_version_py()
+    #config.make_svn_version_py()
     return config


--- a/yt/analysis_modules/spectral_integrator/setup.py	Tue Jul 26 09:00:24 2011 +0200
+++ b/yt/analysis_modules/spectral_integrator/setup.py	Tue Jul 26 15:32:09 2011 -0400
@@ -8,5 +8,5 @@
     from numpy.distutils.misc_util import Configuration
     config = Configuration('spectral_integrator',parent_package,top_path)
     config.make_config_py() # installs __config__.py
-    config.make_svn_version_py()
+    #config.make_svn_version_py()
     return config


--- a/yt/analysis_modules/star_analysis/setup.py	Tue Jul 26 09:00:24 2011 +0200
+++ b/yt/analysis_modules/star_analysis/setup.py	Tue Jul 26 15:32:09 2011 -0400
@@ -8,5 +8,5 @@
     from numpy.distutils.misc_util import Configuration
     config = Configuration('star_analysis',parent_package,top_path)
     config.make_config_py() # installs __config__.py
-    config.make_svn_version_py()
+    #config.make_svn_version_py()
     return config


--- a/yt/analysis_modules/two_point_functions/setup.py	Tue Jul 26 09:00:24 2011 +0200
+++ b/yt/analysis_modules/two_point_functions/setup.py	Tue Jul 26 15:32:09 2011 -0400
@@ -8,5 +8,5 @@
     from numpy.distutils.misc_util import Configuration
     config = Configuration('two_point_functions',parent_package,top_path)
     config.make_config_py() # installs __config__.py
-    config.make_svn_version_py()
+    #config.make_svn_version_py()
     return config


--- a/yt/astro_objects/setup.py	Tue Jul 26 09:00:24 2011 +0200
+++ b/yt/astro_objects/setup.py	Tue Jul 26 15:32:09 2011 -0400
@@ -8,5 +8,5 @@
     from numpy.distutils.misc_util import Configuration
     config = Configuration('astro_objects',parent_package,top_path)
     config.make_config_py() # installs __config__.py
-    config.make_svn_version_py()
+    #config.make_svn_version_py()
     return config


--- a/yt/data_objects/field_info_container.py	Tue Jul 26 09:00:24 2011 +0200
+++ b/yt/data_objects/field_info_container.py	Tue Jul 26 15:32:09 2011 -0400
@@ -158,6 +158,7 @@
                 pf.hubble_constant = pf.cosmological_simulation = 0.0
             pf.domain_left_edge = na.zeros(3, 'float64')
             pf.domain_right_edge = na.ones(3, 'float64')
+            pf.dimensionality = 3
         self.pf = pf
         class fake_hierarchy(object):
             class fake_io(object):


--- a/yt/data_objects/setup.py	Tue Jul 26 09:00:24 2011 +0200
+++ b/yt/data_objects/setup.py	Tue Jul 26 15:32:09 2011 -0400
@@ -8,5 +8,5 @@
     from numpy.distutils.misc_util import Configuration
     config = Configuration('data_objects',parent_package,top_path)
     config.make_config_py() # installs __config__.py
-    config.make_svn_version_py()
+    #config.make_svn_version_py()
     return config


--- a/yt/frontends/art/setup.py	Tue Jul 26 09:00:24 2011 +0200
+++ b/yt/frontends/art/setup.py	Tue Jul 26 15:32:09 2011 -0400
@@ -6,5 +6,5 @@
     from numpy.distutils.misc_util import Configuration
     config = Configuration('art',parent_package,top_path)
     config.make_config_py() # installs __config__.py
-    config.make_svn_version_py()
+    #config.make_svn_version_py()
     return config


--- a/yt/frontends/castro/setup.py	Tue Jul 26 09:00:24 2011 +0200
+++ b/yt/frontends/castro/setup.py	Tue Jul 26 15:32:09 2011 -0400
@@ -8,5 +8,5 @@
     from numpy.distutils.misc_util import Configuration
     config = Configuration('castro', parent_package, top_path)
     config.make_config_py() # installs __config__.py
-    config.make_svn_version_py()
+    #config.make_svn_version_py()
     return config


--- a/yt/frontends/chombo/setup.py	Tue Jul 26 09:00:24 2011 +0200
+++ b/yt/frontends/chombo/setup.py	Tue Jul 26 15:32:09 2011 -0400
@@ -8,5 +8,5 @@
     from numpy.distutils.misc_util import Configuration
     config = Configuration('chombo',parent_package,top_path)
     config.make_config_py() # installs __config__.py
-    config.make_svn_version_py()
+    #config.make_svn_version_py()
     return config


--- a/yt/frontends/enzo/setup.py	Tue Jul 26 09:00:24 2011 +0200
+++ b/yt/frontends/enzo/setup.py	Tue Jul 26 15:32:09 2011 -0400
@@ -8,5 +8,5 @@
     from numpy.distutils.misc_util import Configuration
     config = Configuration('enzo',parent_package,top_path)
     config.make_config_py() # installs __config__.py
-    config.make_svn_version_py()
+    #config.make_svn_version_py()
     return config


--- a/yt/frontends/flash/setup.py	Tue Jul 26 09:00:24 2011 +0200
+++ b/yt/frontends/flash/setup.py	Tue Jul 26 15:32:09 2011 -0400
@@ -8,5 +8,5 @@
     from numpy.distutils.misc_util import Configuration
     config = Configuration('flash',parent_package,top_path)
     config.make_config_py() # installs __config__.py
-    config.make_svn_version_py()
+    #config.make_svn_version_py()
     return config


--- a/yt/frontends/gadget/setup.py	Tue Jul 26 09:00:24 2011 +0200
+++ b/yt/frontends/gadget/setup.py	Tue Jul 26 15:32:09 2011 -0400
@@ -8,5 +8,5 @@
     from numpy.distutils.misc_util import Configuration
     config = Configuration('gadget',parent_package,top_path)
     config.make_config_py() # installs __config__.py
-    config.make_svn_version_py()
+    #config.make_svn_version_py()
     return config


--- a/yt/frontends/gdf/setup.py	Tue Jul 26 09:00:24 2011 +0200
+++ b/yt/frontends/gdf/setup.py	Tue Jul 26 15:32:09 2011 -0400
@@ -8,5 +8,5 @@
     from numpy.distutils.misc_util import Configuration
     config = Configuration('gdf',parent_package,top_path)
     config.make_config_py() # installs __config__.py
-    config.make_svn_version_py()
+    #config.make_svn_version_py()
     return config


--- a/yt/frontends/maestro/setup.py	Tue Jul 26 09:00:24 2011 +0200
+++ b/yt/frontends/maestro/setup.py	Tue Jul 26 15:32:09 2011 -0400
@@ -8,5 +8,5 @@
     from numpy.distutils.misc_util import Configuration
     config = Configuration('maestro',parent_package,top_path)
     config.make_config_py() # installs __config__.py
-    config.make_svn_version_py()
+    #config.make_svn_version_py()
     return config


--- a/yt/frontends/orion/setup.py	Tue Jul 26 09:00:24 2011 +0200
+++ b/yt/frontends/orion/setup.py	Tue Jul 26 15:32:09 2011 -0400
@@ -8,5 +8,5 @@
     from numpy.distutils.misc_util import Configuration
     config = Configuration('orion',parent_package,top_path)
     config.make_config_py() # installs __config__.py
-    config.make_svn_version_py()
+    #config.make_svn_version_py()
     return config


--- a/yt/frontends/ramses/setup.py	Tue Jul 26 09:00:24 2011 +0200
+++ b/yt/frontends/ramses/setup.py	Tue Jul 26 15:32:09 2011 -0400
@@ -13,5 +13,5 @@
         depends=glob.glob("yt/frontends/ramses/ramses_headers/*.hh")
         )
     config.make_config_py() # installs __config__.py
-    config.make_svn_version_py()
+    #config.make_svn_version_py()
     return config


--- a/yt/frontends/setup.py	Tue Jul 26 09:00:24 2011 +0200
+++ b/yt/frontends/setup.py	Tue Jul 26 15:32:09 2011 -0400
@@ -5,7 +5,7 @@
     from numpy.distutils.misc_util import Configuration
     config = Configuration('frontends',parent_package,top_path)
     config.make_config_py() # installs __config__.py
-    config.make_svn_version_py()
+    #config.make_svn_version_py()
     config.add_subpackage("chombo")
     config.add_subpackage("enzo")
     config.add_subpackage("flash")


--- a/yt/frontends/stream/setup.py	Tue Jul 26 09:00:24 2011 +0200
+++ b/yt/frontends/stream/setup.py	Tue Jul 26 15:32:09 2011 -0400
@@ -8,5 +8,5 @@
     from numpy.distutils.misc_util import Configuration
     config = Configuration('stream',parent_package,top_path)
     config.make_config_py() # installs __config__.py
-    config.make_svn_version_py()
+    #config.make_svn_version_py()
     return config


--- a/yt/frontends/tiger/setup.py	Tue Jul 26 09:00:24 2011 +0200
+++ b/yt/frontends/tiger/setup.py	Tue Jul 26 15:32:09 2011 -0400
@@ -8,5 +8,5 @@
     from numpy.distutils.misc_util import Configuration
     config = Configuration('tiger',parent_package,top_path)
     config.make_config_py() # installs __config__.py
-    config.make_svn_version_py()
+    #config.make_svn_version_py()
     return config


--- a/yt/gui/opengl_widgets/setup.py	Tue Jul 26 09:00:24 2011 +0200
+++ b/yt/gui/opengl_widgets/setup.py	Tue Jul 26 15:32:09 2011 -0400
@@ -8,5 +8,5 @@
     from numpy.distutils.misc_util import Configuration
     config = Configuration('opengl_widgets',parent_package,top_path)
     config.make_config_py() # installs __config__.py
-    config.make_svn_version_py()
+    #config.make_svn_version_py()
     return config


--- a/yt/gui/reason/html/index.html	Tue Jul 26 09:00:24 2011 +0200
+++ b/yt/gui/reason/html/index.html	Tue Jul 26 15:32:09 2011 -0400
@@ -3,7 +3,7 @@
   <title>Reason YT GUI</title><link rel="stylesheet" type="text/css" href="resources/resources/css/ext-all.css" /><link rel="stylesheet" type="text/css" href="highlighter.css" />
-    <!--<link rel="stylesheet" type="text/css" href="theme/css/xtheme-slate.css" />-->
+    <link rel="stylesheet" type="text/css" href="theme/css/xtheme-slate.css" /><style type="text/css">
     html, body {


--- a/yt/gui/reason/html/js/functions.js	Tue Jul 26 09:00:24 2011 +0200
+++ b/yt/gui/reason/html/js/functions.js	Tue Jul 26 15:32:09 2011 -0400
@@ -30,15 +30,15 @@
 ***********************************************************************/
 
 function enable_input() {
-    /*repl_input.body.removeClass("cell_waiting");*/
-    repl_input.getComponent('input_line').setReadOnly(false);
-    repl_input.getComponent("input_line").focus();
-    /*yt_rpc.ExtDirectParameterFileList.get_list_of_pfs({}, fill_tree);*/
+    repl_input.body.removeClass("cell_waiting");
+    repl_input.get('input_line').setReadOnly(false);
+    repl_input.get("input_line").focus();
+    yt_rpc.ExtDirectParameterFileList.get_list_of_pfs({}, fill_tree);
 }
 
 function disable_input() {
-    repl_input.getComponent('input_line').setReadOnly(true);
-    /*repl_input.body.addClass("cell_waiting");*/
+    repl_input.get('input_line').setReadOnly(true);
+    repl_input.body.addClass("cell_waiting");
 }
 
 function cell_finished(result) {
@@ -62,7 +62,7 @@
                 /* Assume only one locking level */
                 repl_input.locked = false;
             } else {
-                repl_input.getComponent("input_line").setValue("");
+                repl_input.get("input_line").setValue("");
             }
             if (OutputContainer.items.length > 1) {
                 examine = cell;
@@ -84,11 +84,13 @@
 	        OutputContainer.doLayout();
 	        number_images++;
         } else if (payload['type'] == 'cell_contents') {
-	        var input_line = repl_input.getComponent("input_line");
+	        var input_line = repl_input.get("input_line");
 	        input_line.setValue(payload['value']);
             repl_input.locked = true;
         } else if (payload['type'] == 'log_entry') {
-	        logging_store.add({record: payload['log_entry'] });
+	        var record = new logging_store.recordType(
+		        {record: payload['log_entry'] });
+	        logging_store.add(record, number_log_records++);
             new_log = true;
         } else if (payload['type'] == 'widget') {
             var widget_type = payload['widget_type'];
@@ -109,7 +111,7 @@
         }
     });
     if (new_log == true){
-        viewport.getComponent("status-region").getView().focusRow(number_log_records-1);
+        viewport.get("status-region").getView().focusRow(number_log_records-1);
     }
     if (cell_resulted == true) {
         enable_input();
@@ -117,7 +119,7 @@
 }
 
 function display_image(image_id) {
-    var image = Ext.getComponent(image_id);
+    var image = Ext.get(image_id);
     var src = image.dom.src;
     var virtualdom = '<html><title>Image Viewer</title><body><img src="' 
         + src + '"/></body></html>',
@@ -303,13 +305,13 @@
                 allowBlank:false,
                 handler: function(checkbox, checked) {
                     if (checked == true) {
-                        this.ownerCt.getComponent("slice_x_center").disable();
-                        this.ownerCt.getComponent("slice_y_center").disable();
-                        this.ownerCt.getComponent("slice_z_center").disable();
+                        this.ownerCt.get("slice_x_center").disable();
+                        this.ownerCt.get("slice_y_center").disable();
+                        this.ownerCt.get("slice_z_center").disable();
                     } else {
-                        this.ownerCt.getComponent("slice_x_center").enable();
-                        this.ownerCt.getComponent("slice_y_center").enable();
-                        this.ownerCt.getComponent("slice_z_center").enable();
+                        this.ownerCt.get("slice_x_center").enable();
+                        this.ownerCt.get("slice_y_center").enable();
+                        this.ownerCt.get("slice_z_center").enable();
                     }
                 }
             },{
@@ -326,12 +328,12 @@
                 {
                     text: 'Slice',
                     handler: function(b, e){
-                        var center = [Ext.getComponent("slice_x_center").getValue(),
-                                      Ext.getComponent("slice_y_center").getValue(),
-                                      Ext.getComponent("slice_z_center").getValue()];
-                        var axis = Ext.getComponent("slice_axis").getValue();
-                        var field = Ext.getComponent("slice_field").getValue();
-                        var onmax = Ext.getComponent("max_dens").getValue();
+                        var center = [Ext.get("slice_x_center").getValue(),
+                                      Ext.get("slice_y_center").getValue(),
+                                      Ext.get("slice_z_center").getValue()];
+                        var axis = Ext.get("slice_axis").getValue();
+                        var field = Ext.get("slice_field").getValue();
+                        var onmax = Ext.get("max_dens").getValue();
                         yt_rpc.ExtDirectREPL.create_slice({
                             pfname:node.attributes.objdata.varname,
                             center: center, axis:axis, field:field, onmax:onmax},
@@ -416,10 +418,10 @@
                 {
                     text: 'Calculate',
                     handler: function(b, e){
-                        var x_field = Ext.getComponent("x_field").getValue();
-                        var y_field = Ext.getComponent("y_field").getValue();
-                        var z_field = Ext.getComponent("z_field").getValue();
-                        var weight = Ext.getComponent("weight").getValue();
+                        var x_field = Ext.get("x_field").getValue();
+                        var y_field = Ext.get("y_field").getValue();
+                        var z_field = Ext.get("z_field").getValue();
+                        var weight = Ext.get("weight").getValue();
                         yt_rpc.ExtDirectREPL.create_phase({
                                 objname: node.attributes.objdata.varname,
                                 /* Mirror image varnames ... */
@@ -498,10 +500,10 @@
                 {
                     text: 'Project',
                     handler: function(b, e){
-                        var axis = Ext.getComponent("axis").getValue();
-                        var field = Ext.getComponent("field").getValue();
-                        var weight = Ext.getComponent("weightField").getValue();
-                        var onmax = Ext.getComponent("max_dens").getValue();
+                        var axis = Ext.get("axis").getValue();
+                        var field = Ext.get("field").getValue();
+                        var weight = Ext.get("weightField").getValue();
+                        var onmax = Ext.get("max_dens").getValue();
                         yt_rpc.ExtDirectREPL.create_proj({
                                 pfname: node.attributes.objdata.varname,
                                 axis: axis, field: field, weight: weight,


--- a/yt/gui/reason/html/js/reason.js	Tue Jul 26 09:00:24 2011 +0200
+++ b/yt/gui/reason/html/js/reason.js	Tue Jul 26 15:32:09 2011 -0400
@@ -54,10 +54,10 @@
     cell_finished(pp);
 }
 
-var repl_input = new Ext.form.Panel({
+var repl_input = new Ext.FormPanel({
     title: 'YT Input',
     url: 'push',
-    flex: 1.0,
+    flex: 0.2,
     layout: 'fit',
     padding: 5,
     height: '100%',
@@ -75,7 +75,7 @@
                 if (e.getKey() == e.ENTER) {
                     disable_input();
                     yt_rpc.ExtDirectREPL.execute({
-                        code:repl_input.getComponent('input_line').getValue()},
+                        code:repl_input.get('input_line').getValue()},
                     handle_result);
                 }
             },
@@ -93,7 +93,7 @@
 
                         var varname = data.node.attributes.objdata.varname;
                         /* There is possibly a better way to do this, where it's also inserted correctly. */
-                        var line = repl_input.getComponent("input_line");
+                        var line = repl_input.get("input_line");
                         line.setValue(line.getValue() + varname);
                         line.focus();
                         return(true);
@@ -135,14 +135,14 @@
     title: 'YT Output',
     id: 'output_container',
     autoScroll: true,
-    flex: 4.0,
+    flex: 0.8,
     items: []
 });
 
 var examine;
 var notebook;
 
-/*var treePanel = new Ext.tree.TreePanel({
+var treePanel = new Ext.tree.TreePanel({
     iconCls: 'nav',
     id: 'tree-panel',
     layout: 'anchor',
@@ -212,22 +212,12 @@
             }
         }
     }
-});*/
+});
 
 var status_panel;
-
-Ext.define("log", {extend: "Ext.data.Model", fields: ['record']});
-
 var logging_store = new Ext.data.Store({
-    model: 'log',
-    data: [],
-    proxy: {
-        type: 'memory',
-        reader: {
-            type: 'json',
-            root: 'users'
-        }
-    }
+    fields: [{name:'record'}],
+    reader: new Ext.data.ArrayReader({}, [{name: 'record'}]),
 });
 
 var heartbeat_request = false;
@@ -246,7 +236,7 @@
     Ext.state.Manager.setProvider(new Ext.state.CookieProvider());
 
     // Go ahead and create the TreePanel now so that we can use it below
-    viewport = new Ext.container.Viewport({
+    viewport = new Ext.Viewport({
         layout: 'border',
         items: [
 		// lazily created panel (xtype:'panel' is default)
@@ -254,12 +244,9 @@
                 xtype: 'grid',
                 store: logging_store,
                 defaults: { width: 800 },
-                columns: [ {
-                     header: 'Log Message',
-                     dataIndex: 'record',
-                     flex:1.0,
-                     sortable: false,
-                     width:800} ],
+                columns: [ {id:'record', 
+                    sortable: false,
+                    width:800} ],
                 autofill: true,
                 region: 'south',
                 id: "status-region",
@@ -287,6 +274,7 @@
                         xtype: 'toolbar',
                         items: [ main_menu ],
                     },
+                    treePanel,
                 ]
 		  // in this instance the TabPanel is not wrapped by another panel
 		  // since no title is needed, this Panel is added directly
@@ -300,11 +288,8 @@
                 items: [{
                         title: 'YT',
                         id: 'notebook',
-                        layout: {
-                                  type:'vbox',
-                                  align:'stretch',
-                                  pack:'start'
-                                },
+                        layout: 'vbox',
+                        layoutConfig: {align:'stretch'},
                         closable: false,
                         autoScroll: false,
                         iconCls: 'console',
@@ -327,20 +312,28 @@
         w.collapsed ? w.expand() : w.collapse();
     });
     
-    notebook = viewport.getComponent("center-panel").getComponent("notebook");
-    status_panel = viewport.getComponent("status-region").getComponent("status-div");
-    logging_store.add({record: 'Welcome to yt.'});
-    logging_store.add({record: 'After entering a line of code in the YT' +
-                      'Input field, press shift-enter to evaluate.' });
-    logging_store.add({record: '4d3d3d3 engaged.' });
+    notebook = viewport.get("center-panel").get("notebook");
+    status_panel = viewport.get("status-region").get("status-div");
+    
+    var record = new logging_store.recordType(
+        {record: 'Welcome to yt.'});
+    logging_store.add(record, number_log_records++);
+
+    var record = new logging_store.recordType(
+        {record: 'After entering a line of code in the YT Input field, press shift-enter to evaluate.' });
+    logging_store.add(record, number_log_records++);
+
+    var record = new logging_store.recordType(
+        {record: '4d3d3d3 engaged.' });
+    logging_store.add(record, number_log_records++);
 
     if (!Ext.state.Manager.get("reason_welcomed", false)) {
         Ext.MessageBox.alert("Reason v0.5",
         "Welcome to Reason.  <br>Treat the 'YT Input' field as a YT/python intepreter.<br>Press shift-enter to evaluate.",
-        function(b,e){ repl_input.getComponent("input_line").focus(); });
+        function(b,e){ repl_input.get("input_line").focus(); });
         Ext.state.Manager.set("reason_welcomed", true);
     } else { 
-        repl_input.getComponent("input_line").focus();
+        repl_input.get("input_line").focus();
     }
 
     /* Set up the heartbeat */


--- a/yt/gui/reason/setup.py	Tue Jul 26 09:00:24 2011 +0200
+++ b/yt/gui/reason/setup.py	Tue Jul 26 15:32:09 2011 -0400
@@ -6,5 +6,5 @@
     from numpy.distutils.misc_util import Configuration
     config = Configuration('reason',parent_package,top_path)
     config.make_config_py() # installs __config__.py
-    config.make_svn_version_py()
+    #config.make_svn_version_py()
     return config


--- a/yt/gui/setup.py	Tue Jul 26 09:00:24 2011 +0200
+++ b/yt/gui/setup.py	Tue Jul 26 15:32:09 2011 -0400
@@ -9,5 +9,5 @@
     config.add_subpackage('traited_explorer')
     config.add_subpackage('reason')
     config.make_config_py() # installs __config__.py
-    config.make_svn_version_py()
+    #config.make_svn_version_py()
     return config


--- a/yt/gui/traited_explorer/setup.py	Tue Jul 26 09:00:24 2011 +0200
+++ b/yt/gui/traited_explorer/setup.py	Tue Jul 26 15:32:09 2011 -0400
@@ -6,5 +6,5 @@
     from numpy.distutils.misc_util import Configuration
     config = Configuration('traited_explorer',parent_package,top_path)
     config.make_config_py() # installs __config__.py
-    config.make_svn_version_py()
+    #config.make_svn_version_py()
     return config


--- a/yt/setup.py	Tue Jul 26 09:00:24 2011 +0200
+++ b/yt/setup.py	Tue Jul 26 15:32:09 2011 -0400
@@ -13,5 +13,5 @@
     config.add_subpackage('utilities')
     config.add_subpackage('visualization')
     config.make_config_py()
-    config.make_svn_version_py()
+    #config.make_svn_version_py()
     return config


--- a/yt/utilities/answer_testing/setup.py	Tue Jul 26 09:00:24 2011 +0200
+++ b/yt/utilities/answer_testing/setup.py	Tue Jul 26 15:32:09 2011 -0400
@@ -8,5 +8,5 @@
     from numpy.distutils.misc_util import Configuration
     config = Configuration('answer_testing',parent_package,top_path)
     config.make_config_py() # installs __config__.py
-    config.make_svn_version_py()
+    #config.make_svn_version_py()
     return config


--- a/yt/utilities/setup.py	Tue Jul 26 09:00:24 2011 +0200
+++ b/yt/utilities/setup.py	Tue Jul 26 15:32:09 2011 -0400
@@ -184,5 +184,5 @@
         define_macros = [("HAVE_XLOCALE_H", True)]
         )
     config.make_config_py() # installs __config__.py
-    config.make_svn_version_py()
+    #config.make_svn_version_py()
     return config


--- a/yt/visualization/image_panner/setup.py	Tue Jul 26 09:00:24 2011 +0200
+++ b/yt/visualization/image_panner/setup.py	Tue Jul 26 15:32:09 2011 -0400
@@ -8,5 +8,5 @@
     from numpy.distutils.misc_util import Configuration
     config = Configuration('image_panner',parent_package,top_path)
     config.make_config_py() # installs __config__.py
-    config.make_svn_version_py()
+    #config.make_svn_version_py()
     return config


--- a/yt/visualization/plot_modifications.py	Tue Jul 26 09:00:24 2011 +0200
+++ b/yt/visualization/plot_modifications.py	Tue Jul 26 15:32:09 2011 -0400
@@ -60,13 +60,17 @@
 
 class VelocityCallback(PlotCallback):
     _type_name = "velocity"
-    def __init__(self, factor=16):
+    def __init__(self, factor=16, scale=None, scale_units=None):
         """
         Adds a 'quiver' plot of velocity to the plot, skipping all but
         every *factor* datapoint
+        *scale* is the data units per arrow length unit using *scale_units* 
+        (see matplotlib.axes.Axes.quiver for more info)
         """
         PlotCallback.__init__(self)
         self.factor = factor
+        self.scale  = scale
+        self.scale_units = scale_units
 
     def __call__(self, plot):
         # Instantiation of these is cheap
@@ -77,7 +81,7 @@
         else:
             xv = "%s-velocity" % (x_names[plot.data.axis])
             yv = "%s-velocity" % (y_names[plot.data.axis])
-            qcb = QuiverCallback(xv, yv, self.factor)
+            qcb = QuiverCallback(xv, yv, self.factor, self.scale, self.scale_units)
         return qcb(plot)
 
 class MagFieldCallback(PlotCallback):
@@ -102,16 +106,20 @@
 
 class QuiverCallback(PlotCallback):
     _type_name = "quiver"
-    def __init__(self, field_x, field_y, factor):
+    def __init__(self, field_x, field_y, factor, scale, scale_units):
         """
         Adds a 'quiver' plot to any plot, using the *field_x* and *field_y*
-        from the associated data, skipping every *factor* datapoints.
+        from the associated data, skipping every *factor* datapoints
+        *scale* is the data units per arrow length unit using *scale_units* 
+        (see matplotlib.axes.Axes.quiver for more info)
         """
         PlotCallback.__init__(self)
         self.field_x = field_x
         self.field_y = field_y
         self.bv_x = self.bv_y = 0
         self.factor = factor
+        self.scale = scale
+        self.scale_units = scale_units
 
     def __call__(self, plot):
         x0, x1 = plot.xlim
@@ -137,7 +145,7 @@
                            (x0, x1, y0, y1),).transpose()
         X = na.mgrid[0:plot.image._A.shape[0]-1:nx*1j]# + 0.5*factor
         Y = na.mgrid[0:plot.image._A.shape[1]-1:ny*1j]# + 0.5*factor
-        plot._axes.quiver(X,Y, pixX, pixY)
+        plot._axes.quiver(X,Y, pixX, pixY, scale=self.scale, scale_units=self.scale_units)
         plot._axes.set_xlim(xx0,xx1)
         plot._axes.set_ylim(yy0,yy1)
         plot._axes.hold(False)


--- a/yt/visualization/setup.py	Tue Jul 26 09:00:24 2011 +0200
+++ b/yt/visualization/setup.py	Tue Jul 26 15:32:09 2011 -0400
@@ -7,6 +7,6 @@
     config.add_subpackage("image_panner")
     config.add_subpackage("volume_rendering")
     config.make_config_py() # installs __config__.py
-    config.make_svn_version_py()
+    #config.make_svn_version_py()
     config.add_extension("_MPL", "_MPL.c", libraries=["m"])
     return config


--- a/yt/visualization/volume_rendering/setup.py	Tue Jul 26 09:00:24 2011 +0200
+++ b/yt/visualization/volume_rendering/setup.py	Tue Jul 26 15:32:09 2011 -0400
@@ -10,5 +10,5 @@
     from numpy.distutils.misc_util import Configuration
     config = Configuration('volume_rendering',parent_package,top_path)
     config.make_config_py() # installs __config__.py
-    config.make_svn_version_py()
+    #config.make_svn_version_py()
     return config

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