Commits

Nathan Goldbaum committed fdc44a6 Merge

Merging

  • Participants
  • Parent commits 71ceede, 03793d5

Comments (0)

Files changed (28)

File doc/install_script.sh

     sleep 60
 fi
 
-function get_enzotools
+function get_ytproject
 {
     echo "Downloading $1 from yt-project.org"
     [ -e $1 ] && return
 echo '44eea803870a66ff0bab08d13a8b3388b5578ebc1c807d1d9dca0a93e6371e91b15d02917a00b3b20dc67abb5a21dabaf9b6e9257a561f85eeff2147ac73b478  PyX-0.11.1.tar.gz' > PyX-0.11.1.tar.gz.sha512
 echo '1a754d560bfa433f0960ab3b5a62edb5f291be98ec48cf4e5941fa5b84139e200b87a52efbbd6fa4a76d6feeff12439eed3e7a84db4421940d1bbb576f7a684e  Python-2.7.2.tgz' > Python-2.7.2.tgz.sha512
 echo 'c017d3d59dd324ac91af0edc178c76b60a5f90fbb775cf843e39062f95bd846238f2c53705f8890ed3f34bc0e6e75671a73d13875eb0287d6201cb45f0a2d338  bzip2-1.0.5.tar.gz' > bzip2-1.0.5.tar.gz.sha512
-echo '445de41f63a03bf1c098e36b5658590d8837a80ecd3ce8ff6544d30653cc64ce2521e6354016ca3b56a35a8416c33567506db8acec29ea3d9d97ae5f2e7eca02  ext-4.1.0-gpl.zip' > ext-4.1.0-gpl.zip.sha512
+echo 'a296dfcaef7e853e58eed4e24b37c4fa29cfc6ac688def048480f4bb384b9e37ca447faf96eec7b378fd764ba291713f03ac464581d62275e28eb2ec99110ab6  reason-js-20120623.zip' > reason-js-20120623.zip.sha512
 echo 'b519218f93946400326e9b656669269ecb3e5232b944e18fbc3eadc4fe2b56244d68aae56d6f69042b4c87c58c881ee2aaa279561ea0f0f48d5842155f4de9de  freetype-2.4.4.tar.gz' > freetype-2.4.4.tar.gz.sha512
 echo '1531789e0a77d4829796d18552a4de7aecae7e8b63763a7951a8091921995800740fe03e72a7dbd496a5590828131c5f046ddead695e5cba79343b8c205148d1  h5py-2.0.1.tar.gz' > h5py-2.0.1.tar.gz.sha512
 echo '9644896e4a84665ad22f87eb885cbd4a0c60a5c30085d5dd5dba5f3c148dbee626f0cb01e59a7995a84245448a3f1e9ba98687d3f10250e2ee763074ed8ddc0e  hdf5-1.8.7.tar.gz' > hdf5-1.8.7.tar.gz.sha512
 echo '57fa5e57dfb98154a42d2d477f29401c2260ae7ad3a8128a4098b42ee3b35c54367b1a3254bc76b9b3b14b4aab7c3e1135858f68abc5636daedf2f01f9b8a3cf  tornado-2.2.tar.gz' > tornado-2.2.tar.gz.sha512
 
 # Individual processes
-[ -z "$HDF5_DIR" ] && get_enzotools hdf5-1.8.7.tar.gz
-[ $INST_ZLIB -eq 1 ] && get_enzotools zlib-1.2.3.tar.bz2 
-[ $INST_BZLIB -eq 1 ] && get_enzotools bzip2-1.0.5.tar.gz
-[ $INST_PNG -eq 1 ] && get_enzotools libpng-1.2.43.tar.gz
-[ $INST_FTYPE -eq 1 ] && get_enzotools freetype-2.4.4.tar.gz
-[ $INST_SQLITE3 -eq 1 ] && get_enzotools sqlite-autoconf-3070500.tar.gz
-[ $INST_PYX -eq 1 ] && get_enzotools PyX-0.11.1.tar.gz
-[ $INST_0MQ -eq 1 ] && get_enzotools zeromq-2.2.0.tar.gz
-[ $INST_0MQ -eq 1 ] && get_enzotools pyzmq-2.1.11.tar.gz
-[ $INST_0MQ -eq 1 ] && get_enzotools tornado-2.2.tar.gz
-get_enzotools Python-2.7.2.tgz
-get_enzotools numpy-1.6.1.tar.gz
-get_enzotools matplotlib-1.1.0.tar.gz
-get_enzotools mercurial-2.2.2.tar.gz
-get_enzotools ipython-0.12.tar.gz
-get_enzotools h5py-2.0.1.tar.gz
-get_enzotools Cython-0.16.tar.gz
-get_enzotools ext-4.1.0-gpl.zip
+[ -z "$HDF5_DIR" ] && get_ytproject hdf5-1.8.7.tar.gz
+[ $INST_ZLIB -eq 1 ] && get_ytproject zlib-1.2.3.tar.bz2 
+[ $INST_BZLIB -eq 1 ] && get_ytproject bzip2-1.0.5.tar.gz
+[ $INST_PNG -eq 1 ] && get_ytproject libpng-1.2.43.tar.gz
+[ $INST_FTYPE -eq 1 ] && get_ytproject freetype-2.4.4.tar.gz
+[ $INST_SQLITE3 -eq 1 ] && get_ytproject sqlite-autoconf-3070500.tar.gz
+[ $INST_PYX -eq 1 ] && get_ytproject PyX-0.11.1.tar.gz
+[ $INST_0MQ -eq 1 ] && get_ytproject zeromq-2.2.0.tar.gz
+[ $INST_0MQ -eq 1 ] && get_ytproject pyzmq-2.1.11.tar.gz
+[ $INST_0MQ -eq 1 ] && get_ytproject tornado-2.2.tar.gz
+get_ytproject Python-2.7.2.tgz
+get_ytproject numpy-1.6.1.tar.gz
+get_ytproject matplotlib-1.1.0.tar.gz
+get_ytproject mercurial-2.2.2.tar.gz
+get_ytproject ipython-0.12.tar.gz
+get_ytproject h5py-2.0.1.tar.gz
+get_ytproject Cython-0.16.tar.gz
+get_ytproject reason-js-20120623.zip
 
 if [ $INST_BZLIB -eq 1 ]
 then

File scripts/pyro_queue.py

+from yt.config import ytcfg;ytcfg["yt","__withinreason"]="True"
+import os
+import Pyro4
+import uuid
+
+from yt.mods import *
+from yt.utilities.parallel_tools.parallel_analysis_interface import \
+    _get_comm
+from yt.gui.reason.pyro_queue import \
+    PyroQueueRoot, \
+    PyroQueueNonRoot
+
+comm = _get_comm(())
+my_rank = comm.comm.rank
+
+if my_rank == 0:
+    my_q = PyroQueueRoot(comm)
+    Pyro4.config.HMAC_KEY = uuid.uuid4().hex
+    key_file = 'reason.key'
+    fd = os.open(key_file, os.O_CREAT, 0600)
+    os.close(fd)
+    out_file = file(key_file, 'w')
+    out_file.write("HMAC KEY: %s\n" % Pyro4.config.HMAC_KEY)
+    out_file.close()
+    mylog.info('See %s for HMAC key.', key_file)
+    Pyro4.Daemon.serveSimple(
+        {my_q: "yt.executor"},
+        ns=False, verbose=True)
+else:
+    my_q = PyroQueueNonRoot(comm)
+    my_q.run()
     from yt.config import ytcfg
     if ytcfg.getboolean("yt","suppressStreamLogging"):
         return DummyProgressBar()
-    elif ytcfg.getboolean("yt", "__parallel"):
-        return ParallelProgressBar(title, maxval)
-    elif "SAGE_ROOT" in os.environ:
-        try:
-            from sage.server.support import EMBEDDED_MODE
-            if EMBEDDED_MODE: return DummyProgressBar()
-        except:
-            pass
-    elif "CODENODE" in os.environ:
-        return DummyProgressBar()
     elif ytcfg.getboolean("yt", "__withinreason"):
         from yt.gui.reason.extdirect_repl import ExtProgressBar
         return ExtProgressBar(title, maxval)
+    elif ytcfg.getboolean("yt", "__parallel"):
+        return ParallelProgressBar(title, maxval)
     widgets = [ title,
             pb.Percentage(), ' ',
             pb.Bar(marker=pb.RotatingMarker()),

File yt/gui/reason/basic_repl.py

 from cStringIO import StringIO
 
 class ProgrammaticREPL(object):
-    
+    stopped = False
+    debug = False
     def __init__(self, locals=None):
+        self.executed_cell_texts = []
         self.locals = {}
         if locals:
             self.locals.update(locals)

File yt/gui/reason/extdirect_repl.py

 import base64
 import imp
 import threading
+import Pyro4
 import Queue
 import zipfile
 
 from .bottle_mods import preroute, BottleDirectRouter, notify_route, \
                          PayloadHandler, lockit
 from yt.utilities.bottle import response, request, route, static_file
+from .utils import get_list_of_datasets
 from .basic_repl import ProgrammaticREPL
 
 try:
 class ExecutionThread(threading.Thread):
     def __init__(self, repl):
         self.repl = repl
+        self.payload_handler = PayloadHandler()
         self.queue = Queue.Queue()
         threading.Thread.__init__(self)
         self.daemon = True
 
+    def heartbeat(self):
+        return
+
     def run(self):
         while 1:
             #print "Checking for a queue ..."
             except Queue.Empty:
                 if self.repl.stopped: return
                 continue
-            #print "Received the task", task
+            print "Received the task", task
             if task['type'] == 'code':
                 self.execute_one(task['code'], task['hide'])
                 self.queue.task_done()
             print result
             print "========================================================"
         if not hide:
+            self.payload_handler.add_payload(
+                {'type': 'cell',
+                 'output': result,
+                 'input': highlighter(code),
+                 'image_data': '',
+                 'raw_input': code},
+                )
+        objs = get_list_of_datasets()
+        self.payload_handler.add_payload(
+            {'type': 'dataobjects',
+             'objs': objs})
+
+class PyroExecutionThread(ExecutionThread):
+    def __init__(self, repl):
+        ExecutionThread.__init__(self, repl)
+        hmac_key = raw_input("HMAC_KEY? ").strip()
+        uri = raw_input("URI? ").strip()
+        Pyro4.config.HMAC_KEY = hmac_key
+        self.executor = Pyro4.Proxy(uri)
+
+    def execute_one(self, code, hide):
+        self.repl.executed_cell_texts.append(code)
+        print code
+        result = self.executor.execute(code)
+        if not hide:
             self.repl.payload_handler.add_payload(
                 {'type': 'cell',
                  'output': result,
                  'input': highlighter(code),
                  'raw_input': code},
                 )
+        ph = self.executor.deliver()
+        for p in ph:
+            self.repl.payload_handler.add_payload(p)
 
-def deliver_image(im):
-    if hasattr(im, 'read'):
-        img_data = base64.b64encode(im.read())
-    elif isinstance(im, types.StringTypes) and \
-         im.endswith(".png"):
-        img_data = base64.b64encode(open(im).read())
-    elif isinstance(im, types.StringTypes):
-        img_data = im
-    else:
-        raise RuntimeError
-    ph = PayloadHandler()
-    payload = {'type':'png_string',
-               'image_data':img_data}
-    ph.add_payload(payload)
+    def heartbeat(self):
+        ph = self.executor.deliver()
+        for p in ph:
+            self.repl.payload_handler.add_payload(p)
 
 def reason_pylab():
+    from .utils import deliver_image
     def _canvas_deliver(canvas):
         tf = tempfile.TemporaryFile()
         canvas.print_png(tf)
     matplotlib.rcParams["backend"] = "module://reason_agg"
     pylab.switch_backend("module://reason_agg")
 
+_startup_template = r"""\
+import pylab
+from yt.mods import *
+from yt.gui.reason.utils import load_script, deliver_image
+from yt.gui.reason.widget_store import WidgetStore
+from yt.data_objects.static_output import _cached_pfs
+
+pylab.ion()
+data_objects = []
+widget_store = WidgetStore()
+"""
+
 class ExtDirectREPL(ProgrammaticREPL, BottleDirectRouter):
     _skip_expose = ('index')
     my_name = "ExtDirectREPL"
     timeout = 660 # a minute longer than the rocket server timeout
     server = None
-    stopped = False
-    debug = False
     _heartbeat_timer = None
 
-    def __init__(self, base_extjs_path, locals=None):
+    def __init__(self, reasonjs_path, locals=None,
+                 use_pyro=False):
         # First we do the standard initialization
-        self.extjs_file = zipfile.ZipFile(os.path.join(
-            base_extjs_path, "ext-4.1.0-gpl.zip"), 'r')
+        self.reasonjs_file = zipfile.ZipFile(reasonjs_path, 'r')
         ProgrammaticREPL.__init__(self, locals)
         # Now, since we want to only preroute functions we know about, and
         # since they have different arguments, and most of all because we only
                               _myapi = ("/ext-repl-api.js", "GET"),
                               _session_py = ("/session.py", "GET"),
                               _highlighter_css = ("/highlighter.css", "GET"),
-                              _extjs = ("/resources/extjs-4.1.0/:path#.+#", "GET"),
+                              _reasonjs = ("/reason-js/:path#.+#", "GET"),
                               _app = ("/reason/:path#.+#", "GET"),
                               )
         for v, args in preroute_table.items():
         # This has to be routed to the root directory
         self.api_url = "repl"
         BottleDirectRouter.__init__(self)
-        self.pflist = ExtDirectParameterFileList()
-        self.executed_cell_texts = []
         self.payload_handler = PayloadHandler()
-        self.execution_thread = ExecutionThread(self)
+        if use_pyro:
+            self.execution_thread = PyroExecutionThread(self)
+        else:
+            self.execution_thread = ExecutionThread(self)
         # We pass in a reference to ourself
+        self.execute(_startup_template)
         self.widget_store = WidgetStore(self)
         # Now we load up all the yt.mods stuff, but only after we've finished
         # setting up.
         reason_pylab()
-        self.execute("from yt.mods import *\nimport pylab\npylab.ion()")
-        self.execute("from yt.data_objects.static_output import _cached_pfs", hide = True)
-        self.execute("data_objects = []", hide = True)
-        self.locals['load_script'] = ext_load_script
-        self.locals['deliver_image'] = deliver_image
-        self.locals['widget_store'] = self.widget_store
 
     def activate(self):
         self.payload_handler._prefix = self._global_token
         # Setup our heartbeat
         self.last_heartbeat = time.time()
         self._check_heartbeat()
+        self.execute("widget_store._global_token = '%s'" % self._global_token)
         self.execution_thread.start()
 
     def exception_handler(self, exc):
                 rv = self.payload_handler.deliver_payloads()
                 if self.debug: print "    ### Got back, returning"
                 return rv
+            self.execution_thread.heartbeat()
         if self.debug: print "### Heartbeat ... finished: %s" % (time.ctime())
         return []
 
         root = os.path.join(local_dir, "html")
         return static_file("help.html", root)
 
-    def _extjs(self, path):
-        pp = os.path.join("extjs-4.1.0", path)
+    def _reasonjs(self, path):
+        pp = os.path.join("reason-js", path)
         try:
-            f = self.extjs_file.open(pp)
+            f = self.reasonjs_file.open(pp)
         except KeyError:
             response.status = 404
             return
         return highlighter_css
 
     def execute(self, code, hide = False):
-            task = {'type': 'code',
-                    'code': code,
-                    'hide': hide}
-            self.execution_thread.queue.put(task)
-            return dict(status = True)
+        task = {'type': 'code',
+                'code': code,
+                'hide': hide}
+        self.execution_thread.queue.put(task)
+        return dict(status = True)
 
     def get_history(self):
         return self.executed_cell_texts[:]
             results.append((os.path.basename(fn), size, t))
         return dict(objs = results, cur_dir=cur_dir)
 
-class ExtDirectParameterFileList(BottleDirectRouter):
-    my_name = "ExtDirectParameterFileList"
-    api_url = "pflist"
-
-    def get_list_of_pfs(self):
-        # Note that this instantiates the hierarchy.  This can be a costly
-        # event.  However, we're going to assume that it's okay, if you have
-        # decided to load up the parameter file.
-        from yt.data_objects.static_output import _cached_pfs
-        rv = []
-        for fn, pf in sorted(_cached_pfs.items()):
-            objs = []
-            pf_varname = "_cached_pfs['%s']" % (fn)
-            field_list = []
-            if pf._instantiated_hierarchy is not None: 
-                field_list = list(set(pf.h.field_list + pf.h.derived_field_list))
-                field_list = [dict(text = f) for f in sorted(field_list)]
-                for i,obj in enumerate(pf.h.objects):
-                    try:
-                        name = str(obj)
-                    except ReferenceError:
-                        continue
-                    objs.append(dict(name=name, type=obj._type_name,
-                                     filename = '', field_list = [],
-                                     varname = "%s.h.objects[%s]" % (pf_varname, i)))
-            rv.append( dict(name = str(pf), children = objs, filename=fn,
-                            type = "parameter_file",
-                            varname = pf_varname, field_list = field_list) )
-        return rv
-
-def ext_load_script(filename):
-    contents = open(filename).read()
-    payload_handler = PayloadHandler()
-    payload_handler.add_payload(
-        {'type': 'cell_contents',
-         'value': contents}
-    )
-    return
-
 class PayloadLoggingHandler(logging.StreamHandler):
     def __init__(self, *args, **kwargs):
         logging.StreamHandler.__init__(self, *args, **kwargs)

File yt/gui/reason/html/app/controller/DataObjects.js

 
     init: function() {
         this.application.addListener({
-           newdataobjects : {fn: this.refreshDataObjects, scope: this},
+           payloaddataobjects : {fn: this.refreshDataObjects, scope: this},
         });
         this.control({
             "#dataobjects": { itemcontextmenu:
         this.callParent(arguments);
     },
 
-    refreshDataObjects: function(objs) {
+    refreshDataObjects: function(payload) {
         /*console.log("Refreshing data objects");*/
+        var objs = payload['objs'];
         var root = this.getDataObjectsStore().getRootNode();
         root.removeAll();
         var pf;

File yt/gui/reason/html/app/controller/Notebook.js

     init: function() {
         this.application.addListener({
             payloadcell: {fn: this.addCell, scope: this},
+            payloadscript: {fn: this.loadScript, scope: this},
             executecell: {fn: this.executeCell, scope: this},
             wipeinput:   {fn: this.wipeInputLine, scope: this},
             blockinput:  {fn: this.blockInput, scope: this},
             input: cell['input'],
             output: cell['output'],
             raw_input: cell['raw_input'],
+            image_data: cell['image_data'],
             executiontime: cell['executiontime'],
         });
         this.application.fireEvent("scrolltobottom");
     },
+
+    loadScript: function(payload) {
+        console.log("Loading script ...");
+        this.getInputLine().setValue(payload['value']);
+        this.getInputLine()._lock = true;
+    },
+
     executeCell: function(line) {
         this.application.fireEvent("blockinput");
         console.log("Asked to execute " + line);
     },
     
     wipeInputLine: function() {
-        this.getInputLine().setValue("");
+        if(this.getInputLine()._lock == true) {
+            this.getInputLine()._lock = false;
+        } else {
+            this.getInputLine().setValue("");
+        }
     },
 
     blockInput: function() {
     allowInput: function() {
         this.getInputLine().removeCls("cell_waiting");
         this.getInputLine().setReadOnly(false);
-        console.log("Calling FileList");
         var application = this.application;
     },
 

File yt/gui/reason/html/app/controller/ServerCommunication.js

         this.heartbeat = this.taskRunner.start(
             {run: this.heartbeatCall,
              interval: 250});
-        this.dataObjectBeat = this.taskRunner.start(
-            {run: this.dataObjectsCall,
-             interval: 5000});
         this.callParent(arguments);
     },
 
         this.application.fireEvent('payload' + payload['type'], payload);
     },
 
-    dataObjectsCall: function() {
-        yt_rpc.ExtDirectParameterFileList.get_list_of_pfs({}, 
-            function(f, a) {
-                if (f == null) { return; }
-                reason.fireEvent("newdataobjects", f);
-        });
-    },
-
     heartbeatCall: function() {
         if (heartbeatRequest == true) return;
         heartbeatRequest = true;
-        console.log("Sending heartbeat");
+        /*console.log("Sending heartbeat");*/
         yt_rpc.ExtDirectREPL.heartbeat(
             {}, function(f, a) {
                 heartbeatRequest = false;

File yt/gui/reason/html/app/controller/widgets/PlotWindow.js

             }
             var title = widget.templateManager.applyObject(obj, 'pwt');
             win = Ext.widget("plotwindowcreator", {title:title, obj:obj});
-            win.query("#weightField")[0].store = 
-                ['None'].concat(obj.field_list);
-            win.query("#field")[0].store = obj.field_list;
+            console.log(obj.field_list);
+            var field_list = [];
+            Ext.each(obj.field_list, function(f, i, af) {
+                field_list.push(f.text);
+            });
+            win.query("#weightField")[0].store = ['None'].concat(field_list);
+            win.query("#field")[0].store = field_list;
             win.query("#create")[0].on('click', makePlot);
             win.query("#cancel")[0].on('click', function(){win.destroy();});
             win.query("#maxDens")[0].on('change', toggleMaxDens);

File yt/gui/reason/html/app/store/CellValues.js

 Ext.define('Reason.store.CellValues', {
     extend: 'Ext.data.Store',
     id: 'cellvalues',
-    fields: ['input', 'output', 'raw_input', 'executiontime'],
+    fields: ['input', 'output', 'raw_input', 'executiontime', 
+        { name: 'image_data', type: 'string', defaultValue: '' }
+    ],
     data: [],
 });
 

File yt/gui/reason/html/app/view/CellView.js

     '<pre>{output}</pre><br/><br/>'
 );
 
+var imageDisplay = new Ext.XTemplate(
+    '<b>Image</b><br/><br/>',
+    '<hr>',
+    '<img src="data:image/png;base64,{image_data}">',
+    '<br/><br/>'
+);
+
 Ext.define('Reason.view.CellView', {
     extend: 'Ext.grid.Panel',
     alias: 'widget.notebookcells',
     features: [{
         ftype: 'rowbody',
         getAdditionalData: function(data, rowIndex, record, orig) {
+            var disp;
+            console.log(data);
+            if(data['image_data'] != '') {
+                disp = imageDisplay.apply(data);
+            } else {
+                disp = cellDisplay.apply(data);
+            }
             return {
-                rowBody: cellDisplay.apply(data),
+                rowBody: disp,
                 rowBodyCls: 'codeview',
                 rowBodyColspan: this.view.headerCt.getColumnCount(),
             };

File yt/gui/reason/html/app/view/widgets/PlotWindowCreator.js

                   fieldLabel: 'Field',
                   itemId: 'field',
                   store: [],
+                  displayField: 'text',
+                  valueield: 'text',
                   width: 200,
                   allowBlank:false,
                   triggerAction: 'all',
                   xtype:'combo',
                   fieldLabel: 'Weight Field',
                   itemId: 'weightField',
-                  store: ['None'],
+                  store: [{text:'None'},],
+                  displayField: 'text',
+                  valueield: 'text',
                   width: 200,
                   allowBlank:false,
                   triggerAction: 'all',

File yt/gui/reason/html/help.html

 }
 
 a {
-    /*text-decoration: none;*/
+    text-decoration: none;
 }
 
 a:link {
 </style>
 <body>
 <div class="yt_logo">
-<h1>yt:</h1>
-<p>because your data isn't going to analyze itself!</p>
+<h1>yt</h1>
 <ul class="quick_list">
+<li><a href="http://yt-project.org/">home</a></li>
 <li><a href="http://yt-project.org/doc/">docs</a></li>
-<li><a href="http://yt-project.org/wiki/Gallery">gallery</a> ( <a href="video_gallery.html">video</a> )</li>
-<li><a href="http://yt-project.org/wiki">wiki</a></li>
-<li><a href="http://yt-project.org/doc/orientation.html">quick start</a></li>
-<li><a href="http://yt-project.org/newticket">report a bug</a></li>
-<li><a href="http://yt-project.org/browser">source</a></li>
-<li><a href="principles.html">principles</a></li>
-<li><a href="http://blog.enzotools.org/">development blog</a></li>
+<li><a href="https://bitbucket.org/yt_analyis/yt/">development page</a></li>
+<li><a href="https://bitbucket.org/yt_analyis/yt/newticket">report a bug</a></li>
+<li><a href="http://yt-project.org/irc.html">chat</a></li>
+<li>&nbsp;</li>
+<li><a href="http://yt-project.org/docs/2.3/interacting/reason.html">reason manual</a></li>
 </ul>
 </div>
 <div class="faq">
 images will be returned in the window.  You can click on these images to view
 them at full-size.</p>
 
-<h2>Using the interactive plot window</h2>
-<p>As you execute cells and load parameter files from disk, these parameter
-files will get added to the tree view on the left, along with any objects that
-have been created from them.</p>
+<h2>Interactive Visualization</h2>
+<p>Once you have loaded data off disk, either by loading it in the Notebook,
+or choosing "Load File" from the menu, you can right click on any object
+in the left hand menu to choose different visualization options.</p>
 
-<p>Over time, these objects will expose right-click events to create plot
-windows, as well as drag-and-drop functionality.</p>
+<p>You can also supply files on the command line when starting Reason, or run
+with "-f" to search for them in the current directory.</p>
 
-<h2>Saving and loading sessions</h2>
-<p>There are three methods for saving your work.  You can click "Download" to
-download a copy of your session on your local machine.  By clicking "Save" you
-can save a copy on the server on which Reason is running.  By clicking
-"Pastebin" you can send a copy of it to the <a
-href="http://paste.yt-project.org/">yt pastebin</a>.</p>
-
-<p>If you use the command 'load_script' and supply it a file the server can
-find locally, it will read that file in and populate the contents of your next
-submission cell with it.</p>
+<h2>Delivering Images and Scripts</h2>
+<p>The command <tt>deliver_image('filename.png')</tt> will display the file
+<tt>filename.png</tt> in the output window.  The command <tt>load_script('filename.py')</tt>
+will fill the execution area with the script <tt>filename.py</tt>.</p>
 
 <h2>How to Quit</h2>
-<p>To quit, simply press Ctrl-C in the console window that you ran "yt serve"
-within.</p>
+<p>To quit, either choose "Quit" from the menu or press Ctrl-C in the console
+window that you ran "yt serve" within.</p>
 
 </div>
 </body>

File yt/gui/reason/html/index.html

     <link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Inconsolata">
 
     <!-- LIBS -->
-    <link rel="stylesheet" type="text/css" href="resources/extjs-4.1.0/resources/css/ext-all-gray.css">
+    <link rel="stylesheet" type="text/css" href="reason-js/resources/css/ext-all-gray.css">
     <link rel="stylesheet" type="text/css" href="reason/resources/css/style.css">
     <link rel="stylesheet" type="text/css" href="reason/resources/css/CheckHeader.css">
     <link rel="stylesheet" type="text/css" href="highlighter.css">
 
-    <script type="text/javascript" src="resources/extjs-4.1.0/ext-all-debug.js"></script>
+    <script type="text/javascript" src="reason-js/ext-all.js"></script>
     <script type="text/javascript" src="reason/app.js"></script>
     <script type="text/javascript" src="ext-repl-api.js"></script>
-    <script type="text/javascript" src="resources/ext-pflist-api.js"></script>
 
     <!-- Additional Ext UX files -->
     <script type="text/javascript" src="reason/resources/ux/CheckColumn.js"></script>
 
     <!-- LEAFLET STUFF -->
-    <script type="text/javascript" src="reason/resources/leaflet/leaflet.js"></script>
-    <link rel="stylesheet" href="reason/resources/leaflet/leaflet.css" />
+    <script type="text/javascript" src="reason-js/leaflet/leaflet.js"></script>
+    <link rel="stylesheet" href="reason-js/leaflet/leaflet.css" />
 
     <!-- XTK STUFF -->
-    <script type="text/javascript" src="reason/xtk_edge.js"></script>
+    <script type="text/javascript" src="reason-js/xtk_edge.js"></script>
 
 </head>
 <body>

File yt/gui/reason/html/js/functions.js

-/**********************************************************************
-Functions for Reason
-
-Author: Cameron Hummels <chummels@gmail.com>
-Affiliation: Columbia
-Author: Jeffrey S. Oishi <jsoishi@gmail.com>
-Affiliation: KIPAC/SLAC/Stanford
-Author: Britton Smith <brittonsmith@gmail.com>
-Affiliation: MSU
-Author: Matthew Turk <matthewturk@gmail.com>
-Affiliation: Columbia University
-Homepage: http://yt-project.org/
-License:
-  Copyright (C) 2011 Matthew Turk.  All Rights Reserved.
-
-  This file is part of yt.
-
-  yt is free software; you can redistribute it and/or modify
-  it under the terms of the GNU General Public License as published by
-  the Free Software Foundation; either version 3 of the License, or
-  (at your option) any later version.
-
-  This program is distributed in the hope that it will be useful,
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
-
-  You should have received a copy of the GNU General Public License
-  along with this program.  If not, see <http://www.gnu.org/licenses/>.
-***********************************************************************/
-
-function cell_finished(result) {
-    var new_log = false;
-    var cell_resulted = false;
-    var cell;
-    Ext.each(result, 
-    function(payload, index) {
-        if (payload['type'] == 'shutdown') {
-            reason.task_runner.stop(heartbeat);
-            reason.heartbeat_request = true;
-            return;
-        } else if (payload['type'] == 'cell_results') {
-            text = "<pre>"+payload['output']+"</pre>";
-            formatted_input = payload['input']
-            cell = new_cell(formatted_input, text, payload['raw_input']);
-            OutputContainer.add(cell);
-            OutputContainer.doLayout();
-            notebook.doLayout();
-            if (repl_input.locked == true) {
-                /* Assume only one locking level */
-                repl_input.locked = false;
-            } else {
-                repl_input.get("input_line").setValue("");
-            }
-            if (OutputContainer.items.length > 1) {
-                OutputContainer.body.dom.scrollTop = 
-                OutputContainer.body.dom.scrollHeight -
-                cell.body.dom.scrollHeight - 20;
-            }
-            cell_resulted = true;
-        } else if (payload['type'] == 'png_string') {
-            OutputContainer.add(new Ext.Panel({
-                autoEl:{
-                    tag:'img', 
-                    width:'25%',
-                    src:"data:image/png;base64," + payload['image_data'],
-                    id:"payload_image_" + number_images,
-                    onClick: "display_image('payload_image_" + number_images + "');"
-		        }
-            }));
-	        OutputContainer.doLayout();
-	        number_images++;
-        } else if (payload['type'] == 'cell_contents') {
-	        var input_line = repl_input.get("input_line");
-	        input_line.setValue(payload['value']);
-            repl_input.locked = true;
-        } else if (payload['type'] == 'log_entry') {
-            reason.log(payload['log_entry']);
-            new_log = true;
-        } else if (payload['type'] == 'widget') {
-            var widget_type = payload['widget_type'];
-            var widget = new widget_types[widget_type](payload['varname'],
-                                                       payload['data']);
-            widget_list[widget.id] = widget;
-            /*
-               Sometimes instantiating a widget adds some objects ...
-               Plus, often when creating a widget we disable the 
-               entry of data and whatnot. 
-            */
-            cell_resulted = true;
-        } else if (payload['type'] == 'widget_payload') {
-            var widget = widget_list[payload['widget_id']];
-            widget.accept_results(payload);
-        } else {
-            alert("Didn't know how to process " + payload['type']);
-        }
-    });
-    if (new_log == true){
-        reason.log_scroll()
-    }
-    if (cell_resulted == true) {
-        enable_input();
-    }
-}
-
-function display_image(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>',
-    prev = window.open('', 'image_viewer');
-    prev.document.open();
-    prev.document.write(virtualdom);
-    prev.document.close();
-}
-
-// Create a tree in the left panel with the pfs and their objects.
-function fill_tree(my_pfs) {
-    treePanel.root.removeAll();
-    Ext.each(my_pfs, function(pf, index) {
-        treePanel.root.appendChild(new Ext.tree.TreeNode({
-            text: pf.name,
-            objdata: {fn: pf.filename, varname: pf.varname, type: 'pf',
-                      field_list: pf.field_list},
-            leaf:false, 
-            expanded:true, 
-            iconCls: 'pf_icon'}));
-        this_pf = treePanel.root.lastChild
-        Ext.each(pf.objects, function(obj, obj_index) {
-            this_pf.appendChild(new Ext.tree.TreeNode(
-                {text: obj.name,
-                 leaf: true,
-                 iconCls: 'data_obj',
-                 objdata: {varname: obj.varname, type: 'obj',
-                           pfdata: this_pf.attributes.objdata},
-                 }));
-        });
-    });
-}
-
-function new_cell(input, result, raw_input) {
-    var name = "cell_" + cell_count;
-    var CellPanel = new Ext.Panel(
-        { 
-            id: name, 
-            //title: "Cell " + cell_count,
-            items: [
-                { xtype:'panel',
-                  layout: 'hbox',
-                  id:name+"_input",
-                  items: [
-                    { xtype:'panel',
-                      html:input,
-                      flex:1,
-                      boxMinHeight: 40,
-                    },
-                    { xtype: 'button',
-                      width: 24,
-                      height: 24,
-                      iconCls: 'upload',
-                      tooltip: 'Upload to Pastebin',
-                      listeners: {
-                          click: function(f, e) {
-                            yt_rpc.ExtDirectREPL.paste_text({to_paste:raw_input},
-                              function(f, a) {
-                                if (a.result['status'] == 'SUCCESS') {
-                                    var alert_text = 'Pasted cell to:<br>' + 
-                                    a.result['site']
-                                    var alert_text_rec = 'Pasted cell to: ' + 
-                                    a.result['site']
-                                    Ext.Msg.alert('Pastebin', alert_text);
-                                    var record = new logging_store.recordType(
-                                        {record: alert_text_rec });
-                                    logging_store.add(record, number_log_records++);
-                              }
-                            });
-                          }
-                        }
-                    },
-                    { xtype: 'button',
-                      width: 24,
-                      height: 24,
-                      iconCls: 'doubleuparrow',
-                      tooltip: 'Copy into current cell',
-                      listeners: {
-                          click: function(f, e) {
-                            repl_input.get('input_line').setValue(raw_input);
-                          }
-                      },
-                    },
-                  ],
-                },
-                { xtype:'panel',
-                  layout: 'hbox',
-                  items: [
-                    { xtype:'panel',
-                      id:name+"_result",
-                      autoScroll:true,
-                      flex: 1,
-                      html:result,
-                      boxMinHeight: 40,
-                    },
-                  ],
-                },
-            ]
-        }
-    );
-    cell_count++;
-    return CellPanel;
-}
-
-function getGridViewerHandler(node){
-function gridViewerHandler(item, pressed){
-    yt_rpc.ExtDirectREPL.create_grid_viewer(
-        {pfname:node.attributes.objdata.varname},
-        handle_result);
-}
-return gridViewerHandler;
-}
-
-function getGridDataViewerHandler(node){
-function gridDataViewerHandler(item, pressed){
-    yt_rpc.ExtDirectREPL.create_grid_dataview(
-        {pfname:node.attributes.objdata.varname},
-        handle_result);
-}
-return gridDataViewerHandler;
-}
-
-function getStreamlineViewerHandler(node){
-function streamlineViewerHandler(item, pressed){
-    yt_rpc.ExtDirectREPL.create_streamline_viewer(
-        {pfname:node.attributes.objdata.varname},
-        handle_result);
-}
-return streamlineViewerHandler;
-}
-
-function getIsocontourViewerHandler(node){
-function isocontourViewerHandler(item,pressed){
-    var win = new Ext.Window({
-        layout:'fit',
-        width:320,
-        height:250,
-        modal:true,
-        resizable:false,
-        draggable:false,
-        border:false,
-        title:'Isocontour Extraction in' + node,
-        items: [{
-            xtype: 'form', // FormPanel
-            labelWidth:80,
-            frame:true,
-            items: [{
-                xtype:'combo',
-                fieldLabel: 'Field',
-                id: 'field',
-                store:node.attributes.objdata.field_list,
-                width: 200,
-                allowBlank:false,
-                value: 'Density',
-                triggerAction: 'all',
-            },{
-                xtype:'combo',
-                fieldLabel: 'Sampling Field',
-                id: 'extract_field',
-                store:node.attributes.objdata.field_list,
-                width: 200,
-                allowBlank:false,
-                value: 'Temperature',
-                triggerAction: 'all',
-            },{
-                xtype:'textfield',
-                fieldLabel: 'Value',
-                id: 'value',
-                value: '1e-25',
-                width: 90,
-                allowBlank:false,
-            }],
-            buttons: [
-                {
-                    text: 'Extract',
-                    handler: function(b, e){
-                        var field = Ext.get("field").getValue();
-                        var value = Ext.get("value").getValue();
-                        var sampling_field = Ext.get("extract_field").getValue();
-                        yt_rpc.ExtDirectREPL.create_isocontours({
-                            pfname:node.attributes.objdata.varname,
-                            field:field, value:value,
-                            sampling_field:sampling_field},
-                          handle_result);
-                        disable_input();
-                        win.close();
-                    }
-                },{
-                    text: 'Cancel',
-                    handler: function(b, e){
-                        win.close();
-                    }
-                }
-            ]
-        }]
-    });
-    win.show(this);
-}
-return isocontourViewerHandler;
-}
-
-function getSliceHandler(node){
-function sliceHandler(item,pressed){
-    var win = new Ext.Window({
-        layout:'fit',
-        width:320,
-        height:250,
-        modal:true,
-        resizable:false,
-        draggable:false,
-        border:false,
-        title:'Slice Details for ' + node,
-        items: [{
-            xtype: 'form', // FormPanel
-            labelWidth:80,
-            frame:true,
-            items: [{
-                xtype:'textfield',
-                fieldLabel: 'Center X',
-                id: 'slice_x_center',
-                value: '0.5',
-                width: 90,
-                allowBlank:false,
-            },{
-                xtype:'textfield',
-                fieldLabel: 'Center Y',
-                id: 'slice_y_center',
-                value: '0.5',
-                width: 90,
-                allowBlank:false,
-            },{
-                xtype:'textfield',
-                fieldLabel: 'Center Z',
-                id: 'slice_z_center',
-                value: '0.5',
-                width: 90,
-                allowBlank:false,
-            },{
-                xtype:'combo',
-                fieldLabel: 'Axis',
-                id: 'slice_axis',
-                store:['X','Y','Z'],
-                width: 90,
-                allowBlank:false,
-                value: 'X',
-                triggerAction: 'all',
-            },{
-                xtype:'checkbox',
-                fieldLabel: 'Center on Max',
-                id: 'max_dens',
-                width: 90,
-                allowBlank:false,
-                handler: function(checkbox, checked) {
-                    if (checked == true) {
-                        this.ownerCt.get("slice_x_center").disable();
-                        this.ownerCt.get("slice_y_center").disable();
-                        this.ownerCt.get("slice_z_center").disable();
-                    } else {
-                        this.ownerCt.get("slice_x_center").enable();
-                        this.ownerCt.get("slice_y_center").enable();
-                        this.ownerCt.get("slice_z_center").enable();
-                    }
-                }
-            },{
-                xtype:'combo',
-                fieldLabel: 'Field',
-                id: 'slice_field',
-                store:node.attributes.objdata.field_list,
-                width: 200,
-                allowBlank:false,
-                value: 'Density',
-                triggerAction: 'all',
-            }],
-            buttons: [
-                {
-                    text: 'Slice',
-                    handler: function(b, e){
-                        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},
-                          handle_result);
-                        disable_input();
-                        win.close();
-                    }
-                },{
-                    text: 'Cancel',
-                    handler: function(b, e){
-                        win.close();
-
-                    }
-                }
-            ]
-        }]
-    });
-    win.show(this);
-}
-return sliceHandler;
-}
-
-function widget_call(varname, method) {
-    var fcall = varname + "." + method;
-    yt_rpc.ExtDirectREPL.execute(
-        {code: fcall}, cell_finished);
-}
-
-function getPhasePlotHandler(node){
-function phasePlotHandler(item,pressed){
-    var win = new Ext.Window({
-        layout:'fit',
-        width:370,
-        height:220,
-        modal:true,
-        resizable:false,
-        draggable:false,
-        border:false,
-        title:'Phase Plot Details for ' + node,
-        items: [{
-            xtype: 'form', // FormPanel
-            labelWidth:80,
-            frame:true,
-            items: [ {
-                xtype:'combo',
-                fieldLabel: 'X Field',
-                id: 'x_field',
-                store:node.attributes.objdata.pfdata.field_list,
-                width: 230,
-                allowBlank:false,
-                triggerAction: 'all',
-                value: 'Density'
-            },{
-                xtype:'combo',
-                fieldLabel: 'Y Field',
-                id: 'y_field',
-                store:node.attributes.objdata.pfdata.field_list,
-                width: 230,
-                allowBlank:false,
-                triggerAction: 'all',
-                value: 'Temperature'
-            },{
-                xtype:'combo',
-                fieldLabel: 'Z Field',
-                id: 'z_field',
-                store:node.attributes.objdata.pfdata.field_list,
-                width: 230,
-                allowBlank:false,
-                triggerAction: 'all',
-                value: 'CellMassMsun'
-            },{
-                xtype:'combo',
-                fieldLabel: 'Weight Field',
-                id: 'weight',
-                store:['None'].concat(node.attributes.objdata.pfdata.field_list),
-                width: 230,
-                allowBlank:false,
-                triggerAction: 'all',
-                value: 'None'
-            }],
-            buttons: [
-                {
-                    text: 'Calculate',
-                    handler: function(b, e){
-                        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 ... */
-                                field_x: x_field,
-                                field_y: y_field,
-                                field_z: z_field,
-                                weight: weight,
-                                },
-                              handle_result);
-                        disable_input();
-                        win.close();
-                    }
-                },{
-                    text: 'Cancel',
-                    handler: function(b, e){win.close()}
-                }
-            ]
-        }]
-    });
-    win.show(this);
-}
-return phasePlotHandler;
-}
-
-function getProjectionHandler(node){
-function projectionHandler(item,pressed){
-    var win = new Ext.Window({
-        layout:'fit',
-        width:370,
-        height:220,
-        modal:true,
-        resizable:false,
-        draggable:false,
-        border:false,
-        title:'Projection Details for ' + node,
-        items: [{
-            xtype: 'form', // FormPanel
-            labelWidth:80,
-            frame:true,
-            items: [{
-                xtype:'combo',
-                fieldLabel: 'Axis',
-                id: 'axis',
-                store:['X','Y','Z'],
-                width: 90,
-                allowBlank:false,
-                triggerAction: 'all',
-                value: 'X',
-            },{
-                xtype:'checkbox',
-                fieldLabel: 'Center on Max',
-                id: 'max_dens',
-                width: 90,
-                allowBlank:false,
-                /* No handler, because no center */
-            },{
-                xtype:'combo',
-                fieldLabel: 'Field',
-                id: 'field',
-                store:node.attributes.objdata.field_list,
-                width: 230,
-                allowBlank:false,
-                triggerAction: 'all',
-                value: 'Density'
-            },{
-                xtype:'combo',
-                fieldLabel: 'Weight Field',
-                id: 'weightField',
-                store:['None'].concat(node.attributes.objdata.field_list),
-                width: 230,
-                allowBlank:false,
-                triggerAction: 'all',
-                value: 'None'
-            }],
-            buttons: [
-                {
-                    text: 'Project',
-                    handler: function(b, e){
-                        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,
-                                onmax: onmax},
-                              handle_result);
-                        disable_input();
-                        win.close();
-                    }
-                },{
-                    text: 'Cancel',
-                    handler: function(b, e){win.close()}
-                }
-            ]
-        }]
-    });
-    win.show(this);
-}
-return projectionHandler;
-}
-
-function getSphereCreator(node){
-function sphereCreator(item,pressed){
-    var win = new Ext.Window({
-        layout:'fit',
-        width:320,
-        height:250,
-        modal:true,
-        resizable:false,
-        draggable:false,
-        border:false,
-        title:'Sphere Creator ' + node,
-        items: [{
-            xtype: 'form', // FormPanel
-            labelWidth:80,
-            frame:true,
-            items: [{
-                xtype:'textfield',
-                fieldLabel: 'Center X',
-                id: 'slice_x_center',
-                value: '0.5',
-                width: 90,
-                allowBlank:false,
-            },{
-                xtype:'textfield',
-                fieldLabel: 'Center Y',
-                id: 'slice_y_center',
-                value: '0.5',
-                width: 90,
-                allowBlank:false,
-            },{
-                xtype:'textfield',
-                fieldLabel: 'Center Z',
-                id: 'slice_z_center',
-                value: '0.5',
-                width: 90,
-                allowBlank:false,
-            },{
-                xtype:'textfield',
-                fieldLabel: 'Radius',
-                id: 'radius_value',
-                value: '0.5',
-                width: 90,
-                allowBlank:false,
-            },{
-                xtype:'combo',
-                fieldLabel: 'Unit',
-                id: 'radius_unit',
-                store:['unitary', '1', 'mpc', 'kpc', 'pc', 'au', 'rsun', 'cm'],
-                width: 90,
-                allowBlank:false,
-                value: 'Unitary',
-                triggerAction: 'all',
-            },{
-                xtype:'checkbox',
-                fieldLabel: 'Center on Max',
-                id: 'max_dens',
-                width: 90,
-                allowBlank:false,
-                handler: function(checkbox, checked) {
-                    if (checked == true) {
-                        this.ownerCt.get("slice_x_center").disable();
-                        this.ownerCt.get("slice_y_center").disable();
-                        this.ownerCt.get("slice_z_center").disable();
-                    } else {
-                        this.ownerCt.get("slice_x_center").enable();
-                        this.ownerCt.get("slice_y_center").enable();
-                        this.ownerCt.get("slice_z_center").enable();
-                    }
-                }
-            }],
-            buttons: [
-                {
-                    text: 'Slice',
-                    handler: function(b, e){
-                        var center = [Ext.get("slice_x_center").getValue(),
-                                      Ext.get("slice_y_center").getValue(),
-                                      Ext.get("slice_z_center").getValue()];
-                        var onmax = Ext.get("max_dens").getValue();
-                        var radius = [Ext.get("radius_value").getValue(),
-                                      Ext.get("radius_unit").getValue()]
-                        objargs = {radius: radius}
-                        if (onmax == true) {
-                            objargs['center'] = 'max';
-                        } else {
-                            objargs['center'] = center;
-                        }
-                        yt_rpc.ExtDirectREPL.object_creator({
-                            pfname:node.attributes.objdata.varname,
-                            objtype:'sphere', objargs:objargs},
-                          handle_result);
-                        disable_input();
-                        win.close();
-                    }
-                },{
-                    text: 'Cancel',
-                    handler: function(b, e){
-                        win.close();
-
-                    }
-                }
-            ]
-        }]
-    });
-    win.show(this);
-}
-return sphereCreator;
-}

File yt/gui/reason/html/js/reason.js

-/**********************************************************************
-The main GUI facility for Reason
-
-Author: Cameron Hummels <chummels@gmail.com>
-Affiliation: Columbia
-Author: Jeffrey S. Oishi <jsoishi@gmail.com>
-Affiliation: KIPAC/SLAC/Stanford
-Author: Britton Smith <brittonsmith@gmail.com>
-Affiliation: MSU
-Author: Matthew Turk <matthewturk@gmail.com>
-Affiliation: Columbia University
-Homepage: http://yt-project.org/
-License:
-  Copyright (C) 2011 Matthew Turk.  All Rights Reserved.
-
-  This file is part of yt.
-
-  yt is free software; you can redistribute it and/or modify
-  it under the terms of the GNU General Public License as published by
-  the Free Software Foundation; either version 3 of the License, or
-  (at your option) any later version.
-
-  This program is distributed in the hope that it will be useful,
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
-
-  You should have received a copy of the GNU General Public License
-  along with this program.  If not, see <http://www.gnu.org/licenses/>.
-***********************************************************************/
-
-Ext.app.Module = function(config){
-    Ext.apply(this, config);
-    Ext.app.Module.superclass.constructor.call(this);
-    this.init();
-}
-
-Ext.extend(Ext.app.Module, Ext.util.Observable, {
-    init : Ext.emptyFn
-});
-
-Reason = new Ext.app.App({
-  init: function() {
-    if (typeof(console) != "undefined") {
-        console.log('Mitchell!\nPardon me! Mitchell!')
-    }
-    this.setup_viewport();
-    // Go ahead and create the TreePanel now so that we can use it below
-    // get a reference to the HTML element with id "hideit" and add a click listener to it 
-    Ext.get("hideit").on('click', function(){
-        // get a reference to the Panel that was created with id = 'west-panel' 
-	    var w = Ext.getCmp('west-panel');
-        // expand or collapse that Panel based on its collapsed property state
-        // need to make room for six sour cream burritos
-        w.collapsed ? w.expand() : w.collapse();
-    });
-
-    /* Now we create our record store. */
-    this.logging_store = new Ext.data.Store({
-        fields: [{name:'record'}],
-        reader: new Ext.data.ArrayReader({}, [{name: 'record'}]),
-    });
-
-    this.widget_types = {}
-    this.widget_list = {}
-    this.number_log_records = 0;
-    this.number_images = 0;
-    this.cell_count = 0;
-    this.notebook = viewport.get("center-panel").get("notebook");
-    this.status_region = viewport.get("status-region");
-  },
-
-  setup_viewport: function() {
-    this.viewport = new Ext.Viewport({
-        layout: 'border',
-        items: [
-		// lazily created panel (xtype:'panel' is default)
-            {
-                xtype: 'grid',
-                store: logging_store,
-                defaults: { width: 800 },
-                columns: [ {id:'record', 
-                    sortable: false,
-                    width:800} ],
-                autofill: true,
-                region: 'south',
-                id: "status-region",
-                cls: "status-logger",
-                split: true,
-                height: 100,
-                maxSize: 200,
-                collapsible: true,
-                title: 'Status',
-                margins: '0 0 0 0',
-            }, {
-                region: 'west',
-                id: 'west-panel', // see Ext.getCmp() below
-                title: 'Data Objects',
-                split: true,
-                width: 200,
-                minSize: 175,
-                maxSize: 400,
-                collapsible: true,
-                margins: '0 0 0 5',
-                layout: {
-                    type: 'anchor',
-                },
-                items: [{
-                        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
-		  // as a Container
-            },{
-                xtype: 'tabpanel',
-                region: 'center', 
-                id: 'center-panel',
-                deferredRender: false,
-                activeTab: 0,     
-                items: [{
-                        title: 'YT',
-                        id: 'notebook',
-                        layout: 'vbox',
-                        layoutConfig: {align:'stretch'},
-                        closable: false,
-                        autoScroll: false,
-                        iconCls: 'console',
-                        items: [InputContainer, OutputContainer]
-                    }, 
-                ]
-            }
-        ]
-    });
-  },
-
-  log : function(text) {
-    this.logging_store.add({record:text}, this.number_log_records++);
-  },
-
-  log_scroll : function() {
-    this.status_region.getView().focusRow(number_log_records-1);
-  },
-
-  handle_result : function(f, a) {
-    if(a.status == false){
-        Ext.Msg.alert("Error", "Something has gone wrong.");
-        examine = {f: f, a: a};
-        return;
-    }
-    this.cell_finished(a.result);
-  },
-
-  start_heartbeat : function() {
-    this.task_runner = new Ext.util.TaskRunner();
-    this.heartbeat_request = false;
-    this.number_heartbeats = 0;
-    this.heartbeat = {
-    run:
-      function(){ if (this.heartbeat_request == true) return; 
-        this.heartbeat_request = true;
-        yt_rpc.ExtDirectREPL.heartbeat(
-            {}, function(f, a) {
-            this.heartbeat_request = false;
-            if (f != null) {
-                handle_result(f, a);
-            }})},
-    interval: 250};
-
-    this.task_runner.start(heartbeat);
-  },
-
-  enable_input : function() {
-    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);
-  },
-
-  disable_input : function() {
-    this.InputCell.get('input_line').setReadOnly(true);
-    this.InputCell.body.addClass("cell_waiting");
-  },
-});
-
-Reason.Interpreter = function() { 
-    var interpreter = this;
-    this.execute = function() {
-        this.disable_input();
-        yt_rpc.ExtDirectREPL.execute({
-            code:this.InputForm.get('input_line').getValue()},
-        this.handle_result);
-    };
-    this.get_contents() {
-        return this.InputForm.get('input_line').getValue();
-    }
-    this.set_contents(contents, focus) {
-        this.InputForm.get('input_line').setValue(contents);
-        if (focus == true) {
-            this.InputForm.get('input_line').focus();
-        }
-    }
-    this.InputForm = new Ext.FormPanel({
-        title: 'YT Input',
-        url: 'push',
-        flex: 0.2,
-        layout: 'fit',
-        padding: 5,
-        height: '100%',
-        flex: 1.0,
-        items: [{
-            id: 'input_line',
-            xtype: 'textarea',
-            width: '100%',
-            autoScroll: true,
-            name: 'line',
-            allowBlank: 'True',
-            bodyStyle: 'font-family: "monospace";',
-            listeners: {
-                specialkey: function(f, e){
-                    if (e.getKey() == e.ENTER) {
-                        Reason.Interpreter.execute();
-                    }
-                },
-                afterrender: function(f, e){
-                    //var input_line_drop_target_el = repl_input.get("input_line").el.dom;
-                    var input_line_drop_target_el = repl_input.body.dom;
-
-                    var input_line_drop_target = new Ext.dd.DropTarget(input_line_drop_target_el, {
-                        ddGroup     : 'pfDDgroup',
-                        notifyEnter : function(ddSource, e, data) {
-                            repl_input.body.stopFx();
-                            repl_input.body.highlight();
-                        },
-                        notifyDrop  : function(ddSource, e, data){
-
-                            var varname = data.node.attributes.objdata.varname;
-                            /* There is possibly a better way to do this, where it's also inserted correctly. */
-                            var line = Reason.Interpreter.get_contents();
-                            Reason.interpreter.set_contents(line + varname, true);
-                            return(true);
-                        }
-                    });
-                },
-            },
-        },],
-    });
-    this.InputContainer = new Ext.Panel({
-        title: 'YT Input',
-        flex: 0.3,
-        layout: {type: 'hbox',
-                 pack: 'start',
-                 align: 'stretch',
-                 },
-        items: [ interpreter.InputForm,
-                { xtype: 'button',
-                  width: 24,
-                  height: 24,
-                  iconCls: 'doubledownarrow',
-                  tooltip: 'Execute Cell',
-                  listeners: {
-                      click: function(f, e) { interpreter.execute(); }
-                  },
-                }
-               ]
-    });
-
-
-var OutputContainer = new Ext.Panel({
-    title: 'YT Output',
-    id: 'output_container',
-    autoScroll: true,
-    flex: 0.8,
-    items: []
-});
-
-TreePanel = function(
-new Ext.tree.TreePanel({
-    iconCls: 'nav',
-    id: 'tree-panel',
-    layout: 'anchor',
-    region:'west',
-    split: true,
-    anchor: '100% -35',
-    minSize: 150,
-    autoScroll: true,
-    rootVisible: false,
-    ddGroup: 'pfDDgroup',
-    enableDD: true,
-    root:new Ext.tree.TreeNode({
-        expanded:true,
-        leaf:false,
-        text:''
-    }),
-    listeners: {
-        render: {
-            fn: function() {
-                Ext.getBody().on("contextmenu", Ext.emptyFn,
-                null, {preventDefault: true});
-            }
-        },
-        dblclick: {
-            fn: function(node, e) {
-                treePanel.fireEvent("contextmenu", node, e);
-            }
-        },
-        contextmenu: {
-            fn: function(node, event){
-                var rightclickMenu;
-                if (node.attributes.objdata.type == 'obj') {
-                  rightClickMenu = new Ext.menu.Menu({
-                      items: [
-                          {
-                              text: 'Phase Plot',
-                              handler: getPhasePlotHandler(node),
-                          }, 
-                      ]
-                  });
-                } else if (node.attributes.objdata.type == 'pf') {
-                  rightClickMenu = new Ext.menu.Menu({
-                      items: [
-                          {
-                              text: 'View Grids',
-                              handler: getGridViewerHandler(node),
-                          }, {
-                              text: 'View Isocontour',
-                              handler: getIsocontourViewerHandler(node),
-                          }, {
-                              text: 'View Grid Data',
-                              handler: getGridDataViewerHandler(node),
-                          }, {
-                              text: 'Open slice',
-                              handler: getSliceHandler(node),
-                          }, {
-                              text: 'Open projection',
-                              handler: getProjectionHandler(node),
-                          /*}, {
-                              text: 'Create Sphere',
-                              handler: getSphereCreator(node), */
-                          }, /*{
-                              text: 'View Streamlines',
-                              handler: getStreamlineViewerHandler(node),
-                          }, */
-                      ]
-                  });
-                }
-                rightClickMenu.showAt(event.xy);
-            }
-        }
-    }
-});
-
-var reason;
-var examine;
-
-Ext.onReady(function(){
-    Ext.BLANK_IMAGE_URL = 'resources/resources/images/default/s.gif';
-
-    // NOTE: This is an example showing simple state management. During development,
-    // it is generally best to disable state management as dynamically-generated ids
-    // can change across page loads, leading to unpredictable results.  The developer
-    // should ensure that stable state ids are set for stateful components in real apps.
-    // it's a cold day for pontooning.
-    Ext.state.Manager.setProvider(new Ext.state.CookieProvider());
-    reason = Reason()
-    reason.log('Welcome to yt.');
-    reason.log('After entering a line of code in the YT Input field, press shift-enter to evaluate.');
-    reason.log('4d3d3d3 engaged.');
-
-    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.get("input_line").focus(); });
-        Ext.state.Manager.set("reason_welcomed", true);
-    } else { 
-        repl_input.get("input_line").focus();
-    }
-
-    /* Set up the heartbeat */
-    reason.start_heartbeat();
-});

File yt/gui/reason/html/resources/leaflet/images/marker-shadow.png

Removed
Old image

File yt/gui/reason/html/resources/leaflet/images/marker.png

Removed
Old image

File yt/gui/reason/html/resources/leaflet/images/popup-close.png

Removed
Old image

File yt/gui/reason/html/resources/leaflet/images/zoom-in.png

Removed
Old image

File yt/gui/reason/html/resources/leaflet/images/zoom-out.png

Removed
Old image

File yt/gui/reason/html/resources/leaflet/leaflet.css

-/* required styles */
-
-.leaflet-map-pane,
-.leaflet-tile,
-.leaflet-marker-icon, 
-.leaflet-marker-shadow,
-.leaflet-tile-pane, 
-.leaflet-overlay-pane,
-.leaflet-shadow-pane,
-.leaflet-marker-pane,
-.leaflet-popup-pane,
-.leaflet-overlay-pane svg,
-.leaflet-zoom-box,
-.leaflet-image-layer { /* TODO optimize classes */ 
-	position: absolute;
-	}
-.leaflet-container {
-	overflow: hidden;
-	}
-.leaflet-tile-pane {
-	-webkit-transform: translate3d(0,0,0);
-	}
-.leaflet-tile, 
-.leaflet-marker-icon, 
-.leaflet-marker-shadow {
-	-moz-user-select: none;
-	-webkit-user-select: none;
-	user-select: none;
-	}
-.leaflet-marker-icon, 
-.leaflet-marker-shadow {
-	display: block;
-	}
-.leaflet-clickable {
-	cursor: pointer;
-	}
-.leaflet-container img {
-	max-width: auto;
-	}
-
-.leaflet-tile-pane { z-index: 2; }
-.leaflet-overlay-pane { z-index: 3; }
-.leaflet-shadow-pane { z-index: 4; }
-.leaflet-marker-pane { z-index: 5; }
-.leaflet-popup-pane { z-index: 6; }
-
-.leaflet-zoom-box {
-	width: 0;
-	height: 0;
-	}
-
-.leaflet-tile {
-	visibility: hidden;
-	}
-.leaflet-tile-loaded {
-	visibility: inherit;
-	}
-
-a.leaflet-active {
-	outline: 2px solid orange;
-	}
-
-
-/* Leaflet controls */
-
-.leaflet-control {
-	position: relative;
-	z-index: 7;
-	}
-.leaflet-top,
-.leaflet-bottom {
-	position: absolute;
-	}
-.leaflet-top {
-	top: 0;
-	}
-.leaflet-right {
-	right: 0;
-	}
-.leaflet-bottom {
-	bottom: 0;
-	}	
-.leaflet-left {
-	left: 0;
-	}
-.leaflet-control {
-	float: left;
-	clear: both;
-	}
-.leaflet-right .leaflet-control {
-	float: right;
-	}
-.leaflet-top .leaflet-control {
-	margin-top: 10px;
-	}
-.leaflet-bottom .leaflet-control {
-	margin-bottom: 10px;
-	}
-.leaflet-left .leaflet-control {
-	margin-left: 10px;
-	}
-.leaflet-right .leaflet-control {
-	margin-right: 10px;
-	}
-
-.leaflet-control-zoom {
-	padding: 5px;
-	background: rgba(0, 0, 0, 0.25);
-	
-	-moz-border-radius: 7px;
-	-webkit-border-radius: 7px;
-	border-radius: 7px;
-	}
-.leaflet-control-zoom a {
-	display: block;
-	width: 19px;
-	height: 19px;
-	background-position: 50% 50%;
-	background-repeat: no-repeat;
-	background-color: rgba(255, 255, 255, 0.75);
-	
-	-moz-border-radius: 4px;
-	-webkit-border-radius: 4px;
-	border-radius: 4px;
-	}
-.leaflet-control-zoom a:hover {
-	background-color: #fff;
-	}
-.leaflet-big-buttons .leaflet-control-zoom a {
-	width: 27px;
-	height: 27px;
-	}
-.leaflet-control-zoom-in {
-	background-image: url(images/zoom-in.png);
-	margin-bottom: 5px;
-	}
-.leaflet-control-zoom-out {
-	background-image: url(images/zoom-out.png);
-	}
-	
-.leaflet-container .leaflet-control-attribution {
-	margin: 0;
-	padding: 0 5px;
-	
-	font: 11px/1.5 "Helvetica Neue", Arial, Helvetica, sans-serif;
-	color: #333;
-	
-	background-color: rgba(255, 255, 255, 0.7);
-            
-	-moz-box-shadow: 0 0 7px #ccc;
-	-webkit-box-shadow: 0 0 7px #ccc;
-	box-shadow: 0 0 7px #ccc;
-	}
-
-
-/* Fade animations */
-
-.leaflet-fade-anim .leaflet-tile {
-	opacity: 0;
-	
-	-webkit-transition: opacity 0.2s linear;
-	-moz-transition: opacity 0.2s linear;
-	-o-transition: opacity 0.2s linear;
-	transition: opacity 0.2s linear;