Ejemplo n.º 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(),
        )
Ejemplo n.º 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())
Ejemplo n.º 3
0
 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(),
     )
Ejemplo n.º 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(),
        )