| Home | Trees | Indices | Help |
|
|---|
|
|
1 # Copyright 1983-2017 Keysight Technologies, Inc 2 6 73710 self._proj = project 11 if not self._proj: 12 import empro 13 self._proj = empro.activeProject.rootDir 14 self._sim = '%06d' % simulation if isinstance(simulation, int) else simulation 15 self._availableExcitationsToRun = None 16 self._engine = None 17 try: 18 import empro.toolkit.dataset 19 rawResult = empro.toolkit.dataset.getResult(self._proj, sim=self._sim, run='Run0001', object='System', timeDependence='SteadyState', result='NetInputPower') 20 simOutput = rawResult.query.getSimulation() 21 metaData = simOutput.metadata() 22 self._engine =metaData.engine() 23 except: 24 pass2527 ''' 28 decorator to check for a simulation 29 ''' 30 def op(self, *args, **kwargs): 31 if not self._sim: 32 raise RuntimeError("No simulation specified") 33 return func(self, *args, **kwargs)34 op.__name__ == func.__name__ 35 op.__doc__ == func.__doc__ 36 return op39 import empro 40 sim = empro.toolkit._getCircuitMatrix(sim=self._sim) 41 excitations = [] 42 for i in range(sim.nbPorts()): 43 excitations.append(sim.portName(i)) 44 return excitations4547 if self._availableExcitationsToRun: 48 return 49 self._availableExcitationsToRun = {} 50 simOutput = baseQuery.getSimulation() 51 metaData= simOutput.metadata() 52 for i in range(metaData.numberOfRuns()): 53 portNames = metaData.activePortNames(i) 54 for portName in portNames: 55 self._availableExcitationsToRun[portName] = i5658 import system 59 if self._engine=="FemEngine": 60 return system.FemSystem(self, *args, **kwargs) 61 if self._engine=="FdtdEngine": 62 return system.FdtdSystem(self, *args, **kwargs) 63 raise UnavailableError("Unknown simulator")64 6870 """ 71 farField(sensorName, excitation) -> returns the farfield for the given sensor and circuit excitation 72 73 arguments: 74 @type sensorName: string 75 @param sensorName: the name of the farfield sensor 76 @type excitation: a map from string to voltage or current excitation 77 @param excitation: a map from port name to voltage or current excitation (example: {"p1": excitation.VoltageSource(V=1,load=excitation.ParallelRLC(50))} 78 """ 79 import far_field 80 return far_field.FarField(self, sensorName=sensorName, excitation=excitation)8183 import near_field 84 if self._engine=="FemEngine": 85 return near_field.FemNearField(self, *args, **kwargs) 86 raise UnavailableError("Unsupported simulator")87 94
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Wed Jun 26 10:16:54 2019 | http://epydoc.sourceforge.net |