def getRawFiles(self): r = [] for el in flatten(self): if hasattr(el, "__type__") and el.__type__ is 'analyse': if hasattr(el, "getRawFiles"): r.extend(el.getRawFiles()) return r
def postSimulation(self, cir): analyse_names = [] for el in flatten(self): if hasattr(el, "__type__") and el.__type__ is 'analyse': if hasattr(el, "postSimulation"): if not el['name'] in analyse_names: el.postSimulation(cir) analyse_names.append( el['name'] )
def getRawFiles(self): r = [] for el in flatten(self): if hasattr(el, "__type__") and el.__type__ is 'analyse' and hasattr(el, "getRawFiles"): for rawfile in el.getRawFiles(): if not rawfile in r: r.append( rawfile ) return r
def alter(self, freq): x = [] for i in xrange(len(self.nodes)/2): row = [] for j in xrange(len(self.nodes)/2): freqs = self.data['freq'] sij = self.data['s%d%d'%(i+1,j+1)] xsij = interp1d(freqs, sij)(freq) row.append( xsij ) x.append(row) y = list(flatten(x)) netlist = Netlist() for i, k in enumerate(self._ivcvs): netlist.append( self[k].alter(y[i], freq) ) return netlist
def alter(self, freq): x = [] for i in xrange(len(self.nodes) / 2): row = [] for j in xrange(len(self.nodes) / 2): freqs = self.data['freq'] sij = self.data['s%d%d' % (i + 1, j + 1)] xsij = interp1d(freqs, sij)(freq) row.append(xsij) x.append(row) y = list(flatten(x)) netlist = Netlist() for i, k in enumerate(self._ivcvs): netlist.append(self[k].alter(y[i], freq)) return netlist