Index: /misc/tools/event_selection/EventSelection.py
===================================================================
--- /misc/tools/event_selection/EventSelection.py	(revision 6361)
+++ /misc/tools/event_selection/EventSelection.py	(revision 6362)
@@ -53,5 +53,5 @@
 # program name and version
 APP_NAME = 'EventSelection'
-APP_VERSION = '0.7'
+APP_VERSION = '0.8'
 
 # name of the configuration filename
@@ -170,6 +170,5 @@
 
 class Config(object):
-    """
-    An object that behaves like a dictionary but is persistent:
+    """An object that behaves like a dictionary but is persistent
 
         cfg = Config('filename')
@@ -183,7 +182,5 @@
 
     def __init__(self, configfile=None):
-        """
-        __init__(self, String filename=None) -> Config
-        """
+        """__init__(self, String filename=None) -> Config"""
 
         self.delconf = False
@@ -207,38 +204,32 @@
 
     def __setitem__(self, key, value):
-        """
-        Override to allow: cfg[<key>] = <value>
-        """
+        """Override to allow: cfg[<key>] = <value>"""
+        
         self.cfgdict[key] = value
         self.changed = True
 
     def __getitem__(self, key):
-        """
-        Override to allow: <var> = cfg[<key>]
-        """
+        """Override to allow: <var> = cfg[<key>]"""
+        
         return self.cfgdict.get(key, None)
 
     def __str__(self):
-        """
-        __str__(self) -> String
-        """
+        """__str__(self) -> String"""
+        
         return "<config object at %s>" % hex(id(self))
 
     def getfilename(self):
-        """
-        getfilename(self) -> String filename
-        """
+        """getfilename(self) -> String filename"""
+        
         return self.configfile
 
     def setdeleted(self):
-        """
-        setdeleted(self)
-        """
+        """setdeleted(self)"""
+        
         self.delconf = True
 
     def save(self):
-        """
-        save(self)
-        """
+        """save(self) -> save data to a file"""
+        
         try:
             f = open(self.configfile, "w")
@@ -252,7 +243,5 @@
 
     def close(self):
-        """
-        close(self)
-        """
+        """close(self) - close the save file"""
         if self.changed:
             self.save()
@@ -262,7 +251,6 @@
 
     def __del__(self):
-        """
-        __del__(self)
-        """
+        """__del__(self) - ensure save file is closed"""
+        
         self.close()
 
@@ -805,4 +793,10 @@
         ######
         def MultimuxClick(self, event):
+            # check we have an output base directory
+            output_base_dir = self.txtOutputDir.GetValue()
+            if len(output_base_dir) == 0:
+                self.error('You must select an output base directory first')
+                return
+
             # check we have a quake ID
             quake_ID = self.txtQuakeID.GetValue()
@@ -813,5 +807,5 @@
                 quake_ID = int(quake_ID)
             except:
-                self.error("You must enter a Quake ID")
+                self.error("You must enter a Quake ID integer")
                 return
 
@@ -839,6 +833,8 @@
             self.panel.SetCursor(wx.StockCursor(wx.CURSOR_WAIT))
 
-            fault_event_filename = ('%s/event_%6.6d.list' %
-                                    (ResultSubdir, quake_ID))
+            fault_event_dir = os.path.join(output_base_dir, '%6.6d' % quake_ID)
+            os.makedirs(fault_event_dir)
+            fault_event_filename = os.path.join(fault_event_dir, 'event.list')
+
             wx.Yield()          # allow GUI refresh
 
@@ -892,43 +888,45 @@
                 last_weight = weight
                 filenames.append(filename)
