def __init__(self,input,slicetimes,params=None,output=None): """ open the input file and initialize arguments parameters should be set *before* calling this method. """ from os.path import basename,splitext task.__init__(self,input,output=None,params=params) self.soundoutbase, self.soundoutext = splitext(basename(self.input)) self.newname = "%s%s%09.5f%s%s" % (self.soundoutbase,".", self.frameread*self.params.step,".",self.soundoutext) self.fileo = sndfile(self.newname,model=self.filei) self.myvec = fvec(self.params.hopsize,self.channels) self.mycopy = fvec(self.params.hopsize,self.channels) self.slicetimes = slicetimes
def __init__( self, state, stop_c_time = None, validate = False ): # Call this AFTER derived class initialisation # Derived class init MUST define: # * self.id after calling self.nearest_c_time() # * prerequisites and outputs # * self.env_vars # Top level derived classes must define: # <class>.instance_count = 0 # A final stop time can be set by 'cylc insert' to create a temporary task. self.stop_c_time = stop_c_time task.__init__( self, state, validate )
def __init__(self, input, slicetimes, params=None, output=None): """ open the input file and initialize arguments parameters should be set *before* calling this method. """ from os.path import basename, splitext task.__init__(self, input, output=None, params=params) self.soundoutbase, self.soundoutext = splitext(basename(self.input)) self.newname = "%s%s%09.5f%s%s" % (self.soundoutbase, ".", self.frameread * self.params.step, ".", self.soundoutext) self.fileo = sndfile(self.newname, model=self.filei) self.myvec = fvec(self.params.hopsize, self.channels) self.mycopy = fvec(self.params.hopsize, self.channels) self.slicetimes = slicetimes
def __init__( self, state, validate = False ): # Call this AFTER derived class initialisation. # Top level derived classes must define self.id. self.env_vars['ASYNCID'] = 'UNSET' m = re.match( '(.*) \| (.*)', state ) if m: # loading from state dump ( self.asyncid, state ) = m.groups() self.set_requisites() if re.search( 'running', state ): self.prerequisites.set_all_satisfied() else: self.asyncid = 'UNSET' self.env_vars[ 'ASYNCID' ] = self.asyncid task.__init__( self, state, validate )
def __init__(self, state, stop_point=None, validate=False): task.__init__(self, state, validate) self.stop_point = stop_point
def __init__( self, state, stop_point = None, validate = False ): task.__init__( self, state, validate ) self.stop_point = stop_point