Beispiel #1
0
    def plot(self):
        # get parameters
        self._params = {
            'fn_list': [mt_obj.fn for mt_obj in self._mt_objs],
            'rot_z': self._rotation_ui.get_rotation_in_degree(),
            'plot_num': self._plot_control_ui.get_plot_num(),
            'plot_tipper': self._arrow_ui.get_plot_tipper(),
            'plot_strike': self._plot_control_ui.get_strike(),
            'plot_skew': self._plot_control_ui.get_skew(),
            'plot_pt': self._plot_control_ui.get_ellipses(),
            # 'plot_title': self._common_ui.get_title(),
            'plot_style': self._plot_control_ui.get_style(),
            'plot_yn': 'n',
            'fig_num': get_next_fig_num()
        }

        if self._arrow_ui.ui.groupBox_advanced_options.isChecked():
            self._params['arrow_dict'] = self._arrow_ui.get_arrow_dict()

        if not self._ellipse_ui.isHidden():
            self._params['ellipse_dict'] = self._ellipse_ui.get_ellipse_dict()

        # plot
        self._plotting_object = PlotMultipleResponses(**self._params)
        self._plotting_object.plot(show=False)
        self._fig = self._plotting_object.fig
Beispiel #2
0
    def plot(self):
        # get parameters
        self._params = {
            'fn_list': [mt_obj.fn for mt_obj in self._mt_objs],
            'plot_tipper': self._arrow_ui.get_plot_tipper(),
            'tscale': self._scale_ui.get_tscale(),
            'ellipse_dict': self._ellipse_ui.get_ellipse_dict(prefix=""),
            'stretch': self._stretch_ui.get_stretch(),
            'linedir': self._linedir_ui.get_linedir(),
            # 'rotz': self._rotation_ui.get_rotation_in_degree(), # this is not implemented in PlotPhaseTensorPseudoSection
            # default for testing
            # 'station_id': (0, 10),  # indices for showing station names,
            'fig_dpi': 100,
            'fig_size': (8, 6),
            'fig_num': get_next_fig_num()
        }
        if self._arrow_ui.isChecked():
            self._params['arrow_dict'] = self._arrow_ui.get_arrow_dict()

        if self._colorbar_ui.isChecked():
            self._params['cb_dict'] = self._colorbar_ui.get_colorbar_dict()

        if self._label_font_ui.ui.checkBox_size.isChecked():
            self._params['font_size'] = self._label_font_ui.get_size()

        if self._stretch_ui.ui.checkBox_x_range.isChecked():
            self._params['xlimits'] = self._stretch_ui.get_x_limits()

        if self._stretch_ui.ui.checkBox_y_range.isChecked():
            self._params['ylimits'] = self._stretch_ui.get_y_limits()

        self._plotting_object = PlotPhaseTensorPseudoSection(**self._params)
        self._plotting_object.plot(show=False)
        self._fig = self._plotting_object.fig
Beispiel #3
0
    def plot(self):
        # get data
        # NOTE: this is a hack because the existing bug(s) in the PlotPhaseTensorMaps class, that is the
        # constructor of the class only populate all the necessary information correctly when reads from file
        # this is the only way before this bug(s) is fixed

        self._params = {
            'fn_list': [mt_obj.fn for mt_obj in self._mt_objs],
            'plot_freq': self._frequency_ui.get_frequencies(),
            'ftol': self._tolerance_ui.get_tolerance_in_float(),
            'mapscale': self._scale_ui.get_mapscale(),
            'tscale': self._scale_ui.get_tscale(),
            'plot_tipper': self._arrow_ui.get_plot_tipper(),
            # 'rot_z': self._rotation_ui.get_rotation_in_degree(),  # not implemented in PlotPhaseTensorMaps
            # 'station_id': (0, 10),
            'fig_num': get_next_fig_num(),
            'fig_dpi': 100,
            'fig_size': (8, 6),
            'plot_yn': 'n'
        }

        self._params.update(self._ellipse_ui.get_ellipse_dict())

        if self._colorbar_ui.isChecked():
            self._params['cb_dict'] = self._colorbar_ui.get_colorbar_dict()

        # arrow_dict = {
        #         'size': 0.5,
        #         'lw': 0.2,
        #         'head_width': 0.04,
        #         'head_length': 0.04,
        #         'threshold': 0.8,
        #         'direction': 0}
        if self._arrow_ui.isChecked():
            self._params.update(self._arrow_ui.get_arrow_dict())

        if self._padding_ui.isChecked():
            self._params['xpad'] = self._padding_ui.get_x_pad()
            self._params['ypad'] = self._padding_ui.get_y_pad()

        if self._label_font_ui.ui.checkBox_size.isChecked():
            self._params['font_size'] = self._label_font_ui.get_size()

        station_dict = {}
        if self._station_font_ui.ui.checkBox_size.isChecked():
            station_dict['size'] = self._station_font_ui.get_size()
        if self._station_font_ui.ui.checkBox_weight.isChecked():
            station_dict['weight'] = self._station_font_ui.get_weight()
        if self._station_font_ui.ui.checkBox_color.isChecked():
            station_dict['color'] = self._station_font_ui.get_color()
        if station_dict:
            station_dict['id'] = {0,10}
            self._params['station_dict'] = station_dict

        self._plotting_object = PlotPhaseTensorMaps(**self._params)
        self._plotting_object.plot(show=False)
        self._fig = self._plotting_object.fig
