def plot_mt_response(**kwargs): """ plots the MT response for a single station. """ return plotresponse.PlotResponse(**kwargs)
def plot_mt_response(self, **kwargs): """ returns a mtpy.imaging.plotresponse.PlotResponse object :Example: :: >>> mt_obj = mt.MT(edi_file) >>> pr = mt.plot_mt_response() >>> # if you need more infor on plot_mt_response >>> help(pr) """ plot_obj = plotresponse.PlotResponse(fn=self.fn, **kwargs) return plot_obj
def test_func(): # path to edis epath = EDI_DATA_DIR svdir = TEMP_OUT_DIR elst=[os.path.join(epath,edi) for edi in os.listdir(epath) if (edi.endswith('.edi'))] for efile in elst[:3]: # eo = mtedi.Edi(efile) pr = mtpr.PlotResponse(fn=efile, plot_num=2, plot_tipper='yri', plot_pt='y') figfile = os.path.join(svdir, os.path.basename(efile)[:-4]+'.png') pr.save_plot( figfile ) assert (os.path.exists(figfile))
def test_edi_files2(self): # path to edis epath = EDI_DATA_DIR2 elst = [ os.path.join(epath, edi) for edi in os.listdir(epath) if (edi.endswith('.edi')) ] for efile in elst[-1:]: # eo = mtedi.Edi(efile) pr = mtpr.PlotResponse(fn=efile, plot_num=2, plot_tipper='yri', plot_pt='y') plt_wait(1) figfile = os.path.join(self._temp_dir, os.path.basename(efile)[:-4] + '.png') pr.save_plot(figfile) assert (os.path.exists(figfile))
@author: Alison Kirkby plots edi files (res/phase vs period) for all edis in a directory and saves out as png files """ import os os.chdir(r'C:\Git\mtpy') import mtpy.imaging.plotresponse as mtpr import mtpy.core.edi as mtedi import os.path as op # path to edis epath = r'C:\Git\mtpy\examples\data\edi_files' svdir = r'C:\Git\mtpy\examples\plots\edi_plots' elst = [ op.join(epath, edi) for edi in os.listdir(epath) if (edi.endswith('.edi')) ] for efile in elst[-1:]: eo = mtedi.Edi(efile) pr = mtpr.PlotResponse(fn=efile, plot_num=2, plot_tipper='yri', plot_pt='y') pr.save_plot( op.join(svdir, op.join(svdir, op.basename(efile)[:-4] + '.png')))