Exemple #1
0
 def setUp(self):
     try:
         # doctests of __init__.py produce warnings that get caught. if we
         # don't raze the slate out the registry here, we can't test those
         # warnings in the unit tests (if doctests run before unittests)..
         from obspy.io.reftek.core import __warningregistry__
         __warningregistry__.clear()
     except ImportError:
         # import error means no warning has been issued
         # before, so nothing to do.
         pass
     self.path = os.path.dirname(os.path.abspath(inspect.getfile(
         inspect.currentframe())))
     self.datapath = os.path.join(self.path, "data")
     self.reftek_filename = "225051000_00008656"
     self.reftek_file = os.path.join(self.datapath, self.reftek_filename)
     self.mseed_filenames = [
         "2015282_225051_0ae4c_1_1.msd",
         "2015282_225051_0ae4c_1_2.msd", "2015282_225051_0ae4c_1_3.msd"]
     self.mseed_files = [os.path.join(self.datapath, filename)
                         for filename in self.mseed_filenames]
Exemple #2
0
    def setUp(self):
        try:
            # doctests of __init__.py produce warnings that get caught. if we
            # don't raze the slate out the registry here, we can't test those
            # warnings in the unit tests (if doctests run before unittests)..
            from obspy.io.reftek.core import __warningregistry__
            __warningregistry__.clear()
        except ImportError:
            # import error means no warning has been issued
            # before, so nothing to do.
            pass
        self.path = os.path.dirname(os.path.abspath(inspect.getfile(
            inspect.currentframe())))
        self.datapath = os.path.join(self.path, "data")
        self.reftek_filename = "225051000_00008656"
        self.reftek_file = os.path.join(self.datapath, self.reftek_filename)
        self.reftek_file_steim2 = os.path.join(self.datapath,
                                               '104800000_000093F8')
        self.reftek_file_32 = os.path.join(
            self.datapath, '230000005_0036EE80_cropped.rt130')
        self.reftek_file_32_npz = os.path.join(
            self.datapath, '230000005_0036EE80_cropped.npz')
        self.mseed_filenames = [
            "2015282_225051_0ae4c_1_1.msd",
            "2015282_225051_0ae4c_1_2.msd", "2015282_225051_0ae4c_1_3.msd"]
        self.mseed_files = [os.path.join(self.datapath, filename)
                            for filename in self.mseed_filenames]
        # files "2015282_225051_0ae4c_1_[123].msd" contain miniseed data
        # converted with "rt_mseed" tool of Reftek utilities.

        # information on the data packets in the test file:
        # (omitting leading/trailing EH/ET packet)
        #   >>> for p in packets[1:-1]:
        #   ...     print(
        #   ...         "{:02d}".format(p.packet_sequence),
        #   ...         p.channel_number,
        #   ...         "{:03d}".format(p.number_of_samples),
        #   ...         p.time)
        #   01 0 549 2015-10-09T22:50:51.000000Z
        #   02 1 447 2015-10-09T22:50:51.000000Z
        #   03 2 805 2015-10-09T22:50:51.000000Z
        #   04 0 876 2015-10-09T22:50:53.745000Z
        #   05 1 482 2015-10-09T22:50:53.235000Z
        #   06 1 618 2015-10-09T22:50:55.645000Z
        #   07 2 872 2015-10-09T22:50:55.025000Z
        #   08 0 892 2015-10-09T22:50:58.125000Z
        #   09 1 770 2015-10-09T22:50:58.735000Z
        #   10 2 884 2015-10-09T22:50:59.385000Z
        #   11 0 848 2015-10-09T22:51:02.585000Z
        #   12 1 790 2015-10-09T22:51:02.585000Z
        #   13 2 844 2015-10-09T22:51:03.805000Z
        #   14 0 892 2015-10-09T22:51:06.215000Z
        #   15 1 768 2015-10-09T22:51:05.925000Z
        #   16 2 884 2015-10-09T22:51:08.415000Z
        #   17 1 778 2015-10-09T22:51:10.765000Z
        #   18 0 892 2015-10-09T22:51:11.675000Z
        #   19 2 892 2015-10-09T22:51:12.835000Z
        #   20 1 736 2015-10-09T22:51:14.655000Z
        #   21 0 892 2015-10-09T22:51:16.135000Z
        #   22 2 860 2015-10-09T22:51:17.295000Z
        #   23 1 738 2015-10-09T22:51:18.335000Z
        #   24 0 892 2015-10-09T22:51:20.595000Z
        #   25 1 673 2015-10-09T22:51:22.025000Z
        #   26 2 759 2015-10-09T22:51:21.595000Z
        #   27 0 067 2015-10-09T22:51:25.055000Z
        self.reftek_file_vpu = os.path.join(self.datapath,
                                            '221935615_00000000')