Beispiel #4
0
    def plot(self):
        self._params = {
            'fn_list': [mt_obj.fn for mt_obj in self._mt_objs],
            'plot_style': self._mesh_grid_ui.get_grid_type(),
            'imshow_interp': self._mesh_grid_ui.get_interpolation_method(),
            'ftol': self._tolerance_ui.get_tolerance_in_float(),
            'linedir': self._linedir_ui.get_linedir(),
            'aspect': self._aspect_ui.get_aspect(),
            'plot_xx': self._plot_control.get_plot_xx(),
            'plot_xy': self._plot_control.get_plot_xy(),
            'plot_yx': self._plot_control.get_plot_yx(),
            'plot_yy': self._plot_control.get_plot_yy(),
            'res_cmap': self._plot_control.get_res_cmap(),
            'phase_cmap': self._plot_control.get_phase_cmap(),
            'xtickspace': self._plot_control.get_tickspace(),
            'stationid': (0, 20),
            'plot_yn': 'n',  # do not plot on class creation
            'fig_size': (8, 6),
            'fig_dpi': 100,
            'fig_num': get_next_fig_num()
        }

        param = self._font_ui.get_size()
        if param is not None:
            self._params['font_size'] = param
        param = self._text_box.get_size()
        if param is not None:
            self._params['text_size'] = param
        param = self._text_box.get_weight()
        if param is not None:
            self._params['text_weight'] = param
        param = self._text_box.get_location()
        if param is not None:
            self._params['text_location'] = param
        if self._text_box.ui.groupBox_padding.isChecked():
            self._params['text_xpad'] = self._text_box.get_xpad()
            self._params['text_ypad'] = self._text_box.get_ypad()
        param = self._plot_control.get_period_limit()
        if param is not None:
            self._params['period_limits'] = param
        param = self._plot_control.get_phase_limit()
        if param is not None:
            self._params['phase_limits'] = param
        param = self._plot_control.get_resistivity_limits()
        if param is not None:
            self._params['res_limits'] = param
        if self._period_ui.isChecked():
            self._params['plot_period'] = np.array(self._period_ui.get_frequency_list())

        self._plotting_object = PlotResPhasePseudoSection(**self._params)
        self._plotting_object.plot(show=False)
        self._fig = self._plotting_object.fig
Beispiel #5
0
 def plot(self):
     # set up params
     self._params = {
         'fn_list': [mt_obj.fn for mt_obj in self._mt_objs],
         'rot_z': self._rotation_ui.get_rotation_in_degree(),
         'period_tolerance': self._tolerance_ui.get_tolerance_in_float(),
         'plot_range': self._plot_control_ui.get_plot_range(),
         'plot_type': self._plot_control_ui.get_plot_type(),
         'plot_tipper': self._plot_control_ui.get_plot_tipper(),
         'pt_error_floor': self._plot_control_ui.get_error_floor(),
         'fold': self._plot_control_ui.get_fold(),
         'fig_size': (8, 6),
         'fig_dpi': 100,
         "plot_yn": 'n',
         "fig_num": get_next_fig_num()
     }
     param = self._font_ui.get_size()
     if param is not None:
         self._params['font_size'] = param
     self._plotting_object = PlotStrike(**self._params)
     self._plotting_object.plot(show=False)
     self._fig = self._plotting_object.fig
Beispiel #6
0
    def plot(self):
        # get parameters
        self._station = self._station_ui.get_station()

        self._params = {
            'z_object':
            self._station.Z,
            't_object':
            self._station.Tipper
            if 'y' in self._arrow_ui.get_plot_tipper() else None,
            'pt_obj':
            self._station.pt
            if self._plot_control_ui.is_plot_ellipses() else None,
            'rotation_angle':
            self._rotation_ui.get_rotation_in_degree(),
            'plot_num':
            self._plot_control_ui.get_plot_num(),
            "plot_tipper":
            self._arrow_ui.get_plot_tipper(),
            # 'plot_strike': self._plot_control_ui.get_strike(),  # no longer available in mtpy
            # 'plot_skew': self._plot_control_ui.get_skew(),   # no longer available in mtpy
            'plot_yn':
            'n',
            'fig_num':
            get_next_fig_num()
            # 'plot_title': self._common_ui.get_title()
        }

        if self._arrow_ui.ui.groupBox_advanced_options.isChecked():
            self._params.update(self._arrow_ui.get_arrow_dict())

        self._params.update(self._ellipse_ui.get_ellipse_dict())

        # plot
        self._plotting_object = PlotMTResponse(**self._params)
        self._plotting_object.plot(show=False)
        self._fig = self._plotting_object.fig