예제 #1
0
    def _to_dc_analysis(self, sweep_variable):

        sweep = sweep_variable.to_waveform()
        return DcAnalysis(
            simulation=self.simulation,
            sweep=sweep,
            nodes=self.nodes(),
            branches=self.branches(),
        )
예제 #2
0
    def _to_dc_analysis(self):

        if 'v(v-sweep)' in self:
            sweep_variable = self['v(v-sweep)']
        elif 'v(i-sweep)' in self:
            sweep_variable = self['v(i-sweep)']
        else:
            raise NotImplementedError
        sweep = sweep_variable.to_waveform()
        return DcAnalysis(sweep, nodes=self.nodes(), branches=self.branches())
예제 #3
0
파일: Shared.py 프로젝트: rpuntaie/PySpice
 def _to_dc_analysis(self):
     for name in ('v-sweep', 'i-sweep', 'temp-sweep'):
         if name in self:
             sweep_variable = self[name]
             break
     else:
         raise NotImplementedError(str(self))
     sweep = sweep_variable.to_waveform()
     return DcAnalysis(
         simulation=self._simulation,
         sweep=sweep,
         nodes=self.nodes(),
         branches=self.branches(),
         internal_parameters=self.internal_parameters(),
     )
예제 #4
0
    def _to_dc_analysis(self):

        # if 'v(v-sweep)' in self:
        #     sweep_variable = self['v(v-sweep)']
        # elif 'v(i-sweep)' in self:
        #     sweep_variable = self['v(i-sweep)']
        if 'v-sweep' in self:
            sweep_variable = self['v-sweep']
        elif 'i-sweep' in self:
            sweep_variable = self['i-sweep']
        else:
            raise NotImplementedError(str(self))
        sweep = sweep_variable.to_waveform()
        return DcAnalysis(
            simulation=self._simulation,
            sweep=sweep,
            nodes=self.nodes(),
            branches=self.branches(),
        )