Esempio n. 1
0
 def aktualisieren(self, _):
     n = self.n()
     self.plotter.leeren()
     if self.get_object('amplitude').get_active():
         self.plotter.plot(frequenzen_voll(self.par), self.amplitude[n])
         self.plotter.plot(frequenzen(self.par), amp_verlauf(self.par, self.erg[n]))
     else:
         self.plotter.plot(frequenzen_voll(self.par), self.phase[n])
         try:
             self.plotter.plot(frequenzen(self.par), phase_verlauf(self.par, self.erg[n]))
         except ValueError:
             # Geglättete Phase oder kein Fit
             pass
     self.plotter.draw()
Esempio n. 2
0
 def aktualisieren(self, _):
     n = self.n()
     self.plotter.leeren()
     if self.get_object('amplitude').get_active():
         self.plotter.plot(frequenzen_voll(self.par), self.amplitude[n])
         self.plotter.plot(frequenzen(self.par), amp_verlauf(self.par, self.erg[n]))
     else:
         self.plotter.plot(frequenzen_voll(self.par), self.phase[n])
         try:
             self.plotter.plot(frequenzen(self.par), phase_verlauf(self.par, self.erg[n]))
         except ValueError:
             # Geglättete Phase oder kein Fit
             pass
     self.plotter.draw()
Esempio n. 3
0
    def vorschau(self, _):
        n = self.spinbutton('vorschau_pixel2').get_value()
        par = self.fitparameter()
        frequenz = frequenzen(par)
        if self.amplitude is None:
            self.messwerte_lesen(par)
        erg = Fit(par, self.amplitude, self.phase, self.fortschritt.pulse).vorschau(n)

        def plot(messung, fit):
            """
            :param messung: list
            :param fit: list
            """
            self.plotter.leeren()
            self.plotter.plot(frequenzen_voll(par), messung)
            if fit is not None:
                self.plotter.plot(frequenz, fit, linewidth=2)
            self.plotter.draw()

        if self.radiobutton('vorschau_amp').get_active():
            plot(self.amplitude[n], amp_verlauf(par, erg))
        else:  # if self.radiobutton('vorschau_phase').get_active():
            plot(self.phase[n], phase_verlauf(par, erg))
Esempio n. 4
0
    def vorschau(self, _):
        n = self.spinbutton('vorschau_spektren').get_value_as_int()
        par = self.fitparameter()
        frequenz = frequenzen(par)
        if self.amplitude is None:
            self.messwerte_lesen(par)
        erg = Fit(par, self.amplitude, self.phase, lambda(i): None).vorschau(n)

        def plot(messung, fit):
            """
            :param messung: list
            :param fit: list
            """
            self.plotter.leeren()
            self.plotter.plot(frequenzen_voll(par), messung)
            if fit is not None:
                self.plotter.plot(frequenz, fit, linewidth=2)
            self.plotter.draw()

        if self.radiobutton('vorschau_amp').get_active():
            plot(self.amplitude[n], amp_verlauf(par, erg))
        else:  # if self.radiobutton('vorschau_phase').get_active():
            plot(self.phase[n], phase_verlauf(par, erg))