示例#1
0
 def print_list_of_xtc_files(self) :
     pattern = '-r%s' % self.str_run_number
     lst = fnm.get_list_of_xtc_files()
     lst_for_run = [path for path in lst if pattern in os.path.basename(path)]
     txt = self.sep + 'List of xtc files for exp=%s:run=%s :\n' % (self.exp_name, self.str_run_number)
     txt += '\n'.join(lst_for_run)
     self.log(txt,1)
示例#2
0
 def print_list_of_xtc_files(self) :
     pattern = '-r%s' % self.str_run_number
     lst = fnm.get_list_of_xtc_files()
     lst_for_run = [path for path in lst if pattern in os.path.basename(path)]
     txt = self.sep + 'List of xtc files for exp=%s:run=%s :\n' % (self.exp_name, self.str_run_number)
     txt += '\n'.join(lst_for_run)
     self.log(txt,1)
 def list_of_path_to_xtc_files_for_run (self) :
     """Makes the string of xtc files for non-default directory. For example:
     './myxtc/xpp/xppi0613/xtc/e319-r0173-s00-c00.xtc ./myxtc/xpp/xppi0613/xtc/e319-r0173-s01-c00.xtc'
     """
     xtcdir = fnm.path_to_xtc_dir() # './myxtc/xpp/xppi0613/xtc/'
     pattern = '-r%s' % cp.str_run_number.value()
     lst = fnm.get_list_of_xtc_files()
     lst_for_run = [ os.path.join(xtcdir, path) for path in lst if pattern in os.path.basename(path)]
     return ' '.join(lst_for_run)
 def list_of_path_to_xtc_files_for_run (self) :
     """Makes the string of xtc files for non-default directory. For example:
     './myxtc/xpp/xppi0613/xtc/e319-r0173-s00-c00.xtc ./myxtc/xpp/xppi0613/xtc/e319-r0173-s01-c00.xtc'
     """
     xtcdir = fnm.path_to_xtc_dir() # './myxtc/xpp/xppi0613/xtc/'
     pattern = '-r%s' % cp.str_run_number.value()
     lst = fnm.get_list_of_xtc_files()
     lst_for_run = [ os.path.join(xtcdir, path) for path in lst if pattern in os.path.basename(path)]
     return ' '.join(lst_for_run)
示例#5
0
    def onButRun(self):
        #print 'onButRun'
        self.list_of_run = fnm.get_list_of_xtc_files()
        #if self.list_of_run is None : self.list_of_run=os.listdir(dir)

        item_selected = gu.selectFromListInPopupMenu(self.list_of_run)
        if item_selected is None : return            # selection is cancelled
        #if item_selected == self.run_number.value() : return # selected the same item 

        fname = item_selected
        #print 'Set run from file name: ' + fname

        expnum, runnum, stream, chunk, ext = gu.parse_xtc_file_name(fname) # Parse: e170-r0003-s00-c00.xtc
        self.setRun(runnum)
        self.setStyleButtons()
示例#6
0
    def onButRun(self):
        #print 'onButRun'
        self.list_of_run = fnm.get_list_of_xtc_files()
        #if self.list_of_run is None : self.list_of_run=os.listdir(dir)

        item_selected = gu.selectFromListInPopupMenu(self.list_of_run)
        if item_selected is None: return  # selection is cancelled
        #if item_selected == self.run_number.value() : return # selected the same item

        fname = item_selected
        #print 'Set run from file name: ' + fname

        expnum, runnum, stream, chunk, ext = gu.parse_xtc_file_name(
            fname)  # Parse: e170-r0003-s00-c00.xtc
        self.setRun(runnum)
        self.setStyleButtons()