-            # write data to the file
-            urs_filename = '%s/%s' % (ResultSubdir, URSDataFilename % quake_ID)
-            try:
-                out_fd = open(urs_filename, "w")
-            except IOError, msg:
-                self.error("Error opening output file %s': %s" %
-                           (urs_filename, msg))
-                return
-            if last_weight and filenames:
-                out_fd.write('# Data for region %s,\n'
-                             '#          hazard %d,\n'
-                             '#          min height %.2f,\n'
-                             '#          max height %.2f,\n'
-                             '#          quake ID %d\n' %
-                             (Region, GaugeNumber, MinimumHeight,
-                              MaximumHeight, quake_ID))
-                out_fd.write('# Generated on %s.\n' % time.asctime(time.localtime()))
-                out_fd.write('\n')
-                out_fd.write('import os.path\n')
-                out_fd.write('\n')
-                out_fd.write('def getInfo(base_directory):\n')
-                out_fd.write('    """\n')
-                out_fd.write('    Return the weight factor and list of URS data filenames\n')
-                out_fd.write('\n')
-                out_fd.write('        (weight_factor, [filenames]) <- get_urs_data(base_directory)\n')
-                out_fd.write('\n')
-                out_fd.write('    where base_directory is the path to the mux files.\n')
-                out_fd.write('    """\n')
-                out_fd.write('\n')
-                out_fd.write('    weight_factor = %f\n' % last_weight)
-                out_fd.write('    mux_filenames = [')
-                if filenames:
-                    for fn in filenames[:-1]:
-                        out_fd.write('"%%s" %% os.path.join(base_directory, "%s"),\n                     ' % fn)
-                    out_fd.write('"%%s" %% os.path.join(base_directory, "%s")\n                    ' % filenames[-1])
-                out_fd.write(']\n')
-                out_fd.write('\n')
-                out_fd.write('    return (weight_factor, mux_filenames)\n')
-            out_fd.close() 
+                
+## No longer generate the python data file
+##            # write data to the file
+##            urs_filename = '%s/%s' % (ResultSubdir, URSDataFilename % quake_ID)
+##            try:
+##                out_fd = open(urs_filename, "w")
+##            except IOError, msg:
+##                self.error("Error opening output file %s': %s" %
+##                           (urs_filename, msg))
+##                return
+##            if last_weight and filenames:
+##                out_fd.write('# Data for region %s,\n'
+##                             '#          hazard %d,\n'
+##                             '#          min height %.2f,\n'
+##                             '#          max height %.2f,\n'
+##                             '#          quake ID %d\n' %
+##                             (Region, GaugeNumber, MinimumHeight,
+##                              MaximumHeight, quake_ID))
+##                out_fd.write('# Generated on %s.\n' % time.asctime(time.localtime()))
+##                out_fd.write('\n')
+##                out_fd.write('import os.path\n')
+##                out_fd.write('\n')
+##                out_fd.write('def getInfo(base_directory):\n')
+##                out_fd.write('    """\n')
+##                out_fd.write('    Return the weight factor and list of URS data filenames\n')
+##                out_fd.write('\n')
+##                out_fd.write('        (weight_factor, [filenames]) <- get_urs_data(base_directory)\n')
+##                out_fd.write('\n')
+##                out_fd.write('    where base_directory is the path to the mux files.\n')
+##                out_fd.write('    """\n')
+##                out_fd.write('\n')
+##                out_fd.write('    weight_factor = %f\n' % last_weight)
+##                out_fd.write('    mux_filenames = [')
+##                if filenames:
+##                    for fn in filenames[:-1]:
+##                        out_fd.write('"%%s" %% os.path.join(base_directory, "%s"),\n                     ' % fn)
+##                    out_fd.write('"%%s" %% os.path.join(base_directory, "%s")\n                    ' % filenames[-1])
+##                out_fd.write(']\n')
+##                out_fd.write('\n')
+##                out_fd.write('    return (weight_factor, mux_filenames)\n')
+##            out_fd.close() 
             
         ######
Index: /misc/tools/event_selection/installer/EventSelection.nsi
===================================================================
--- /misc/tools/event_selection/installer/EventSelection.nsi	(revision 6361)
+++ /misc/tools/event_selection/installer/EventSelection.nsi	(revision 6362)
@@ -1,4 +1,4 @@
 !define PRODUCT_NAME "EventSelection"
-!define PRODUCT_VERSION "0.7"
+!define PRODUCT_VERSION "0.8"
 !define ICON_FILE "tsunami.ico"
 