Exemple #3
0
    def setUp(self):
        try:
            # doctests of __init__.py produce warnings that get caught. if we
            # don't raze the slate out the registry here, we can't test those
            # warnings in the unit tests (if doctests run before unittests)..
            from obspy.io.reftek.core import __warningregistry__
            __warningregistry__.clear()
        except ImportError:
            # import error means no warning has been issued
            # before, so nothing to do.
            pass
        self.path = os.path.dirname(
            os.path.abspath(inspect.getfile(inspect.currentframe())))
        self.datapath = os.path.join(self.path, "data")
        self.reftek_filename = "225051000_00008656"
        self.reftek_file = os.path.join(self.datapath, self.reftek_filename)
        self.reftek_file_steim2 = os.path.join(self.datapath,
                                               '104800000_000093F8')
        self.mseed_filenames = [
            "2015282_225051_0ae4c_1_1.msd", "2015282_225051_0ae4c_1_2.msd",
            "2015282_225051_0ae4c_1_3.msd"
        ]
        self.mseed_files = [
            os.path.join(self.datapath, filename)
            for filename in self.mseed_filenames
        ]
        # files "2015282_225051_0ae4c_1_[123].msd" contain miniseed data
        # converted with "rt_mseed" tool of Reftek utilities.

        # information on the data packets in the test file:
        # (omitting leading/trailing EH/ET packet)
        #   >>> for p in packets[1:-1]:
        #   ...     print(
        #   ...         "{:02d}".format(p.packet_sequence),
        #   ...         p.channel_number,
        #   ...         "{:03d}".format(p.number_of_samples),
        #   ...         p.time)
        #   01 0 549 2015-10-09T22:50:51.000000Z
        #   02 1 447 2015-10-09T22:50:51.000000Z
        #   03 2 805 2015-10-09T22:50:51.000000Z
        #   04 0 876 2015-10-09T22:50:53.745000Z
        #   05 1 482 2015-10-09T22:50:53.235000Z
        #   06 1 618 2015-10-09T22:50:55.645000Z
        #   07 2 872 2015-10-09T22:50:55.025000Z
        #   08 0 892 2015-10-09T22:50:58.125000Z
        #   09 1 770 2015-10-09T22:50:58.735000Z
        #   10 2 884 2015-10-09T22:50:59.385000Z
        #   11 0 848 2015-10-09T22:51:02.585000Z
        #   12 1 790 2015-10-09T22:51:02.585000Z
        #   13 2 844 2015-10-09T22:51:03.805000Z
        #   14 0 892 2015-10-09T22:51:06.215000Z
        #   15 1 768 2015-10-09T22:51:05.925000Z
        #   16 2 884 2015-10-09T22:51:08.415000Z
        #   17 1 778 2015-10-09T22:51:10.765000Z
        #   18 0 892 2015-10-09T22:51:11.675000Z
        #   19 2 892 2015-10-09T22:51:12.835000Z
        #   20 1 736 2015-10-09T22:51:14.655000Z
        #   21 0 892 2015-10-09T22:51:16.135000Z
        #   22 2 860 2015-10-09T22:51:17.295000Z
        #   23 1 738 2015-10-09T22:51:18.335000Z
        #   24 0 892 2015-10-09T22:51:20.595000Z
        #   25 1 673 2015-10-09T22:51:22.025000Z
        #   26 2 759 2015-10-09T22:51:21.595000Z
        #   27 0 067 2015-10-09T22:51:25.055000Z
        self.reftek_file_vpu = os.path.join(self.datapath,
                                            '221935615_00000000')