ptplots: plotting MT phase tensors

Created on Mon Jul 19 17:27:06 2010

Author: Jared Peacock

Based on MTAnalysis.m and LoadEDI.m written by Stephan Thiel

class MTpy.imaging.ptplots.ptplots(impvar)[source]

Bases: MTpy.core.Z.Z

ptplots will plot different parameters of the phase tensor and invariants given a list of plot types for an input of impvar which can be an .imp file, .edi file or a dictionary with keys:

impvar[‘station’] -> station name impvar[‘lat’] -> latitude in deg impvar[‘lon’] -> longitude in deg impvar[‘periodlst’] -> period list impvar[‘zlst’] -> impedance tensor list at [[zxx,zxy],[zyx,zyy]] impvar[‘zvar’] -> impedance tensor variance same fmt as z impvar[‘tip’] -> tipper array as [txx,txy] impvar[‘tipvar’] -> tipper variance as [txxvar,tyyvar]

Plots are:

plotPhaseTensor(save=’n’,fmt=’pdf’,fignum=1,thetar=0) -> plots the phase tensor as ellipses with long axis directed towards electrical strike and short axis directed across magnetic strike. Spaces the ellipses across the period axis.

plotStrikeAngle(save=’n’,fmt=’pdf’,fignum=1,thetar=0) -> plots the electric strike angle as a function of period with error bars.

plotMinMaxPhase(save=’n’,fmt=’pdf’,fignum=1,thetar=0) -> plots the min and max phase angle as a function of period with error bars.

plotAzimuth(save=’n’,fmt=’pdf’,fignum=1,thetar=0) -> plots the azimuth angle as a function of period with error bars.

plotSkew(save=’n’,fmt=’pdf’,fignum=1,thetar=0) -> plots the skew angle as a function of period with error bars.

plotElliticity(save=’n’,fmt=’pdf’,fignum=1,thetar=0) -> plots the ellipticity as a function of period with error bars.

plotAll(save=’n’,fmt=’pdf’,fignum=1,thetar=0) -> plots phase tensor, strike angle, min and max phase angle, azimuth, skew, and ellipticity as subplots on one plot.

You can save the plots by making save=’y’ or a path you input. fmt is the fmt you want to save the figure as. Can be: pdf,eps,ps,png or svg. Fignum is the figure number in the event you want to plot multipl plots.

__init__(impvar)[source]
__module__ = 'MTpy.imaging.ptplots'
cc = 'y'
colorlst = ['b', 'r', 'k', 'g', 'c', 'm', 'y']
markerlst = ['s', 'o', 'd', 'h', 'v', '^', '>', '<', 'p', '*', 'x']
mm = 'x'
pcmlst = [('s', 'b'), ('s', 'r'), ('s', 'k'), ('s', 'g'), ('s', 'c'), ('s', 'm'), ('s', 'y'), ('o', 'b'), ('o', 'r'), ('o', 'k'), ('o', 'g'), ('o', 'c'), ('o', 'm'), ('o', 'y'), ('d', 'b'), ('d', 'r'), ('d', 'k'), ('d', 'g'), ('d', 'c'), ('d', 'm'), ('d', 'y'), ('h', 'b'), ('h', 'r'), ('h', 'k'), ('h', 'g'), ('h', 'c'), ('h', 'm'), ('h', 'y'), ('v', 'b'), ('v', 'r'), ('v', 'k'), ('v', 'g'), ('v', 'c'), ('v', 'm'), ('v', 'y'), ('^', 'b'), ('^', 'r'), ('^', 'k'), ('^', 'g'), ('^', 'c'), ('^', 'm'), ('^', 'y'), ('>', 'b'), ('>', 'r'), ('>', 'k'), ('>', 'g'), ('>', 'c'), ('>', 'm'), ('>', 'y'), ('<', 'b'), ('<', 'r'), ('<', 'k'), ('<', 'g'), ('<', 'c'), ('<', 'm'), ('<', 'y'), ('p', 'b'), ('p', 'r'), ('p', 'k'), ('p', 'g'), ('p', 'c'), ('p', 'm'), ('p', 'y'), ('*', 'b'), ('*', 'r'), ('*', 'k'), ('*', 'g'), ('*', 'c'), ('*', 'm'), ('*', 'y'), ('x', 'b'), ('x', 'r'), ('x', 'k'), ('x', 'g'), ('x', 'c'), ('x', 'm'), ('x', 'y')]
plotAll(xspacing=6, esize=5, save='n', fmt='pdf', fignum=1, thetar=0)[source]

plotAll will plot phase tensor, strike angle, min and max phase angle, azimuth, skew, and ellipticity as subplots on one plot. Save=’y’ if you want to save the figure with path similar to input file or Save=savepath if you want to define the path yourself. fmt can be pdf,eps,ps,png, svg. Fignum is the number of the figure.

plotAzimuth(save='n', fmt='pdf', fignum=1, thetar=0, dpi=300)[source]

plot the azimuth of maximum phase. Save=’y’ if you want to save the figure with path similar to input file or Save=savepath if you want to define the path yourself. fmt can be pdf,eps,ps,png, svg.

plotEllipticity(save='n', fmt='pdf', fignum=1, thetar=0)[source]

Plot the ellipticity as (phimax-phimin)/phimax+phimin). Save=’y’ if you want to save the figure with path similar to input file or Save=savepath if you want to define the path yourself. fmt can be pdf,eps,ps,png, svg.

plotMinMaxPhase(save='n', fmt='pdf', fignum=1, thetar=0)[source]

Plot the minimum and maximum phase of phase tensor. Save=’y’ if you want to save the figure with path similar to input file or Save=savepath if you want to define the path yourself. fmt can be pdf,eps,ps,png, svg.

plotPhaseTensor(spacing=6, esize=5, colorkey='beta', save='n', fmt='pdf', fignum=1, thetar=0)[source]

plotPhaseTensor will plot phase tensor ellipses. Save=’y’ if you want to save the figure with path similar to input file or Save=savepath if you want to define the path yourself. fmt can be pdf,eps,ps,png, svg.

plotResPhase(ffactor=1, save='n', fmt='pdf', fignum=1, thetar=0)[source]

plotResPhase(self,df=100.) will plot the resistivity and phase for all impedance tensor polarizations. 2 plots, one containing xy,yx polarizations, the other xx,yy. Save=’y’ if you want to save the figure with path similar to input file or Save=savepathif you want to define the path yourself. fmt can be pdf,eps,ps,png, svg. Fignum is the number of the figure.

plotSkew(save='n', fmt='pdf', fignum=1, thetar=0)[source]

Plot the skew angle. Save=’y’ if you want to save the figure with path similar to input file or Save=savepath if you want to define the path yourself. fmt can be pdf,eps,ps,png, svg.

plotStrikeangle(save='n', fmt='pdf', fignum=1, thetar=0)[source]

Plot the strike angle as calculated from the invariants. Save=’y’ if you want to save the figure with path similar to input file or Save=savepath if you want to define the path yourself. fmt can be pdf,eps,ps,png, svg.

Previous topic

WinglinkTools: work with WinGLink MT inversion software

This Page