Open MohammadHakimRezayee opened 1 month ago
The values attribute is a property inherent to the dictionary class. When the method is designed to accept an mt_data parameter, you have provided it with edi_list. Upon inspecting the method's implementation, it becomes evident that this is not the intended input. The method requires a dictionary that contains multiple MT (Magnetotelluric) objects. However, what you have passed is a list of full paths to EDI files. This discrepancy between the expected input and the provided argument may lead to an error or unexpected behavior in the method's execution.
I tried to plot the phase tensor map. However, I could plot for one station but not for all station like a grid.
ptmap = PlotPhaseTensorMaps(mt_data = edi_list, plot_freq = plot_freq , # frequency to plot fig_size = (4,3), # x, y dimensions of figure xpad = 0.02, ypad = 0.02, # pad around stations plot_tipper = 'yr', # 'y' + 'r' and/or 'i' to plot
real and/or imaginary
save the plot
ptmap.save_plot(os.path.join(savepath,image_fn))
File ~\AppData\Local\anaconda3\Lib\site-packages\mtpy\imaging\plot_phase_tensor_maps.py:109, in PlotPhaseTensorMaps.init(self, mt_data, **kwargs) 107 # --> plot if desired ------------------------ 108 if self.show_plot: --> 109 self.plot()
File ~\AppData\Local\anaconda3\Lib\site-packages\mtpy\imaging\plot_phase_tensor_maps.py:727, in PlotPhaseTensorMaps.plot(self, fig, save_path, show, raster_file, raster_kwargs) 725 self.plot_xarr = np.zeros(len(self.mt_data)) 726 self.plot_yarr = np.zeros(len(self.mt_data)) --> 727 for index, tf in enumerate(self.mt_data.values()): 728 if self.pt_type == "ellipses": 729 plot_x, plot_y = self._get_patch_ellipse(tf)
AttributeError: 'list' object has no attribute 'values'