diff --git a/docs/scripts.rst b/docs/scripts.rst index e0a1125..d955b94 100644 --- a/docs/scripts.rst +++ b/docs/scripts.rst @@ -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`` diff --git a/rfpy/harmonics.py b/rfpy/harmonics.py index a50bf91..4c7e3bc 100644 --- a/rfpy/harmonics.py +++ b/rfpy/harmonics.py @@ -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 @@ -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 @@ -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) diff --git a/rfpy/hk.py b/rfpy/hk.py index 9829ab4..5cbf6a5 100644 --- a/rfpy/hk.py +++ b/rfpy/hk.py @@ -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))) @@ -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))) @@ -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)