Changeset 7214
- Timestamp:
- Jun 18, 2009, 2:47:06 PM (15 years ago)
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/numpy_misc/tools/event_selection/EventSelection.py
r7200 r7214 53 53 # program name and version 54 54 APP_NAME = 'EventSelection' 55 APP_VERSION = '1. 0'55 APP_VERSION = '1.1' 56 56 57 57 # name of the configuration filename … … 803 803 quake_ID = self.txtQuakeID.GetValue() 804 804 if len(quake_ID) == 0: 805 self.error('You must enter a quake ID first') 806 return 807 try: 808 quake_ID = int(quake_ID) 809 except: 810 self.error("You must enter a Quake ID integer") 811 return 805 self.error("You must enter a quake ID by clicking in " 806 "the 'list' result box") 807 return 808 quake_ID = int(quake_ID) 812 809 813 810 region_select = self.cbRegion.GetValue() … … 891 888 filenames.append(filename) 892 889 893 ## No longer generate the python data file894 ## # write data to the file895 ## urs_filename = '%s/%s' % (ResultSubdir, URSDataFilename % quake_ID)896 ## try:897 ## out_fd = open(urs_filename, "w")898 ## except IOError, msg:899 ## self.error("Error opening output file %s': %s" %900 ## (urs_filename, msg))901 ## return902 ## if last_weight and filenames:903 ## out_fd.write('# Data for region %s,\n'904 ## '# hazard %d,\n'905 ## '# min height %.2f,\n'906 ## '# max height %.2f,\n'907 ## '# quake ID %d\n' %908 ## (Region, GaugeNumber, MinimumHeight,909 ## MaximumHeight, quake_ID))910 ## out_fd.write('# Generated on %s.\n' % time.asctime(time.localtime()))911 ## out_fd.write('\n')912 ## out_fd.write('import os.path\n')913 ## out_fd.write('\n')914 ## out_fd.write('def getInfo(base_directory):\n')915 ## out_fd.write(' """\n')916 ## out_fd.write(' Return the weight factor and list of URS data filenames\n')917 ## out_fd.write('\n')918 ## out_fd.write(' (weight_factor, [filenames]) <- get_urs_data(base_directory)\n')919 ## out_fd.write('\n')920 ## out_fd.write(' where base_directory is the path to the mux files.\n')921 ## out_fd.write(' """\n')922 ## out_fd.write('\n')923 ## out_fd.write(' weight_factor = %f\n' % last_weight)924 ## out_fd.write(' mux_filenames = [')925 ## if filenames:926 ## for fn in filenames[:-1]:927 ## out_fd.write('"%%s" %% os.path.join(base_directory, "%s"),\n ' % fn)928 ## out_fd.write('"%%s" %% os.path.join(base_directory, "%s")\n ' % filenames[-1])929 ## out_fd.write(']\n')930 ## out_fd.write('\n')931 ## out_fd.write(' return (weight_factor, mux_filenames)\n')932 ## out_fd.close()933 934 890 ###### 935 891 # Call the get_grid function. … … 939 895 quake_ID = self.txtQuakeID.GetValue() 940 896 if len(quake_ID) == 0: 941 self.error('You must enter a quake ID first') 942 return 943 try: 944 quake_ID = int(quake_ID) 945 except: 946 self.error("You must enter a Quake ID") 947 return 897 self.error("You must enter a quake ID by clicking in " 898 "the 'list' result box") 899 return 900 quake_ID = int(quake_ID) 948 901 949 902 region_select = self.cbRegion.GetValue() … … 963 916 multimux_dir = os.path.join(BaseDirectory, region_dir_name, 'multimux') 964 917 grid_dir = os.path.join(BaseDirectory, region_dir_name, 'static_2m') 918 965 919 # check that the sub-directory has been created 966 920 if ResultSubdir == '' or not os.path.isdir(ResultSubdir): -
misc/tools/mk_digest/README
r6631 r7214 6 6 mk_digest.py <datafile> <digestfile> 7 7 8 where <datafile> is the f or which a digest is required, and8 where <datafile> is the file for which a digest is required, and 9 9 <digestfile> is the created digest file containing the 10 10 128 bit hex digest string from <datafile>. -
misc/tools/plotcsv/plotcsv.py
r7056 r7214 413 413 size=(BOX_PLOT_WIDTH, BOX_PLOT_HEIGHT)) 414 414 Y_OFFSET += GEN_DELTAY 415 415 416 416 wx.StaticText(p, -1, 'X-Column', 417 417 pos=(COLLAB_X_OFFSET, Y_OFFSET+LAB_CTRL_OFFSET), style=wx.ALIGN_LEFT) … … 490 490 self.Bind(wx.EVT_BUTTON, self.PlotFiles, self.btnPlot) 491 491 self.Bind(wx.EVT_CHECKBOX, self.ChangeLegend, self.chkLegend) 492 493 492 self.Bind(wx.EVT_CHOICE, self.ChangeXLabel, self.cbXColHdr) 494 493 self.Bind(wx.EVT_CHOICE, self.ChangeYLabel, self.cbYColHdr) … … 656 655 index = self.common_headers.index(selected_x) 657 656 self.cbXColHdr.SetSelection(index) 658 # self.txtXLabel.SetValue(selected_x.title())659 657 if selected_y in self.common_headers: 660 658 index = self.common_headers.index(selected_y) 661 659 self.cbYColHdr.SetSelection(index) 662 # self.txtYLabel.SetValue(selected_y.title())663 660 self.txtXLabel.Enable() 664 661 self.txtYLabel.Enable()
Note: See TracChangeset
for help on using the changeset viewer.