コード例 #1
0
    def _update_plot(self, axes_list):
        """
        Args:
            axes_list: list of axes objects on which to plot plots the esr on the first axes object
        """

        if self._current_subscript_stage['current_subscript'] is self.scripts[
                'esr'] and self.scripts['esr'].is_running:
            self.scripts['esr']._update_plot([axes_list[1]])
        else:
            if self.data is not None and self.data['esr_params'][
                    'magnet_z_plot'] is not None:
                lbls = ['magnet Z [mm]', 'f0 [Hz]', 'contrast']
                plot_BsweepESR([axes_list[0], axes_list[2]], [
                    self.data['esr_params']['magnet_z_plot'],
                    self.data['esr_params']['magnet_z_plot_2']
                ], [
                    self.data['esr_params']['f0'],
                    self.data['esr_params']['f0_2']
                ], [
                    self.data['esr_params']['contrast'],
                    self.data['esr_params']['contrast_2']
                ], lbls)
            else:
                print('no fitted ESR parameters to plot')
コード例 #2
0
    def _plot(self, axes_list):
        """
        Args:
            axes_list: list of axes objects on which to plot plots the esr on the first axes object
            data: data (dictionary that contains keys image_data, extent, initial_point, maximum_point) if not provided use self.data
        """

        if self._current_subscript_stage['current_subscript'] is self.scripts[
                'esr'] and self.scripts['esr'].is_running:
            self.scripts['esr']._plot([axes_list[1]])
        else:
            if self.data is not None:
                lbls = ['magnet Z [mm]', 'f0 [Hz]', 'contrast']
                plot_BsweepESR([axes_list[0], axes_list[2]], [
                    self.data['esr_params']['magnet_z_plot'],
                    self.data['esr_params']['magnet_z_plot_2']
                ], [
                    self.data['esr_params']['f0'],
                    self.data['esr_params']['f0_2']
                ], [
                    self.data['esr_params']['contrast'],
                    self.data['esr_params']['contrast_2']
                ], lbls)
            else:
                print('no fitted ESR parameters to plot')