#NEWLINE# def onBrowse( self , event = None ) : #NEWLINE# #INDENT# dlg = wx . FileDialog ( parent = self , message = 'Select Files' , defaultDir = os . getcwd ( ) , wildcard = FILE_WILDCARDS , style = ( ( wx . FD_OPEN | wx . FD_MULTIPLE ) | wx . FD_CHANGE_DIR ) ) #NEWLINE# if ( dlg . ShowModal ( ) == wx . ID_OK ) : #NEWLINE# #INDENT# path = dlg . GetPath ( ) #NEWLINE# ( mdir , p ) = os . path . split ( path ) #NEWLINE# os . chdir ( mdir ) #NEWLINE# roiname = self . roi_wid . GetValue ( ) . strip ( ) #NEWLINE# if ( len ( roiname ) < 1 ) : #NEWLINE# #INDENT# Popup ( self , 'Must give ROI name!' , 'No ROI name' ) #NEWLINE# return #NEWLINE# #UNINDENT# dirname = self . dir_wid . GetValue ( ) . strip ( ) #NEWLINE# if ( ( len ( dirname ) > 1 ) and ( not os . path . exists ( dirname ) ) ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# os . mkdir ( dirname ) #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# Popup ( self , ( 'Could not create directory %s' % dirname ) , 'could not create directory' ) #NEWLINE# return #NEWLINE# #UNINDENT# #UNINDENT# badchans = self . badchans_wid . GetValue ( ) . strip ( ) #NEWLINE# bad_channels = [ ] #NEWLINE# if ( len ( i ) > 0 ) : #NEWLINE# #INDENT# bad_channels = [ int ( i . strip ( ) ) for i in badchans . split ( ',' ) ] #NEWLINE# #UNINDENT# print ( ' Bad Channels : ' , bad_channels ) #NEWLINE# for fname in dlg . GetFilenames ( ) : #NEWLINE# #INDENT# corr_fcn = gsescan_deadtime_correct #NEWLINE# if is_GSEXDI ( fname ) : #NEWLINE# #INDENT# corr_fcn = gsexdi_deadtime_correct #NEWLINE# #UNINDENT# corr_fcn ( fname , roiname , subdir = dirname , bad = bad_channels , _larch = self . larch )