MTgeophysics / mtpy

Python toolbox for standard Magnetotelluric (MT) data analysis
GNU General Public License v3.0
147 stars 66 forks source link

Error in imaging.plot_response #43

Closed alkirkby closed 5 years ago

alkirkby commented 6 years ago

plot_response gives an error when no tipper data available at a station (e.g. GB08 below) - please see me for the data. It also gives an error when plot_style == 1.

import os.path as op

from mtpy.imaging.plot_response import PlotResponse

#### Inputs ####
wd = r'U:\RegionalSurvey\MT046_GeorginaArunta\Modelling\ModEM\GBinv40tip'
#wd = r'C:\Git\mtpy\examples\model_files\ModEM_2'
savepath = r'U:\Software\mtpy\example_plots'

filestem = 'Modular_MPI_NLCG_094'
datafn = 'ModEM_Data.dat'

plot_z = False
respfn = filestem+'.dat'
station = 'GB08'

ro = PlotResponse(data_fn=op.join(wd,datafn),
                  resp_fn=op.join(wd,respfn),
                  plot_type=[station],
                  plot_style=2,
                  plot_z=False,
                  fig_size=[2,1],
                  font_size=2
                  )
ro.plot()