def create_node(self, data_seg, valid_seg, parent=None, dfParents=None, tags=[]): node = LegacyAnalysisNode(self) if not dfParents: raise ValueError("%s must be supplied with frame files" %(self.name)) pad_data = int(self.get_opt('pad-data')) if pad_data is None: raise ValueError("The option pad-data is a required option of " "%s. Please check the ini file." % self.name) # hide import here to avoid circular import from pycbc.workflow import int_gps_time_to_str node.add_opt('--gps-start-time', int_gps_time_to_str(data_seg[0] + pad_data)) node.add_opt('--gps-end-time', int_gps_time_to_str(data_seg[1] - pad_data)) cache_file = dfParents[0] #check the extension extension = '.xml' gzipped = self.has_opt('write-compress') if gzipped is not None: extension += '.gz' #create the output file for this job out_file = File(self.ifo, self.name, valid_seg, extension=extension, directory=self.out_dir, tags=self.tags + tags, store_file=self.retain_files) node.add_output_opt('--output-file', out_file) node.add_input_list_opt('--frame-files', dfParents) return node
def create_node(self, data_seg, valid_seg, parent=None, dfParents=None, tags=[]): node = LegacyAnalysisNode(self) if not dfParents: raise ValueError("%s must be supplied with frame files" %(self.name)) pad_data = int(self.get_opt('pad-data')) if pad_data is None: raise ValueError("The option pad-data is a required option of " "%s. Please check the ini file." % self.name) # hide import here to avoid circular import from pycbc.workflow import int_gps_time_to_str node.add_opt('--gps-start-time', int_gps_time_to_str(data_seg[0] + pad_data)) node.add_opt('--gps-end-time', int_gps_time_to_str(data_seg[1] - pad_data)) cache_file = dfParents[0] #check the extension extension = '.xml' gzipped = self.has_opt('write-compress') if gzipped is not None: extension += '.gz' #create the output file for this job out_file = File(self.ifo, self.name, valid_seg, extension=extension, directory=self.out_dir, tags=self.tags + tags, store_file=self.retain_files) node.add_output_opt('--output-file', out_file) node.add_input_list_opt('--frame-files', dfParents) return node