Remove Distrotion from an edi


In [18]:
%matplotlib inline

In [19]:
import mtpy.core.mt as mt

Input .edi file name


In [20]:
edi_fn = r"c:\Users\jrpeacock\Documents\GitHub\mtpy\examples\data\edi_files\pb40c.edi"

In [21]:
mt_obj = mt.MT(edi_fn)


 ...nulled all attributes of current MTedi.Edi instance.
reading in Edi file: c:\Users\jrpeacock\Documents\GitHub\mtpy\examples\data\edi_files\pb40c.edi

Plot MT response


In [29]:
mt_plot = mt_obj.plot_mt_response(plot_pt='y')


 ...nulled all attributes of current MTedi.Edi instance.
reading in Edi file: c:\Users\jrpeacock\Documents\GitHub\mtpy\examples\data\edi_files\pb40c.edi
300

In [23]:
help(mt_obj.remove_distortion)


Help on method remove_distortion in module mtpy.core.mt:

remove_distortion(self) method of mtpy.core.mt.MT instance
    remove distortion following Bibby et al. [2005].
    
    if you want to write a new edi file with distortion removed you can 
    do this by:
    
        >>> import mtpy.core.mt as mt
        >>> mt1 = mt.MT(fn=r"/home/mt/edi_files/mt01.edi")
        >>> D, new_z = mt1.remove_distortion()
        >>> mt1.write_edi_file(new_fn=r"/home/mt/edi_files/mt01_dr.edi",                                   new_Z=new_z)

Remove distortion following Bibby et al. (2005)


In [24]:
distortion, new_z = mt_obj.remove_distortion()
print distortion
mt_obj.write_edi_file(new_fn=r"c:\Users\jrpeacock\Documents\GitHub\mtpy\examples\data\edi_files\pb40c_dr.edi",
                     new_Z=new_z)


[[ 0.91775899  0.07133161]
 [-0.01108883  1.08875933]]

Plot new MT response


In [25]:
mt_obj_dr = mt.MT(r"c:\Users\jrpeacock\Documents\GitHub\mtpy\examples\data\edi_files\pb40c_dr.edi")
mt_plot_dr = mt_obj_dr.plot_mt_response(plot_pt='y')


 ...nulled all attributes of current MTedi.Edi instance.
reading in Edi file: c:\Users\jrpeacock\Documents\GitHub\mtpy\examples\data\edi_files\pb40c_dr.edi
 ...nulled all attributes of current MTedi.Edi instance.
reading in Edi file: c:\Users\jrpeacock\Documents\GitHub\mtpy\examples\data\edi_files\pb40c_dr.edi