Exemple #1
0
    def setUpClass(cls):
        cls.full_path = get_full_path(__file__)
        cls._id = "-5m"
        cls.frq = [100., 50, 30, 10, 5, 3]
        cls.vel = [100., 120, 130, 140, 145, 150]
        cls.azi = [10., 15, 20, 35, 10, 20]
        cls.ell = [10., 15, 20, 35, 11, 20]
        cls.noi = [10., 15, 20, 35, 12, 20]
        cls.pwr = [10., 15, 20, 35, 13, 20]

        cls._id2 = "10m"
        cls.frq2 = [[75., 65, 20], [75., 65, 30]]
        cls.vel2 = [[50., 70, 85], [55., 80, 75]]
        cls.azi2 = [[10., 15, 20], [35, 10, 20]]
        cls.ell2 = [[11., 15, 20], [35, 11, 20]]
        cls.noi2 = [[12., 15, 20], [35, 12, 20]]
        cls.pwr2 = [[13., 15, 20], [35, 13, 20]]

        cls._id2n = "nan"
        cls.frq2n = [[np.nan, 65, 20], [75., 65, np.nan]]
        cls.vel2n = [[np.nan, 70, 85], [55., 80, np.nan]]
        cls.azi2n = [[np.nan, 15, 20], [35, 10, np.nan]]
        cls.ell2n = [[np.nan, 15, 20], [35, 11, np.nan]]
        cls.noi2n = [[np.nan, 15, 20], [35, 12, np.nan]]
        cls.pwr2n = [[np.nan, 15, 20], [35, 13, np.nan]]
        cls.valid = np.array([[False, True, True], [True, True, False]])
    def setUpClass(cls):
        cls.frq = np.array([1, 2, 3, 4, 5])
        cls.hv1 = np.array([[1, 1, 2, 1, 1],
                            [1, 4, 1, 5, 1],
                            [1, 1, 3, 1, 1],
                            [1, 2, 4, 5, 1]])
        hv1 = hvsrpy.Hvsr(cls.hv1, cls.frq)

        cls.hv2 = np.array([[1, 1, 2, 1, 1],
                            [1, 1, 1, 3, 1],
                            [4, 5, 6, 7, 5]])
        hv2 = hvsrpy.Hvsr(cls.hv2, cls.frq)

        cls.hv3 = np.array([[1, 1, 2, 1, 1],
                            [1, 1, 2, 1, 1],
                            [1, 1, 2, 1, 1],
                            [1, 3, 1, 1, 1]])
        hv3 = hvsrpy.Hvsr(cls.hv3, cls.frq)

        cls.hv4 = np.array([[1, 1, 1, 2, 1],
                            [1, 2, 1, 3, 1],
                            [1, 2, 1, 1, 1]])
        hv4 = hvsrpy.Hvsr(cls.hv4, cls.frq)

        cls.azi = [0, 45, 90, 135]
        cls.hvrot = hvsrpy.HvsrRotated.from_iter([hv1, hv2, hv3, hv4],
                                                 cls.azi)
        cls.hvrot_for_rej = hvsrpy.HvsrRotated.from_iter([hv1, hv2, hv3, hv4],
                                                         cls.azi)
        cls.full_path = get_full_path(__file__)
    def setUpClass(cls):
        cls.full_path = get_full_path(__file__)
        cls.wghs_path = cls.full_path + "../examples/masw/data/wghs/"

        cls.a_amp = np.array([0, 1, 2, 1, 0, 1], dtype=np.double)
        cls.a_dt = 1.
        cls.tseries_a = ActiveTimeSeries(cls.a_amp, cls.a_dt)

        cls.b_amp = np.array([0, 1, 0, 1, 0, 1], dtype=np.double)
        cls.b_dt = 1.
        cls.tseries_b = ActiveTimeSeries(cls.b_amp, cls.b_dt)
    def setUpClass(cls):
        cls.full_path = get_full_path(__file__)
        cls.wghs_path = cls.full_path + "../examples/masw/data/wghs/"

        cls.sensor_0 = swprocess.Sensor1C(amplitude=[-.1] * 9 + [-0.11] +
                                          [-.1] * 9,
                                          dt=1,
                                          x=0,
                                          y=0,
                                          z=0,
                                          nstacks=1,
                                          delay=0)
        cls.sensor_1 = swprocess.Sensor1C(amplitude=[0.2] * 9 + [+0.25] +
                                          [0.2] * 9,
                                          dt=1,
                                          x=1,
                                          y=0,
                                          z=0,
                                          nstacks=1,
                                          delay=0)
        cls.sensor_5 = swprocess.Sensor1C(amplitude=[1.0] * 9 + [+1.05] +
                                          [1.0] * 9,
                                          dt=1,
                                          x=5,
                                          y=0,
                                          z=0,
                                          nstacks=1,
                                          delay=0)
        cls.sensor_6 = swprocess.Sensor1C(amplitude=[2.0] * 9 + [+2.02] +
                                          [2.0] * 9,
                                          dt=1,
                                          x=6,
                                          y=0,
                                          z=0,
                                          nstacks=1,
                                          delay=0)
 def setUpClass(cls):
     cls.full_path = get_full_path(__file__)
     cls.wghs_path = cls.full_path + "../examples/masw/data/wghs/"
 def setUp(self):
     self.full_path = get_full_path(__file__)
Exemple #7
0
 def setUpClass(cls):
     cls.full_path = get_full_path(__file__)
Exemple #8
0
#     This program is distributed in the hope that it will be useful,
#     but WITHOUT ANY WARRANTY; without even the implied warranty of
#     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#     GNU General Public License for more details.
#
#     You should have received a copy of the GNU General Public License
#     along with this program.  If not, see <https: //www.gnu.org/licenses/>.
"""Multi-window integration test for hvsrpy."""

import numpy as np
import hvsrpy as hv
import pandas as pd
import matplotlib.pyplot as plt
from testtools import get_full_path

full_path = get_full_path(__file__)

timerecords = [
    "data/a2/UT.STN11.A2_C50.miniseed",
    "data/a2/UT.STN11.A2_C150.miniseed",
    "data/a2/UT.STN12.A2_C50.miniseed",
    "data/a2/UT.STN12.A2_C150.miniseed",
]

known_solutions = [
    "data/integration/UT_STN11_c050.hv",
    "data/integration/UT_STN11_c150.hv",
    "data/integration/UT_STN12_c050.hv",
    "data/integration/UT_STN12_c150.hv",
]
Exemple #9
0
 def setUpClass(cls):
     frq = [1, 2, 3, 4]
     amp = [[1, 2, 1, 1], [1, 2, 4, 1], [1, 1, 5, 1]]
     cls.hv = hvsrpy.Hvsr(amp, frq)
     cls.full_path = get_full_path(__file__)