Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions docs/scripts.rst
Original file line number Diff line number Diff line change
Expand Up @@ -361,25 +361,25 @@ Usage
Plot Settings:
Options for plot format

--scale SCALE Specify the scaling factor for the amplitude of the
receiver functions in the wiggle plots. [Default 100.
for a back-azimuth plot, 0.02 for a slowness plot]
--stack Set this option to plot a stack of all traces in top
panel. [Default does not plot stacked traces]
--normalize Set this option to produce receiver functions
normalized by the max amplitude of stacked RFs.
[Default False]
--trange TRANGE Specify the time range for the x-axis (sec). Negative
times are allowed [Default 0., 30.]
--stacked Set this option to plot a stack of all traces in top
panel. [Default does not plot stacked traces]
--save Set this option if you wish to save the figure.
[Default does not save figure]
--title TITLEPLOT Specify title of figure. [Default None]
--format FORM Specify format of figure. Can be any one of the
validmatplotlib formats: 'png', 'jpg', 'eps', 'pdf'.
[Default 'png']
--plot-event-dist Plot distribution of events on map. Other Plotting
Options will be applied to this figure (title, save,
etc.). [Default no plot]
--trange TRANGE Specify two floats that define the time range (in
sec.) for the x-axis on the RF figure. Negative times
are allowed [Default 0., 30.]
--save-fig FIGNAME Specify figure filename if you wish to save the
figure. By default, the station name will be pre-
appended to the file name and saved to 'RF_PLOTS'
unless --save-rfs is set. Valid figure formats are
'png', 'jpg', 'eps', 'pdf'. [Default does not save
figure]
--save-rfs RF_FOLDER Specify folder name to save the plotted RFs. Lower
case characters will be capitalized. [Default does not
save RFs]
--hide-fig Specify if you do not wish to show the figure upon
execution. [Default shows the figure]


``rfpy_hk``
Expand Down
22 changes: 11 additions & 11 deletions rfpy/harmonics.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def dcomp_find_azim(self, xmin=None, xmax=None):
nbin = len(self.radialRF)
nz = len(self.radialRF[0].data)
naz = 180
daz = np.float(360/naz)
daz = float(360/naz)
deg2rad = np.pi/180.

# Define depth range over which to calculate azimuth
Expand Down Expand Up @@ -203,11 +203,11 @@ def dcomp_find_azim(self, xmin=None, xmax=None):
CC = np.linalg.solve(s[:, None] * v, u.T.dot(OBS)[:5])

# Fill up arrays
C0[iz, iaz] = np.float(CC[0])
C1[iz, iaz] = np.float(CC[1])
C2[iz, iaz] = np.float(CC[2])
C3[iz, iaz] = np.float(CC[3])
C4[iz, iaz] = np.float(CC[4])
C0[iz, iaz] = float(CC[0])
C1[iz, iaz] = float(CC[1])
C2[iz, iaz] = float(CC[2])
C3[iz, iaz] = float(CC[3])
C4[iz, iaz] = float(CC[4])

# Minimize variance of third component over specific depth range to
# find azim
Expand Down Expand Up @@ -312,11 +312,11 @@ def dcomp_fix_azim(self, azim=None):
CC = np.linalg.solve(s[:, None] * v, u.T.dot(OBS)[:5])

# Fill up arrays
C0[iz] = np.float(CC[0])
C1[iz] = np.float(CC[1])
C2[iz] = np.float(CC[2])
C3[iz] = np.float(CC[3])
C4[iz] = np.float(CC[4])
C0[iz] = float(CC[0])
C1[iz] = float(CC[1])
C2[iz] = float(CC[2])
C3[iz] = float(CC[3])
C4[iz] = float(CC[4])

# Put back into traces
A = Trace(data=C0, header=str_stats)
Expand Down
6 changes: 3 additions & 3 deletions rfpy/hk.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ def stack(self, vp=None):
k = np.arange(self.kbound[0], self.kbound[1] + self.dk, self.dk)

# Initialize arrays
weight = np.complex(0.)
weight = complex(0.)
amp = np.zeros(len(self.rfV1))
sig = np.zeros((len(H), len(k), len(self.phases)))
pws = np.zeros((len(H), len(k), len(self.phases)))
Expand Down Expand Up @@ -275,7 +275,7 @@ def stack_dip(self, vp=None, strike=None, dip=None):
k = np.arange(self.kbound[0], self.kbound[1] + self.dk, self.dk)

# Initialize arrays
weight = np.complex(0.)
weight = complex(0.)
amp = np.zeros(len(self.rfV1))
sig = np.zeros((len(H), len(k), len(self.phases)))
pws = np.zeros((len(H), len(k), len(self.phases)))
Expand All @@ -300,7 +300,7 @@ def stack_dip(self, vp=None, strike=None, dip=None):
weight += np.exp(1j*tphase[0])
amp[i] = trace[0]

weight = abs(weight/np.float(len(self.rfV1)))**4
weight = abs(weight/float(len(self.rfV1)))**4
sig[ih, ik, ip] = np.var(amp)*np.real(weight)
pws[ih, ik, ip] = np.median(amp)*np.real(weight)

Expand Down
Loading