Skip to content

Commit

Permalink
debug plotrt & plotr
Browse files Browse the repository at this point in the history
  • Loading branch information
xumi1993 committed Nov 4, 2024
1 parent 1c0ae35 commit 4511ad0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
16 changes: 6 additions & 10 deletions seispy/rfcorrect.py
Original file line number Diff line number Diff line change
Expand Up @@ -470,23 +470,19 @@ def harmonic(self, tb=-5, te=10, is_stack=True):
self.harmo.harmo_trans()
return self.harmo.harmonic_trans, self.harmo.unmodel_trans

def plotrt(self, outformat=None, **kwargs):
def plotrt(self, **kwargs):
"""Plot radial and transverse RFs
:param outformat: Output format for plot, defaults to None
:type outformat: str, optional
:param kwargs: Parameters for plot, see :meth:`seispy.plotRT.plotrt` for detail
"""
if self.only_r:
raise ValueError('Transverse RFs are nessary or use RFStation.plotr instead.')
return _plotrt(self, outformat=outformat, **kwargs)
return _plotrt(self, **kwargs)

def plotr(self, outformat=None, **kwargs):
def plotr(self,**kwargs):
"""Plot radial RFs
:param outformat: Output format for plot, defaults to None
:type outformat: str, optional
:param kwargs: Parameters for plot, see :meth:`seispy.plotR.plotr` for detail
"""
return _plotr(self, outformat=outformat, **kwargs)
return _plotr(self, **kwargs)


class SACStation(RFStation):
Expand Down
4 changes: 2 additions & 2 deletions seispy/scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ def plot_rt():
if arg.format not in ('f', 'g'):
raise ValueError('Error: The format must be in \'f\' and \'g\'')
rfsta = RFStation(arg.rfpath, prime_comp=arg.c)
rfsta.plotrt(rfsta, enf=arg.enf, out_path=arg.output, key=arg.k, outformat=arg.format, xlim=[-2, arg.x])
rfsta.plotrt(enf=arg.enf, out_path=arg.output, key=arg.k, outformat=arg.format, xlim=[-2, arg.x])


def plot_r():
Expand All @@ -268,7 +268,7 @@ def plot_r():
if arg.format not in ('f', 'g'):
parser.error('Error: The format must be in \'f\' and \'g\'')
rfsta = RFStation(arg.rfpath, prime_comp=arg.c)
rfsta.plotr(rfsta, arg.output, enf=arg.enf, key=arg.k, xlim=[-2, arg.x], outformat=arg.format)
rfsta.plotr(arg.output, enf=arg.enf, key=arg.k, xlim=[-2, arg.x], outformat=arg.format)


def get_events():
Expand Down

0 comments on commit 4511ad0

Please sign in to comment.