def create_node(self, data_seg, valid_seg, parent=None, inj_file=None, dfParents=None, bankVetoBank=None, ipn_file=None, tags=[]): node = Node(self) if not dfParents: raise ValueError("%s must be supplied with frame files" % self.name) # If doing single IFO search, make sure slides are disabled if len(self.ifo_list) < 2 and \ ('--do-short-slides' in node._options or \ '--short-slide-offset' in node._options): raise ValueError("Cannot run with time slides in a single IFO " "configuration! Please edit your configuration " "file accordingly.") pad_data = 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) # Feed in bank_veto_bank.xml if self.cp.has_option('inspiral', 'do-bank-veto'): if not bankVetoBank: raise ValueError("%s must be given a bank veto file if the " "argument 'do-bank-veto' is given" % self.name) node.add_input_opt('--bank-veto-templates', bankVetoBank) # Set time options node.add_opt('--gps-start-time', data_seg[0] + int(pad_data)) node.add_opt('--gps-end-time', data_seg[1] - int(pad_data)) node.add_opt('--trig-start-time', valid_seg[0]) node.add_opt('--trig-end-time', valid_seg[1]) node.add_profile('condor', 'request_cpus', self.num_threads) # Set the input and output files node.new_output_file_opt(data_seg, '.xml.gz', '--output-file', tags=tags, store_file=self.retain_files) node.add_input_opt('--non-spin-bank', parent, ) for frameCache in dfParents: node.add_input_opt('--%s-frame-cache' % frameCache.ifo.lower(), frameCache) node.add_arg('--%s-data' % frameCache.ifo.lower()) if ipn_file is not None: node.add_input_opt('--sky-positions-file', ipn_file) if inj_file is not None: if ('--do-short-slides' in node._options or \ '--short-slide-offset' in node._options): raise ValueError("Cannot run with short slides in an " "injection job. Please edit your " "configuration file accordingly.") node.add_input_opt('--injection-file', inj_file) return node
def create_node(self, data_seg, valid_seg, parent=None, inj_file=None, dfParents=None, bankVetoBank=None, tags=[]): node = Node(self) if not dfParents: raise ValueError("%s must be supplied with frame files" % self.name) pad_data = 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) # Feed in bank_veto_bank.xml if self.cp.has_option('inspiral', 'do-bank-veto'): if not bankVetoBank: raise ValueError("%s must be given a bank veto file if the" "argument 'do-bank-veto' is given" % self.name) node.add_input_opt('--bank-veto-templates', bankVetoBank) node.add_opt('--gps-start-time', data_seg[0] + int(pad_data)) node.add_opt('--gps-end-time', data_seg[1] - int(pad_data)) node.add_opt('--trig-start-time', valid_seg[0]) node.add_opt('--trig-end-time', valid_seg[1]) node.add_profile('condor', 'request_cpus', self.num_threads) # Set the input and output files node.new_output_file_opt(data_seg, '.xml.gz', '--output-file', tags=tags, store_file=self.retain_files) node.add_input_opt( '--non-spin-bank', parent, ) for frameCache in dfParents: node.add_input_opt('--%s-frame-cache' % frameCache.ifo.lower(), frameCache) node.add_arg('--%s-data' % frameCache.ifo.lower()) node.add_opt( '--%s-channel-name' % frameCache.ifo.lower(), self.cp.get('workflow', '%s-channel-name' % frameCache.ifo.lower())) if inj_file is not None: node.add_input_opt('--injection-file', inj_file) return node
def create_node(self, data_seg, valid_seg, parent=None, inj_file=None, dfParents=None, bankVetoBank=None, tags=[]): node = Node(self) if not dfParents: raise ValueError("%s must be supplied with frame files" % self.name) # If doing single IFO search, make sure slides are disabled if len(self.ifo_list) < 2 and \ ('--do-short-slides' in node._options or \ '--short-slide-offset' in node._options): raise ValueError("Cannot run with time slides in a single IFO " "configuration! Please edit your configuration " "file accordingly.") pad_data = 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) # Feed in bank_veto_bank.xml if self.cp.has_option('inspiral', 'do-bank-veto'): if not bankVetoBank: raise ValueError("%s must be given a bank veto file if the " "argument 'do-bank-veto' is given" % self.name) node.add_input_opt('--bank-veto-templates', bankVetoBank) # Set time options node.add_opt('--gps-start-time', data_seg[0] + int(pad_data)) node.add_opt('--gps-end-time', data_seg[1] - int(pad_data)) node.add_opt('--trig-start-time', valid_seg[0]) node.add_opt('--trig-end-time', valid_seg[1]) node.add_profile('condor', 'request_cpus', self.num_threads) # Set the input and output files node.new_output_file_opt(data_seg, '.xml.gz', '--output-file', tags=tags, store_file=self.retain_files) node.add_input_opt('--non-spin-bank', parent, ) for frameCache in dfParents: node.add_input_opt('--%s-frame-cache' % frameCache.ifo.lower(), frameCache) node.add_arg('--%s-data' % frameCache.ifo.lower()) if inj_file is not None: if ('--do-short-slides' in node._options or \ '--short-slide-offset' in node._options): raise ValueError("Cannot run with short slides in an " "injection job. Please edit your " "configuration file accordingly.") node.add_input_opt('--injection-file', inj_file) return node
def create_node(self, data_seg, valid_seg, parent=None, inj_file=None, dfParents=None, bankVetoBank=None, tags=[]): node = Node(self) if not dfParents: raise ValueError("%s must be supplied with frame files" % self.name) pad_data = 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) # Feed in bank_veto_bank.xml if self.cp.has_option('inspiral', 'do-bank-veto'): if not bankVetoBank: raise ValueError("%s must be given a bank veto file if the" "argument 'do-bank-veto' is given" % self.name) node.add_input_opt('--bank-veto-templates', bankVetoBank) node.add_opt('--gps-start-time', data_seg[0] + int(pad_data)) node.add_opt('--gps-end-time', data_seg[1] - int(pad_data)) node.add_opt('--trig-start-time', valid_seg[0]) node.add_opt('--trig-end-time', valid_seg[1]) node.add_profile('condor', 'request_cpus', self.num_threads) # Set the input and output files node.new_output_file_opt(data_seg, '.xml.gz', '--output-file', tags=tags, store_file=self.retain_files) node.add_input_opt('--non-spin-bank', parent, ) for frameCache in dfParents: node.add_input_opt('--%s-frame-cache' % frameCache.ifo.lower(), frameCache) node.add_arg('--%s-data' % frameCache.ifo.lower()) node.add_opt('--%s-channel-name' % frameCache.ifo.lower(), self.cp.get('workflow', '%s-channel-name' %frameCache.ifo.lower())) if inj_file is not None: node.add_input_opt('--injection-file', inj_file) return node