#145012 Report by node gh-actions covering 2079 tests from 59 modules resulted into 39 errors

Report

ObsPy version
1.4.2.post0+14.gf4b209e56e
GitHub Pull Request
https://github.com/obspy/obspy/pull/3599
Report file
JSON document
Total runtime
180.6 sec
Report date/time
Aug. 19, 2025, 8:28 a.m.

System / Python

Architecture
64bit
Machine
arm64
Node
gh-actions
Processor
arm
Python Compiler
Clang 18.1.8
Python Implementation
CPython
Python Version
3.11.13
Release
24.5.0
System
Darwin
Version
Darwin Kernel Version 24.5.0: Tue Apr 22 19:54:15 PDT 2025; root:xnu-11417.121.6~2/RELEASE_ARM64_VMAPPLE

Dependencies

cartopy
0.25.0
decorator
5.2.1
flake8
---
geographiclib
2.0
lxml
6.0.0
matplotlib
3.10.5
numpy
2.3.2
obspy
1.4.2.post0+14.gf4b209e56e
pyproj
3.7.2
pytest
8.4.1
pytest-json-report
1.5.0
requests
2.32.4
scipy
1.16.1
setuptools
80.9.0
shapefile
---
sqlalchemy
1.4.54

Modules (59)

Module Errors / Failures Tracebacks
obspy.clients.earthworm Not tested -
obspy.clients.fdsn - -
obspy.clients.filesystem - -
obspy.clients.iris Not tested -
obspy.clients.neic Not tested -
obspy.clients.nrl - -
obspy.clients.seedlink - -
obspy.clients.syngine Not tested -
obspy.core 4 1 10 11 12
obspy.core.event 2 2 3
obspy.core.inventory 6 4 5 6 7 8 9
obspy.core.util 3 13 14 15
obspy.geodetics - -
obspy.imaging 2 16 17
obspy.io.ah - -
obspy.io.alsep - -
obspy.io.arclink - -
obspy.io.ascii - -
obspy.io.cmtsolution 1 18
obspy.io.cnv - -
obspy.io.css - -
obspy.io.dmx - -
obspy.io.focmec - -
obspy.io.gcf - -
obspy.io.gse2 2 19 20
obspy.io.hypodd - -
obspy.io.iaspei - -
obspy.io.json - -
obspy.io.kinemetrics 1 21
obspy.io.kml - -
obspy.io.mseed 2 22 23
obspy.io.ndk - -
obspy.io.nied 1 24
obspy.io.nlloc 1 25
obspy.io.nordic - -
obspy.io.pdas - -
obspy.io.pde - -
obspy.io.quakeml - -
obspy.io.reftek 1 26
obspy.io.rg16 - -
obspy.io.sac 5 27 28 29 30 31
obspy.io.scardec 1 32
obspy.io.seg2 - -
obspy.io.segy - -
obspy.io.seisan 1 33
obspy.io.seiscomp - -
obspy.io.sh 1 34
obspy.io.shapefile - -
obspy.io.stationtxt 1 35
obspy.io.stationxml - -
obspy.io.wav 2 36 37
obspy.io.win - -
obspy.io.xseed - -
obspy.io.y - -
obspy.io.zmap - -
obspy.realtime - -
obspy.scripts - -
obspy.signal 1 38
obspy.taup 1 39
Summary 39 39

Tracebacks (39)

066 BW.RJOB..EHZ | 2009-08-24T00:20:03.000000Z - ... | 100.0 Hz, 3000 samples
067 BW.RJOB..EHN | 2009-08-24T00:20:03.000000Z - ... | 100.0 Hz, 3000 samples
068 BW.RJOB..EHE | 2009-08-24T00:20:03.000000Z - ... | 100.0 Hz, 3000 samples
069 >>> tr = st[0]
070 >>> print(tr) # doctest: +ELLIPSIS
071 BW.RJOB..EHZ | 2009-08-24T00:20:03.000000Z - ... | 100.0 Hz, 3000 samples
072 >>> tr.data
073 array([ 0. , 0.00694644, 0.07597424, ..., 1.93449584,
074 0.98196204, 0.44196924])
075 >>> print(tr.stats) # doctest: +NORMALIZE_WHITESPACE +ELLIPSIS
Differences (unified diff with -expected +actual):
@@ -1,5 +1,5 @@
network: BW
station: RJOB
- location:
+ location:
channel: EHZ
starttime: 2009-08-24T00:20:03.000000Z
@@ -9,3 +9,12 @@
npts: 3000
calib: 1.0
- ...
+ back_azimuth: 100.0
+ inclination: 30.0
+ response: Channel Response
+	From M/S (Velocity in Meters Per Second) to COUNTS (Digital Counts)
+	Overall Sensitivity: 2.5168e+09 defined at 0.020 Hz
+	4 stages:
+		Stage 1: PolesZerosResponseStage from M/S to V, gain: 1500
+		Stage 2: CoefficientsTypeResponseStage from V to COUNTS, gain: 1.67785e+06
+		Stage 3: FIRResponseStage from COUNTS to COUNTS, gain: 1
+		Stage 4: FIRResponseStage from COUNTS to COUNTS, gain: 1
/Users/runner/miniconda3/envs/test/lib/python3.11/site-packages/obspy/core/__init__.py:75: DocTestFailure
623 attributes.
624 It will only be used if the network, station, location and channel
625 keyword argument are ALL None.
626
627 .. rubric:: Example
628
629 >>> # Can be initialized with a SEED string or with individual components.
630 >>> stream_id = WaveformStreamID(network_code="BW", station_code="FUR",
631 ... location_code="", channel_code="EHZ")
632 >>> print(stream_id) # doctest: +NORMALIZE_WHITESPACE +ELLIPSIS
Differences (unified diff with -expected +actual):
@@ -1,5 +1,5 @@
WaveformStreamID
- network_code: 'BW'
- station_code: 'FUR'
- channel_code: 'EHZ'
- location_code: ''
+	 network_code: 'BW'
+	 station_code: 'FUR'
+	 channel_code: 'EHZ'
+	 location_code: ''
/Users/runner/miniconda3/envs/test/lib/python3.11/site-packages/obspy/core/event/base.py:632: DocTestFailure
276 >>> from obspy.core.event import Origin
277 >>> origin = Origin()
278 >>> origin.resource_id = 'smi:ch.ethz.sed/origin/37465'
279 >>> origin.time = UTCDateTime(0)
280 >>> origin.latitude = 12
281 >>> origin.latitude_errors.uncertainty = 0.01
282 >>> origin.latitude_errors.confidence_level = 95.0
283 >>> origin.longitude = 42
284 >>> origin.depth_type = 'from location'
285 >>> print(origin) # doctest: +NORMALIZE_WHITESPACE +ELLIPSIS
Differences (unified diff with -expected +actual):
@@ -1,6 +1,6 @@
Origin
- resource_id: ResourceIdentifier(id="smi:ch.ethz.sed/...")
- time: UTCDateTime(1970, 1, 1, 0, 0)
- longitude: 42.0
- latitude: 12.0 [confidence_level=95.0, uncertainty=0.01]
- depth_type: ...'from location'
+	 resource_id: ResourceIdentifier(id="smi:ch.ethz.sed/origin/37465")
+	 time: UTCDateTime(1970, 1, 1, 0, 0)
+	 longitude: 42.0
+	 latitude: 12.0 [confidence_level=95.0, uncertainty=0.01]
+	 depth_type: 'from location'
/Users/runner/miniconda3/envs/test/lib/python3.11/site-packages/obspy/core/event/origin.py:285: DocTestFailure
021 -------
022 StationXML files can be read using the
023 :func:`~obspy.core.inventory.inventory.read_inventory()` function that
024 returns an :class:`~obspy.core.inventory.inventory.Inventory` object.
025
026 >>> from obspy import read_inventory
027 >>> inv = read_inventory("/path/to/BW_RJOB.xml")
028 >>> inv # doctest: +ELLIPSIS
029 <obspy.core.inventory.inventory.Inventory object at 0x...>
030 >>> print(inv) # doctest: +NORMALIZE_WHITESPACE
Differences (unified diff with -expected +actual):
@@ -1,11 +1,11 @@
Inventory created at 2013-12-07T18:00:42.878000Z
- Created by: fdsn-stationxml-converter/1.0.0
- http://www.iris.edu/fdsnstationconverter
- Sending institution: Erdbebendienst Bayern
- Contains:
- Networks (1):
- BW
- Stations (1):
- BW.RJOB (Jochberg, Bavaria, BW-Net)
- Channels (3):
- BW.RJOB..EHZ, BW.RJOB..EHN, BW.RJOB..EHE
+	Created by: fdsn-stationxml-converter/1.0.0
+		 http://www.iris.edu/fdsnstationconverter
+	Sending institution: Erdbebendienst Bayern
+	Contains:
+		Networks (1):
+			BW
+		Stations (1):
+			BW.RJOB (Jochberg, Bavaria, BW-Net)
+		Channels (3):
+			BW.RJOB..EHZ, BW.RJOB..EHN, BW.RJOB..EHE
/Users/runner/miniconda3/envs/test/lib/python3.11/site-packages/obspy/core/inventory/__init__.py:30: DocTestFailure
416
417 Find response for a given channel at given time.
418
419 >>> from obspy import read_inventory, UTCDateTime
420 >>> inventory = read_inventory("/path/to/IU_ANMO_BH.xml")
421 >>> datetime = UTCDateTime("2012-08-24T00:00:00")
422 >>> response = inventory.get_response("IU.ANMO.00.BHZ", datetime)
423 >>> print(response) # doctest: +ELLIPSIS +NORMALIZE_WHITESPACE
Differences (unified diff with -expected +actual):
@@ -1,7 +1,7 @@
Channel Response
- From M/S (Velocity in Meters Per Second) to COUNTS (Digital Counts)
- Overall Sensitivity: 3.27508e+09 defined at 0.020 Hz
- 3 stages:
- Stage 1: PolesZerosResponseStage from M/S to V, gain: 1952.1
- Stage 2: CoefficientsTypeResponseStage from V to COUNTS, gain: ...
- Stage 3: CoefficientsTypeResponseStage from COUNTS to COUNTS, ...
+	From M/S (Velocity in Meters Per Second) to COUNTS (Digital Counts)
+	Overall Sensitivity: 3.27508e+09 defined at 0.020 Hz
+	3 stages:
+		Stage 1: PolesZerosResponseStage from M/S to V, gain: 1952.1
+		Stage 2: CoefficientsTypeResponseStage from V to COUNTS, gain: 1.67772e+06
+		Stage 3: CoefficientsTypeResponseStage from COUNTS to COUNTS, gain: 1
/Users/runner/miniconda3/envs/test/lib/python3.11/site-packages/obspy/core/inventory/inventory.py:423: DocTestFailure
690 (see https://docs.python.org/3/library/copy.html).
691 Use :meth:`copy()` afterwards to make a new copy of the data in
692 memory.
693
694 .. rubric:: Example
695
696 >>> from obspy import read_inventory, UTCDateTime
697 >>> inv = read_inventory()
698 >>> inv_new = inv.remove(network='BW')
699 >>> print(inv_new) # doctest: +NORMALIZE_WHITESPACE
Differences (unified diff with -expected +actual):
@@ -1,17 +1,16 @@
Inventory created at 2014-03-03T11:07:06.198000Z
- Created by: fdsn-stationxml-converter/1.0.0
- http://www.iris.edu/fdsnstationconverter
- Sending institution: Erdbebendienst Bayern
- Contains:
- Networks (1):
- GR
- Stations (2):
- GR.FUR (Fuerstenfeldbruck, Bavaria, GR-Net)
- GR.WET (Wettzell, Bavaria, GR-Net)
- Channels (21):
- GR.FUR..BHZ, GR.FUR..BHN, GR.FUR..BHE, GR.FUR..HHZ,
- GR.FUR..HHN, GR.FUR..HHE, GR.FUR..LHZ, GR.FUR..LHN,
- GR.FUR..LHE, GR.FUR..VHZ, GR.FUR..VHN, GR.FUR..VHE,
- GR.WET..BHZ, GR.WET..BHN, GR.WET..BHE, GR.WET..HHZ,
- GR.WET..HHN, GR.WET..HHE, GR.WET..LHZ, GR.WET..LHN,
- GR.WET..LHE
+	Created by: fdsn-stationxml-converter/1.0.0
+		 http://www.iris.edu/fdsnstationconverter
+	Sending institution: Erdbebendienst Bayern
+	Contains:
+		Networks (1):
+			GR
+		Stations (2):
+			GR.FUR (Fuerstenfeldbruck, Bavaria, GR-Net)
+			GR.WET (Wettzell, Bavaria, GR-Net)
+		Channels (21):
+			GR.FUR..BHZ, GR.FUR..BHN, GR.FUR..BHE, GR.FUR..HHZ, GR.FUR..HHN,
+			GR.FUR..HHE, GR.FUR..LHZ, GR.FUR..LHN, GR.FUR..LHE, GR.FUR..VHZ,
+			GR.FUR..VHN, GR.FUR..VHE, GR.WET..BHZ, GR.WET..BHN, GR.WET..BHE,
+			GR.WET..HHZ, GR.WET..HHN, GR.WET..HHE, GR.WET..LHZ, GR.WET..LHN,
+			GR.WET..LHE
/Users/runner/miniconda3/envs/test/lib/python3.11/site-packages/obspy/core/inventory/inventory.py:699: DocTestFailure
558 Use :meth:`copy()` afterwards to make a new copy of the data in
559 memory.
560
561 .. rubric:: Example
562
563 >>> from obspy import read_inventory, UTCDateTime
564 >>> inv = read_inventory()
565 >>> t = UTCDateTime(2007, 7, 1, 12)
566 >>> inv = inv.select(channel="*Z", station="[RW]*", time=t)
567 >>> print(inv) # doctest: +NORMALIZE_WHITESPACE
Differences (unified diff with -expected +actual):
@@ -1,12 +1,12 @@
Inventory created at 2014-03-03T11:07:06.198000Z
- Created by: fdsn-stationxml-converter/1.0.0
- http://www.iris.edu/fdsnstationconverter
- Sending institution: Erdbebendienst Bayern
- Contains:
- Networks (2):
- BW, GR
- Stations (2):
- BW.RJOB (Jochberg, Bavaria, BW-Net)
- GR.WET (Wettzell, Bavaria, GR-Net)
- Channels (4):
- BW.RJOB..EHZ, GR.WET..BHZ, GR.WET..HHZ, GR.WET..LHZ
+	Created by: fdsn-stationxml-converter/1.0.0
+		 http://www.iris.edu/fdsnstationconverter
+	Sending institution: Erdbebendienst Bayern
+	Contains:
+		Networks (2):
+			BW, GR
+		Stations (2):
+			BW.RJOB (Jochberg, Bavaria, BW-Net)
+			GR.WET (Wettzell, Bavaria, GR-Net)
+		Channels (4):
+			BW.RJOB..EHZ, GR.WET..BHZ, GR.WET..HHZ, GR.WET..LHZ
/Users/runner/miniconda3/envs/test/lib/python3.11/site-packages/obspy/core/inventory/inventory.py:567: DocTestFailure
379 Use :meth:`copy()` afterwards to make a new copy of the data in
380 memory.
381
382 .. rubric:: Example
383
384 >>> from obspy import read_inventory, UTCDateTime
385 >>> net = read_inventory()[0]
386 >>> t = UTCDateTime(2008, 7, 1, 12)
387 >>> net = net.select(channel="[LB]HZ", time=t)
388 >>> print(net) # doctest: +NORMALIZE_WHITESPACE
Differences (unified diff with -expected +actual):
@@ -1,10 +1,10 @@
Network GR (GRSN)
- Station Count: None/None (Selected/Total)
- -- - --
- Access: UNKNOWN
- Contains:
- Stations (2):
- GR.FUR (Fuerstenfeldbruck, Bavaria, GR-Net)
- GR.WET (Wettzell, Bavaria, GR-Net)
- Channels (4):
- GR.FUR..BHZ, GR.FUR..LHZ, GR.WET..BHZ, GR.WET..LHZ
+	Station Count: None/None (Selected/Total)
+	-- - --
+	Access: UNKNOWN
+	Contains:
+		Stations (2):
+			GR.FUR (Fuerstenfeldbruck, Bavaria, GR-Net)
+			GR.WET (Wettzell, Bavaria, GR-Net)
+		Channels (4):
+			GR.FUR..BHZ, GR.FUR..LHZ, GR.WET..BHZ, GR.WET..LHZ
/Users/runner/miniconda3/envs/test/lib/python3.11/site-packages/obspy/core/inventory/network.py:388: DocTestFailure
362 Use :meth:`copy()` afterwards to make a new copy of the data in
363 memory.
364
365 .. rubric:: Example
366
367 >>> from obspy import read_inventory, UTCDateTime
368 >>> sta = read_inventory()[0][0]
369 >>> t = UTCDateTime(2008, 7, 1, 12)
370 >>> sta = sta.select(channel="[LB]HZ", time=t)
371 >>> print(sta) # doctest: +NORMALIZE_WHITESPACE
Differences (unified diff with -expected +actual):
@@ -1,9 +1,10 @@
Station FUR (Fuerstenfeldbruck, Bavaria, GR-Net)
- Station Code: FUR
- Channel Count: None/None (Selected/Total)
- 2006-12-16T00:00:00.000000Z -
- Access: None
- Latitude: 48.1629, Longitude: 11.2752, Elevation: 565.0 m
- Available Channels:
- ..BHZ 20.0 Hz 2006-12-16 to None
- ..LHZ 1.0 Hz 2006-12-16 to None
+	Station Code: FUR
+	Channel Count: None/None (Selected/Total)
+	2006-12-16T00:00:00.000000Z -
+	Access: None
+	Latitude: 48.1629, Longitude: 11.2752, Elevation: 565.0 m
+	Available Channels:
+	 ..BHZ 20.0 Hz 2006-12-16 to None
+	 ..LHZ 1.0 Hz 2006-12-16 to None
+<BLANKLINE>
/Users/runner/miniconda3/envs/test/lib/python3.11/site-packages/obspy/core/inventory/station.py:371: DocTestFailure
3168 To subsequently deconvolve the instrument response use
3169 :meth:`Stream.remove_response`.
3170
3171 >>> from obspy import read, read_inventory
3172 >>> st = read()
3173 >>> inv = read_inventory()
3174 >>> st.attach_response(inv)
3175 []
3176 >>> tr = st[0]
3177 >>> print(tr.stats.response) # doctest: +ELLIPSIS +NORMALIZE_WHITESPACE
Differences (unified diff with -expected +actual):
@@ -1,8 +1,8 @@
Channel Response
- From M/S (Velocity in Meters per Second) to COUNTS (Digital Counts)
- Overall Sensitivity: 2.5168e+09 defined at 0.020 Hz
- 4 stages:
- Stage 1: PolesZerosResponseStage from M/S to V, gain: 1500
- Stage 2: CoefficientsTypeResponseStage from V to COUNTS, ...
- Stage 3: FIRResponseStage from COUNTS to COUNTS, gain: 1
- Stage 4: FIRResponseStage from COUNTS to COUNTS, gain: 1
+	From M/S (Velocity in Meters per Second) to COUNTS (Digital Counts)
+	Overall Sensitivity: 2.5168e+09 defined at 0.020 Hz
+	4 stages:
+		Stage 1: PolesZerosResponseStage from M/S to V, gain: 1500
+		Stage 2: CoefficientsTypeResponseStage from V to COUNTS, gain: 1.67785e+06
+		Stage 3: FIRResponseStage from COUNTS to COUNTS, gain: 1
+		Stage 4: FIRResponseStage from COUNTS to COUNTS, gain: 1
/Users/runner/miniconda3/envs/test/lib/python3.11/site-packages/obspy/core/stream.py:3177: DocTestFailure
1796 1 Trace(s) in Stream:
1797 BW.RJOB..EHZ | 2009-08-24T00:20:03.000000Z ... | 100.0 Hz, 3000 samples
1798
1799 >>> st2 = st.select(component="Z")
1800 >>> print(st2) # doctest: +ELLIPSIS
1801 1 Trace(s) in Stream:
1802 BW.RJOB..EHZ | 2009-08-24T00:20:03.000000Z ... | 100.0 Hz, 3000 samples
1803
1804 >>> st2 = st.select(network="CZ")
1805 >>> print(st2) # doctest: +NORMALIZE_WHITESPACE
Expected:
0 Trace(s) in Stream:
Got:
0 Trace(s) in Stream:
<BLANKLINE>
/Users/runner/miniconda3/envs/test/lib/python3.11/site-packages/obspy/core/stream.py:1805: DocTestFailure
2647 if no matching response can be found.
2648 To subsequently deconvolve the instrument response use
2649 :meth:`obspy.core.trace.Trace.remove_response`.
2650
2651 >>> from obspy import read, read_inventory
2652 >>> st = read()
2653 >>> tr = st[0]
2654 >>> inv = read_inventory()
2655 >>> tr.attach_response(inv)
2656 >>> print(tr.stats.response) # doctest: +ELLIPSIS +NORMALIZE_WHITESPACE
Differences (unified diff with -expected +actual):
@@ -1,8 +1,8 @@
Channel Response
- From M/S (Velocity in Meters per Second) to COUNTS (Digital Counts)
- Overall Sensitivity: 2.5168e+09 defined at 0.020 Hz
- 4 stages:
- Stage 1: PolesZerosResponseStage from M/S to V, gain: 1500
- Stage 2: CoefficientsTypeResponseStage from V to COUNTS, ...
- Stage 3: FIRResponseStage from COUNTS to COUNTS, gain: 1
- Stage 4: FIRResponseStage from COUNTS to COUNTS, gain: 1
+	From M/S (Velocity in Meters per Second) to COUNTS (Digital Counts)
+	Overall Sensitivity: 2.5168e+09 defined at 0.020 Hz
+	4 stages:
+		Stage 1: PolesZerosResponseStage from M/S to V, gain: 1500
+		Stage 2: CoefficientsTypeResponseStage from V to COUNTS, gain: 1.67785e+06
+		Stage 3: FIRResponseStage from COUNTS to COUNTS, gain: 1
+		Stage 4: FIRResponseStage from COUNTS to COUNTS, gain: 1
/Users/runner/miniconda3/envs/test/lib/python3.11/site-packages/obspy/core/trace.py:2656: DocTestFailure
146 :param dtype: NumPy dtype for returned data chunk
147 :param fill_value: If ``None``, masked array is returned, else the
148 array is filled with the corresponding value
149
150 .. rubric:: Example
151
152 >>> create_empty_data_chunk(3, 'int', 10)
153 array([10, 10, 10])
154
155 >>> create_empty_data_chunk(
Differences (unified diff with -expected +actual):
@@ -1,3 +1,4 @@
masked_array(data = [-- -- --],
- mask = ...,
- ...)
+ mask = [ True True True],
+ fill_value = 1e+20)
+<BLANKLINE>
/Users/runner/miniconda3/envs/test/lib/python3.11/site-packages/obspy/core/util/base.py:155: DocTestFailure
148 >>> enum = Enum(["c", "a", "b"])
149 >>> print(repr(enum))
150 Enum(["c", "a", "b"])
151 >>> enum = Enum(["not existing",
152 ... "not reported",
153 ... "earthquake",
154 ... "controlled explosion",
155 ... "experimental explosion",
156 ... "industrial explosion"])
157 >>> print(repr(enum)) # doctest: +NORMALIZE_WHITESPACE
Expected:
Enum(["not existing", "not reported", ..., "experimental explosion",
"industrial explosion"])
Got:
Enum(["not existing", "not reported", ..., "experimental explosion", "industrial explosion"])
/Users/runner/miniconda3/envs/test/lib/python3.11/site-packages/obspy/core/util/obspy_types.py:157: DocTestFailure
131 >>> enum = Enum(["c", "a", "b"])
132 >>> print(enum)
133 Enum(["c", "a", "b"])
134 >>> enum = Enum(["not existing",
135 ... "not reported",
136 ... "earthquake",
137 ... "controlled explosion",
138 ... "experimental explosion",
139 ... "industrial explosion"])
140 >>> print(enum) # doctest: +NORMALIZE_WHITESPACE
Expected:
Enum(["not existing", "not reported", ..., "experimental explosion",
"industrial explosion"])
Got:
Enum(["not existing", "not reported", ..., "experimental explosion", "industrial explosion"])
/Users/runner/miniconda3/envs/test/lib/python3.11/site-packages/obspy/core/util/obspy_types.py:140: DocTestFailure
199 >>> from random import shuffle
200 >>> from string import ascii_lowercase, ascii_uppercase
201 >>> lowercase = list(ascii_lowercase)
202 >>> uppercase = list(ascii_uppercase)
203 >>> shuffle(lowercase)
204 >>> shuffle(uppercase)
205 >>> component_codes = lowercase + uppercase
206 >>> component_codes = sorted(component_codes,
207 ... key=_component_code_key)
208 >>> print(component_codes) # doctest: +NORMALIZE_WHITESPACE
Expected:
['z', 'Z', 'n', 'N', 'e', 'E', 'r', 'R', 'l', 'L', 'q', 'Q', 't', 'T', 'a',
'A', 'b', 'B', 'c', 'C', 'd', 'D', 'f', 'F', 'g', 'G', 'h', 'H', 'i',
'I', 'j', 'J', 'k', 'K', 'm', 'M', 'o', 'O', 'p', 'P', 's', 'S', 'u',
'U', 'v', 'V', 'w', 'W', 'x', 'X', 'y', 'Y']
Got:
['z', 'Z', 'n', 'N', 'e', 'E', 'r', 'R', 'l', 'L', 'q', 'Q', 't', 'T', 'a', 'A', 'b', 'B', 'c', 'C', 'd', 'D', 'f', 'F', 'g', 'G', 'h', 'H', 'i', 'I', 'j', 'J', 'k', 'K', 'm', 'M', 'o', 'O', 'p', 'P', 's', 'S', 'u', 'U', 'v', 'V', 'w', 'W', 'x', 'X', 'y', 'Y']
/Users/runner/miniconda3/envs/test/lib/python3.11/site-packages/obspy/imaging/util.py:208: DocTestFailure
158 >>> trace_ids = []
159 >>> for net in networks:
160 ... for sta in stations:
161 ... for loc in locations:
162 ... for cha in channels:
163 ... trace_ids.append(".".join([net, sta, loc, cha]))
164 >>> from random import shuffle
165 >>> shuffle(trace_ids)
166 >>> trace_ids = sorted(trace_ids, key=_id_key)
167 >>> print(" ".join(trace_ids)) # doctest: +NORMALIZE_WHITESPACE
Expected:
A.X.00.Z A.X.00.EHZ A.X.00.EHN A.X.00.EHE A.X.01.Z A.X.01.EHZ A.X.01.EHN
A.X.01.EHE A.XY.00.Z A.XY.00.EHZ A.XY.00.EHN A.XY.00.EHE A.XY.01.Z
A.XY.01.EHZ A.XY.01.EHN A.XY.01.EHE A.Y.00.Z A.Y.00.EHZ A.Y.00.EHN
A.Y.00.EHE A.Y.01.Z A.Y.01.EHZ A.Y.01.EHN A.Y.01.EHE AB.X.00.Z AB.X.00.EHZ
AB.X.00.EHN AB.X.00.EHE AB.X.01.Z AB.X.01.EHZ AB.X.01.EHN AB.X.01.EHE
AB.XY.00.Z AB.XY.00.EHZ AB.XY.00.EHN AB.XY.00.EHE AB.XY.01.Z AB.XY.01.EHZ
AB.XY.01.EHN AB.XY.01.EHE AB.Y.00.Z AB.Y.00.EHZ AB.Y.00.EHN AB.Y.00.EHE
AB.Y.01.Z AB.Y.01.EHZ AB.Y.01.EHN AB.Y.01.EHE B.X.00.Z B.X.00.EHZ
B.X.00.EHN B.X.00.EHE B.X.01.Z B.X.01.EHZ B.X.01.EHN B.X.01.EHE B.XY.00.Z
B.XY.00.EHZ B.XY.00.EHN B.XY.00.EHE B.XY.01.Z B.XY.01.EHZ B.XY.01.EHN
B.XY.01.EHE B.Y.00.Z B.Y.00.EHZ B.Y.00.EHN B.Y.00.EHE B.Y.01.Z B.Y.01.EHZ
B.Y.01.EHN B.Y.01.EHE
Got:
A.X.00.Z A.X.00.EHZ A.X.00.EHN A.X.00.EHE A.X.01.Z A.X.01.EHZ A.X.01.EHN A.X.01.EHE A.XY.00.Z A.XY.00.EHZ A.XY.00.EHN A.XY.00.EHE A.XY.01.Z A.XY.01.EHZ A.XY.01.EHN A.XY.01.EHE A.Y.00.Z A.Y.00.EHZ A.Y.00.EHN A.Y.00.EHE A.Y.01.Z A.Y.01.EHZ A.Y.01.EHN A.Y.01.EHE AB.X.00.Z AB.X.00.EHZ AB.X.00.EHN AB.X.00.EHE AB.X.01.Z AB.X.01.EHZ AB.X.01.EHN AB.X.01.EHE AB.XY.00.Z AB.XY.00.EHZ AB.XY.00.EHN AB.XY.00.EHE AB.XY.01.Z AB.XY.01.EHZ AB.XY.01.EHN AB.XY.01.EHE AB.Y.00.Z AB.Y.00.EHZ AB.Y.00.EHN AB.Y.00.EHE AB.Y.01.Z AB.Y.01.EHZ AB.Y.01.EHN AB.Y.01.EHE B.X.00.Z B.X.00.EHZ B.X.00.EHN B.X.00.EHE B.X.01.Z B.X.01.EHZ B.X.01.EHN B.X.01.EHE B.XY.00.Z B.XY.00.EHZ B.XY.00.EHN B.XY.00.EHE B.XY.01.Z B.XY.01.EHZ B.XY.01.EHN B.XY.01.EHE B.Y.00.Z B.Y.00.EHZ B.Y.00.EHN B.Y.00.EHE B.Y.01.Z B.Y.01.EHZ B.Y.01.EHN B.Y.01.EHE
/Users/runner/miniconda3/envs/test/lib/python3.11/site-packages/obspy/imaging/util.py:167: DocTestFailure
020
021 >>> import obspy
022 >>> cat = obspy.read_events("/path/to/CMTSOLUTION")
023 >>> print(cat)
024 1 Event(s) in Catalog:
025 2003-12-26T01:56:58.130000Z | +29.100, +58.240 | 6.54 mw
026
027 The event will contain a couple of origins and magnitudes.
028
029 >>> print(cat[0]) # doctest: +NORMALIZE_WHITESPACE +ELLIPSIS
Differences (unified diff with -expected +actual):
@@ -1,13 +1,13 @@
-Event: 2003-12-26T01:56:58.130000Z | +29.100, +58.240 | 6.54 mw
+Event:	2003-12-26T01:56:58.130000Z | +29.100, +58.240 | 6.54 mw
<BLANKLINE>
- resource_id: ResourceIdentifier(id="...")
- event_type: 'earthquake'
- preferred_origin_id: ResourceIdentifier(id="...")
- preferred_magnitude_id: ResourceIdentifier(id="...")
- preferred_focal_mechanism_id: ResourceIdentifier(id="...")
- ---------
- event_descriptions: 1 Elements
- comments: 1 Elements
- focal_mechanisms: 1 Elements
- origins: 2 Elements
- magnitudes: 3 Elements
+	 resource_id: ResourceIdentifier(id="smi:local/cmtsolution/122603B/event")
+	 event_type: 'earthquake'
+	 preferred_origin_id: ResourceIdentifier(id="smi:local/cmtsolution/122603B/origin#cmt")
+	 preferred_magnitude_id: ResourceIdentifier(id="smi:local/cmtsolution/122603B/magnitude#mw")
+	 preferred_focal_mechanism_id: ResourceIdentifier(id="smi:local/cmtsolution/122603B/focal_mechanism")
+	 ---------
+	 event_descriptions: 1 Elements
+	 comments: 1 Elements
+	 focal_mechanisms: 1 Elements
+	 origins: 2 Elements
+	 magnitudes: 3 Elements
/Users/runner/miniconda3/envs/test/lib/python3.11/site-packages/obspy/io/cmtsolution/__init__.py:29: DocTestFailure
028 behavior of reading the file:
029
030 * ``headonly=True``: Read only the header part, not the actual data
031 * ``verify_chksum=False``: Do not verify the checksum of the GSE2 file. This is
032 very useful if the program, which wrote the checksum, calculated it in a
033 wrong way.
034
035 >>> st #doctest: +ELLIPSIS
036 <obspy.core.stream.Stream object at 0x...>
037 >>> print(st) #doctest: +NORMALIZE_WHITESPACE
Expected:
1 Trace(s) in Stream:
.RJOB..Z | 2005-08-31T02:33:49.850000Z - 2005-08-31T02:34:49.845000Z
| 200.0 Hz, 12000 samples
Got:
1 Trace(s) in Stream:
.RJOB..Z | 2005-08-31T02:33:49.850000Z - 2005-08-31T02:34:49.845000Z | 200.0 Hz, 12000 samples
/Users/runner/miniconda3/envs/test/lib/python3.11/site-packages/obspy/io/gse2/__init__.py:37: DocTestFailure
467 26-35 Lon f10.5 Longitude (degrees, W is negative)
468 37-48 Coordsys a12 Reference coordinate system (e.g., WGS-84)
469 50-54 Elev f5.3 Elevation (km)
470 56-60 Edepth f5.3 Emplacement depth (km)
471
472 However, many files in practice do not adhere to these defined fixed
473 positions. Here are some real-world examples:
474
475 >>> l = "STA2 -999.0000 -999.00000 -.999 -.999"
476 >>> for k, v in sorted(parse_sta2(l).items()): # doctest: +NORMALIZE_WHITESPACE
Differences (unified diff with -expected +actual):
@@ -1,6 +1,6 @@
-coordsys
+coordsys
edepth -0.999
elev -0.999
lat -999.0
lon -999.0
-network
+network
/Users/runner/miniconda3/envs/test/lib/python3.11/site-packages/obspy/io/gse2/libgse2.py:476: DocTestFailure
018
019 Reading
020 -------
021 Similar to reading any other waveform data format using obspy.core:
022
023 >>> from obspy import read
024 >>> st = read("/path/to/BI008_MEMA-04823.evt", apply_calib=True)
025 >>> st # doctest: +ELLIPSIS
026 <obspy.core.stream.Stream object at 0x...>
027 >>> print (st) # doctest: +NORMALIZE_WHITESPACE
Differences (unified diff with -expected +actual):
@@ -1,7 +1,4 @@
3 Trace(s) in Stream:
-.MEMA..0 | 2013-08-15T09:20:28.000000Z - 2013-08-15T09:20:50.996000Z |
-250.0 Hz, 5750 samples
-.MEMA..1 | 2013-08-15T09:20:28.000000Z - 2013-08-15T09:20:50.996000Z |
-250.0 Hz, 5750 samples
-.MEMA..2 | 2013-08-15T09:20:28.000000Z - 2013-08-15T09:20:50.996000Z |
-250.0 Hz, 5750 samples
+.MEMA..0 | 2013-08-15T09:20:28.000000Z - 2013-08-15T09:20:50.996000Z | 250.0 Hz, 5750 samples
+.MEMA..1 | 2013-08-15T09:20:28.000000Z - 2013-08-15T09:20:50.996000Z | 250.0 Hz, 5750 samples
+.MEMA..2 | 2013-08-15T09:20:28.000000Z - 2013-08-15T09:20:50.996000Z | 250.0 Hz, 5750 samples
/Users/runner/miniconda3/envs/test/lib/python3.11/site-packages/obspy/io/kinemetrics/__init__.py:27: DocTestFailure
044 sampling_rate: 40.0
045 delta: 0.025
046 npts: 11947
047 calib: 1.0
048 _format: MSEED
049 mseed: ...
050
051 MiniSEED specific metadata is stored in ``stats.mseed``.
052
053 >>> for k, v in sorted(st[0].stats.mseed.items()):
Differences (unified diff with -expected +actual):
@@ -1,6 +1,6 @@
- 'byteorder': >
- 'dataquality': R
- 'encoding': STEIM2
- 'filesize': 8192
- 'number_of_records': 2
- 'record_length': 4096
+'byteorder': >
+'dataquality': R
+'encoding': STEIM2
+'filesize': 8192
+'number_of_records': 2
+'record_length': 4096
/Users/runner/miniconda3/envs/test/lib/python3.11/site-packages/obspy/io/mseed/__init__.py:53: DocTestFailure
039
040 The returned end time is the time of the last data sample and not the
041 time that the last sample covers.
042
043 .. rubric:: Example
044
045 >>> from obspy.core.util import get_example_file
046 >>> filename = get_example_file(
047 ... "BW.BGLD.__.EHE.D.2008.001.first_10_records")
048 >>> get_start_and_end_time(filename) # doctest: +NORMALIZE_WHITESPACE
Expected:
(UTCDateTime(2007, 12, 31, 23, 59, 59, 915000),
UTCDateTime(2008, 1, 1, 0, 0, 20, 510000))
Got:
(UTCDateTime(2007, 12, 31, 23, 59, 59, 915000), UTCDateTime(2008, 1, 1, 0, 0, 20, 510000))
/Users/runner/miniconda3/envs/test/lib/python3.11/site-packages/obspy/io/mseed/util.py:48: DocTestFailure
020
021 >>> import obspy
022 >>> cat = obspy.read_events("/path/to/FNETMTCATALOG")
023 >>> print(cat)
024 1 Event(s) in Catalog:
025 2011-03-11T05:46:18.120000Z | +38.103, +142.861 | 8.7 Mw
026
027 The event will contain a couple of origins and magnitudes.
028
029 >>> print(cat[0]) # doctest: +ELLIPSIS, +NORMALIZE_WHITESPACE
Differences (unified diff with -expected +actual):
@@ -1,11 +1,11 @@
-Event: 2011-03-11T05:46:18.120000Z | +38.103, +142.861 | 8.7 Mw
+Event:	2011-03-11T05:46:18.120000Z | +38.103, +142.861 | 8.7 Mw
<BLANKLINE>
- resource_id: ResourceIdentifier(id="smi:local/fnetmt/2011excpds/event")
- event_type: 'earthquake'
- preferred_origin_id: ResourceIdentifier(id="smi:local/fnetmt/2011excpds/origin#MT")
- preferred_magnitude_id: ResourceIdentifier(id="smi:local/fnetmt/2011excpds/magnitude#MT")
- preferred_focal_mechanism_id: ResourceIdentifier(id="smi:local/fnetmt/2011excpds/focal_mechanism")
- ---------
- focal_mechanisms: 1 Elements
- origins: 2 Elements
- magnitudes: 2 Elements
+	 resource_id: ResourceIdentifier(id="smi:local/fnetmt/2011excpds/event")
+	 event_type: 'earthquake'
+	 preferred_origin_id: ResourceIdentifier(id="smi:local/fnetmt/2011excpds/origin#MT")
+	 preferred_magnitude_id: ResourceIdentifier(id="smi:local/fnetmt/2011excpds/magnitude#MT")
+	 preferred_focal_mechanism_id: ResourceIdentifier(id="smi:local/fnetmt/2011excpds/focal_mechanism")
+	 ---------
+	 focal_mechanisms: 1 Elements
+	 origins: 2 Elements
+	 magnitudes: 2 Elements
/Users/runner/miniconda3/envs/test/lib/python3.11/site-packages/obspy/io/nied/__init__.py:29: DocTestFailure
020 Hypocenter-Phase file into an ObsPy :class:`~obspy.core.event.Catalog` object:
021
022 >>> from obspy import read_events
023 >>> cat = read_events("/path/to/nlloc.hyp")
024 >>> print(cat)
025 1 Event(s) in Catalog:
026 2006-07-15T17:21:20.195670Z | +51.658, +7.737
027
028 >>> event = cat[0]
029 >>> print(event) # doctest: +ELLIPSIS +NORMALIZE_WHITESPACE
Differences (unified diff with -expected +actual):
@@ -1,11 +1,9 @@
-Event: 2006-07-15T17:21:20.195670Z | +51.658, +7.737
+Event:	2006-07-15T17:21:20.195670Z | +51.658, +7.737
<BLANKLINE>
- resource_id: ResourceIdentifier(id="smi:local/...")
- creation_info: CreationInfo(author='Claudio Satriano',
- creation_time=UTCDateTime(2013, 6, 21, ...),
- version='NLLoc:v6.02.07')
- preferred_origin_id: ResourceIdentifier(id="smi:local/...")
- ---------
- comments: 1 Elements
- picks: 5 Elements
- origins: 1 Elements
+	 resource_id: ResourceIdentifier(id="smi:local/991f5fda-368c-4b83-aa06-28edfaa68867")
+	 creation_info: CreationInfo(author='Claudio Satriano', creation_time=UTCDateTime(2013, 6, 21, 12, 53, 34), version='NLLoc:v6.02.07')
+	 preferred_origin_id: ResourceIdentifier(id="smi:local/a0e4a921-efe6-4b3e-b2dd-811aa4fdb3d2")
+	 ---------
+	 comments: 1 Elements
+	 picks: 5 Elements
+	 origins: 1 Elements
/Users/runner/miniconda3/envs/test/lib/python3.11/site-packages/obspy/io/nlloc/__init__.py:29: DocTestFailure
062 BW.KW1..EHN | 2015-10-09T22:51:05.925000Z - ... | 200.0 Hz, 768 samples
063 BW.KW1..EHN | 2015-10-09T22:51:10.765000Z - ... | 200.0 Hz, 2925 samples
064 BW.KW1..EHZ | 2015-10-09T22:50:51.000000Z - ... | 200.0 Hz, 3165 samples
065 BW.KW1..EHZ | 2015-10-09T22:51:06.215000Z - ... | 200.0 Hz, 892 samples
066 BW.KW1..EHZ | 2015-10-09T22:51:11.675000Z - ... | 200.0 Hz, 2743 samples
067
068 Reftek 130 specific metadata (from event header packet) is stored
069 in ``stats.reftek130``.
070
071 >>> print(st[0].stats) # doctest: +ELLIPSIS +NORMALIZE_WHITESPACE
Differences (unified diff with -expected +actual):
@@ -1,5 +1,5 @@
network: BW
station: KW1
- location:
+ location:
channel: EHE
starttime: 2015-10-09T22:50:51.000000Z
@@ -10,3 +10,3 @@
calib: 1.0
_format: REFTEK130
- reftek130: ...
+ reftek130: AttribDict({'trigger_time_message': 'Trigger Time = 2015282225051000\r\n', 'time_source': '1', 'time_quality': '?', 'station_name_extension': ' ', 'station_name': 'KW1 ', 'stream_name': 'EH ', '_reserved_2': ' ', 'sampling_rate': 200.0, 'trigger_type': 'CON ', 'trigger_time': 1444431051000000000, 'first_sample_time': 1444431051000000000, 'detrigger_time': None, 'last_sample_time': None, 'channel_adjusted_nominal_bit_weights': ('104.2 mV', '104.2 mV', '104.2 mV', None, None, None, None, None, None, None, None, None, None, None, None, None), 'channel_true_bit_weights': ('1.585 uV', '1.587 uV', '1.587 uV', None, None, None, None, None, None, None, None, None, None, None, None, None), 'channel_gain_code': ('1', '1', '1', None, None, None, None, None, None, None, None, None, None, None, None, None), 'channel_ad_resolution_code': ('3', '3', '3', None, None, None, None, None, None, None, None, None, None, None, None, None), 'channel_fsa_code': ('3', '3', '3', None, None, None, None, None, None, None, None, None, None, None, None, None), 'channel_code': (None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None), 'channel_sensor_fsa_code': (None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None), 'channel_sensor_vpu': (None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None), 'channel_sensor_units_code': (None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None), 'station_channel_number': (None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None), '_reserved_3': ' ', 'total_installed_channels': 3, 'station_comment': 'STATION COMMENT ', 'digital_filter_list': ' ', 'position': ' ', 'reftek_120': b' ', 'channel_number': 2})
/Users/runner/miniconda3/envs/test/lib/python3.11/site-packages/obspy/io/reftek/__init__.py:71: DocTestFailure
032
033 The format will be determined automatically. As SAC-files can contain only one
034 data trace (as opposed to Mini-SEED or GSE2), the length of 'st' will be one.
035 'st[0]' will have a stats attribute containing the essential meta data (station
036 name, channel, location, start time, end time, sampling rate, number of
037 points). Additionally, when reading a SAC-file it will have one additional
038 attribute, 'sac', which contains all SAC-specific attributes (SAC header
039 values).
040
041 >>> print(st[0].stats) # doctest: +NORMALIZE_WHITESPACE +ELLIPSIS
Differences (unified diff with -expected +actual):
@@ -1,5 +1,5 @@
- network:
+ network:
station: STA
- location:
+ location:
channel: Q
starttime: 1978-07-18T08:00:10.000000Z
@@ -10,3 +10,3 @@
calib: 1.0
_format: SAC
- sac: AttribDict({...})
+ sac: AttribDict({'delta': 1.0, 'depmin': -1.0, 'depmax': 1.0, 'scale': -12345.0, 'odelta': -12345.0, 'b': 10.0, 'e': 109.0, 'o': -12345.0, 'a': -12345.0, 'internal0': -12345.0, 't0': -12345.0, 't1': -12345.0, 't2': -12345.0, 't3': -12345.0, 't4': -12345.0, 't5': -12345.0, 't6': -12345.0, 't7': -12345.0, 't8': -12345.0, 't9': -12345.0, 'f': -12345.0, 'resp0': -12345.0, 'resp1': -12345.0, 'resp2': -12345.0, 'resp3': -12345.0, 'resp4': -12345.0, 'resp5': -12345.0, 'resp6': -12345.0, 'resp7': -12345.0, 'resp8': -12345.0, 'resp9': -12345.0, 'stla': -12345.0, 'stlo': -12345.0, 'stel': -12345.0, 'stdp': -12345.0, 'evla': -12345.0, 'evlo': -12345.0, 'evel': -12345.0, 'evdp': -12345.0, 'mag': -12345.0, 'user0': -12345.0, 'user1': -12345.0, 'user2': -12345.0, 'user3': -12345.0, 'user4': -12345.0, 'user5': -12345.0, 'user6': -12345.0, 'user7': -12345.0, 'user8': -12345.0, 'user9': -12345.0, 'dist': -12345.0, 'az': -12345.0, 'baz': -12345.0, 'gcarc': -12345.0, 'internal1': -12345.0, 'internal2': -12345.0, 'depmen': 8.3446501e-08, 'cmpaz': -12345.0, 'cmpinc': -12345.0, 'xminimum': -12345.0, 'xmaximum': -12345.0, 'yminimum': -12345.0, 'ymaximum': -12345.0, 'unused6': -12345.0, 'unused7': -12345.0, 'unused8': -12345.0, 'unused9': -12345.0, 'unused10': -12345.0, 'unused11': -12345.0, 'unused12': -12345.0, 'nzyear': 1978, 'nzjday': 199, 'nzhour': 8, 'nzmin': 0, 'nzsec': 0, 'nzmsec': 0, 'nvhdr': 6, 'norid': -12345, 'nevid': -12345, 'npts': 100, 'internal3': -12345, 'nwfid': -12345, 'nxsize': -12345, 'nysize': -12345, 'unused13': -12345, 'iftype': 1, 'idep': -12345, 'iztype': -12345, 'unused14': -12345, 'iinst': -12345, 'istreg': -12345, 'ievreg': -12345, 'ievtyp': -12345, 'iqual': -12345, 'isynth': -12345, 'imagtyp': -12345, 'imagsrc': -12345, 'unused15': -12345, 'unused16': -12345, 'unused17': -12345, 'unused18': -12345, 'unused19': -12345, 'unused20': -12345, 'unused21': -12345, 'unused22': -12345, 'leven': 1, 'lpspol': 0, 'lovrok': 1, 'lcalda': 1, 'unused23': 0, 'kstnm': 'STA ', 'kevnm': 'FUNCGEN: SINE ', 'khole': '-12345 ', 'ko': '-12345 ', 'ka': '-12345 ', 'kt0': '-12345 ', 'kt1': '-12345 ', 'kt2': '-12345 ', 'kt3': '-12345 ', 'kt4': '-12345 ', 'kt5': '-12345 ', 'kt6': '-12345 ', 'kt7': '-12345 ', 'kt8': '-12345 ', 'kt9': '-12345 ', 'kf': '-12345 ', 'kuser0': '-12345 ', 'kuser1': '-12345 ', 'kuser2': '-12345 ', 'kcmpnm': 'Q ', 'knetwk': '-12345 ', 'kdatrd': '-12345 ', 'kinst': '-12345 '})
/Users/runner/miniconda3/envs/test/lib/python3.11/site-packages/obspy/io/sac/__init__.py:41: DocTestFailure
321 >>> for k in sorted(tr.stats.paz): # doctest: +NORMALIZE_WHITESPACE
322 ... print(k)
323 digitizer_gain
324 gain
325 poles
326 seismometer_gain
327 sensitivity
328 t_shift
329 zeros
330 >>> print(tr.stats.paz.poles) # doctest: +NORMALIZE_WHITESPACE +ELLIPSIS
Expected:
[(-0.15931...+0.15931...j), (-0.15931...-0.15931...j),
(-314.159...+202.318...j), (-314.159...-202.318...j)]
Got:
[(-0.1593164466488456+0.1593164466488456j), (-0.1593164466488456-0.1593164466488456j), (-314.1592653589793+202.31856689118268j), (-314.1592653589793-202.31856689118268j)]
/Users/runner/miniconda3/envs/test/lib/python3.11/site-packages/obspy/io/sac/sacpz.py:330: DocTestFailure
070 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
071
072 .. rubric:: Example
073
074 >>> header = {'kstnm': 'ANMO', 'kcmpnm': 'BHZ', 'stla': 40.5, 'stlo': -108.23,
075 ... 'evla': -15.123, 'evlo': 123, 'evdp': 50, 'nzyear': 2012,
076 ... 'nzjday': 123, 'nzhour': 13, 'nzmin': 43, 'nzsec': 17,
077 ... 'nzmsec': 100, 'delta': 1.0/40}
078 >>> sac = SACTrace(data=np.random.random(100), **header)
079 >>> print(sac) # doctest: +NORMALIZE_WHITESPACE +ELLIPSIS
Differences (unified diff with -expected +actual):
@@ -1,9 +1,9 @@
Reference Time = 05/02/2012 (123) 13:43:17.100000
- iztype IB: begin time
+	iztype IB: begin time
b = 0.0
-delta = 0.0250000...
-e = 2.4750000...
+delta = 0.02500000037252903
+e = 2.475000036880374
evdp = 50.0
-evla = -15.123000...
+evla = -15.123000144958496
evlo = 123.0
iftype = itime
@@ -25,3 +25,3 @@
nzyear = 2012
stla = 40.5
-stlo = -108.23000...
+stlo = -108.2300033569336
/Users/runner/miniconda3/envs/test/lib/python3.11/site-packages/obspy/io/sac/sactrace.py:79: DocTestFailure
828
829 Initialize a SACTrace object using header key-value pairs and a
830 numpy.ndarray for the data, both optional.
831
832 ..rubric:: Example
833
834 >>> sac = SACTrace(nzyear=1995, nzmsec=50, data=np.arange(100))
835 >>> print(sac) # doctest: +NORMALIZE_WHITESPACE
Differences (unified diff with -expected +actual):
@@ -1,4 +1,4 @@
Reference Time = 01/01/1995 (001) 00:00:00.050000
- iztype IB: begin time
+	iztype IB: begin time
b = 0.0
delta = 1.0
/Users/runner/miniconda3/envs/test/lib/python3.11/site-packages/obspy/io/sac/sactrace.py:835: DocTestFailure
1424 'picks' prints fields which are used to define time picks.
1425
1426 An iterable of header fields can look like 'bea' or ('b', 'e', 'a').
1427
1428 .. rubric:: Example
1429
1430 >>> from obspy.core.util import get_example_file
1431 >>> file_ = get_example_file("LMOW.BHE.SAC")
1432 >>> sac = SACTrace.read(file_)
1433 >>> sac.lh() # doctest: +NORMALIZE_WHITESPACE +ELLIPSIS
Differences (unified diff with -expected +actual):
@@ -1,11 +1,11 @@
Reference Time = 04/10/2001 (100) 00:23:00.465000
- iztype IB: begin time
+	iztype IB: begin time
a = 0.0
b = 0.0
-delta = 0.009999999...
-depmax = 0.003305610...
-depmen = 0.00243799...
-depmin = 0.00148824...
-e = 0.98999997...
+delta = 0.009999999776482582
+depmax = 0.0033056100364774466
+depmen = 0.0024379948154091835
+depmin = 0.0014882400864735246
+e = 0.9899999778717756
iftype = itime
iztype = ib
@@ -26,5 +26,5 @@
nzsec = 0
nzyear = 2001
-stla = -39.409999...
+stla = -39.40999984741211
stlo = 175.75
unused23 = 0
/Users/runner/miniconda3/envs/test/lib/python3.11/site-packages/obspy/io/sac/sactrace.py:1433: DocTestFailure
020
021 >>> import obspy
022 >>> cat = obspy.read_events("/path/to/test.scardec")
023 >>> print(cat)
024 1 Event(s) in Catalog:
025 2014-01-25T05:14:18.000000Z | -7.985, +109.265 | 6.20 mw
026
027 The event will contain one origins with a moment rate function.
028
029 >>> print(cat[0]) # doctest: +NORMALIZE_WHITESPACE +ELLIPSIS
Differences (unified diff with -expected +actual):
@@ -1,13 +1,13 @@
-Event: 2014-01-25T05:14:18.000000Z | -7.985, +109.265 | 6.20 mw
+Event:	2014-01-25T05:14:18.000000Z | -7.985, +109.265 | 6.20 mw
<BLANKLINE>
- resource_id: ResourceIdentifier(id="...")
- event_type: 'earthquake'
- preferred_origin_id: ResourceIdentifier(id="...")
- preferred_magnitude_id: ResourceIdentifier(id="...")
- preferred_focal_mechanism_id: ResourceIdentifier(id="...")
- ---------
- event_descriptions: 1 Elements
- comments: 1 Elements
- focal_mechanisms: 1 Elements
- origins: 1 Elements
- magnitudes: 1 Elements
+	 resource_id: ResourceIdentifier(id="smi:local/scardec/SCARDEC_event/event")
+	 event_type: 'earthquake'
+	 preferred_origin_id: ResourceIdentifier(id="smi:local/scardec/SCARDEC_event/origin#cmt")
+	 preferred_magnitude_id: ResourceIdentifier(id="smi:local/scardec/SCARDEC_event/magnitude#mw")
+	 preferred_focal_mechanism_id: ResourceIdentifier(id="smi:local/scardec/SCARDEC_event/focal_mechanism")
+	 ---------
+	 event_descriptions: 1 Elements
+	 comments: 1 Elements
+	 focal_mechanisms: 1 Elements
+	 origins: 1 Elements
+	 magnitudes: 1 Elements
/Users/runner/miniconda3/envs/test/lib/python3.11/site-packages/obspy/io/scardec/__init__.py:29: DocTestFailure
028 .KONO.0.B0Z | 2001-01-13T17:45:01.999000Z - ... | 20.0 Hz, 6000 samples
029 .KONO.0.L0Z | 2001-01-13T17:42:24.924000Z - ... | 1.0 Hz, 3542 samples
030 .KONO.0.L0N | 2001-01-13T17:42:24.924000Z - ... | 1.0 Hz, 3542 samples
031 .KONO.0.L0E | 2001-01-13T17:42:24.924000Z - ... | 1.0 Hz, 3542 samples
032
033 The file format will be determined automatically. Each trace (multiple channels
034 are mapped to multiple traces) will have a stats attribute containing the usual
035 information.
036
037 >>> print(st[0].stats) # doctest: +NORMALIZE_WHITESPACE
Differences (unified diff with -expected +actual):
@@ -1,11 +1,11 @@
- network:
- station: KONO
- location: 0
- channel: B0Z
- starttime: 2001-01-13T17:45:01.999000Z
- endtime: 2001-01-13T17:50:01.949000Z
- sampling_rate: 20.0
- delta: 0.05
- npts: 6000
- calib: 1.0
- _format: SEISAN
+ network:
+ station: KONO
+ location: 0
+ channel: B0Z
+ starttime: 2001-01-13T17:45:01.999000Z
+ endtime: 2001-01-13T17:50:01.949000Z
+ sampling_rate: 20.0
+ delta: 0.05
+ npts: 6000
+ calib: 1.0
+ _format: SEISAN
/Users/runner/miniconda3/envs/test/lib/python3.11/site-packages/obspy/io/seisan/__init__.py:37: DocTestFailure
027 3 Trace(s) in Stream:
028 .TEST..BHN | 2009-10-01T12:46:01.000000Z - ... | 20.0 Hz, 801 samples
029 .TEST..BHE | 2009-10-01T12:46:01.000000Z - ... | 20.0 Hz, 801 samples
030 .WET..HHZ | 2010-01-01T01:01:05.999000Z - ... | 100.0 Hz, 4001 samples
031
032 The file format will be determined automatically. Each trace (multiple channels
033 are mapped to multiple traces) will have a stats attribute containing the usual
034 information.
035
036 >>> print(st[0].stats) #doctest: +NORMALIZE_WHITESPACE +ELLIPSIS
Differences (unified diff with -expected +actual):
@@ -1,12 +1,12 @@
- network:
- station: TEST
- location:
- channel: BHN
- starttime: 2009-10-01T12:46:01.000000Z
- endtime: 2009-10-01T12:46:41.000000Z
- sampling_rate: 20.0
- delta: 0.05
- npts: 801
- calib: 1.5
- _format: SH_ASC
- sh: AttribDict({...})
+ network:
+ station: TEST
+ location:
+ channel: BHN
+ starttime: 2009-10-01T12:46:01.000000Z
+ endtime: 2009-10-01T12:46:41.000000Z
+ sampling_rate: 20.0
+ delta: 0.05
+ npts: 801
+ calib: 1.5
+ _format: SH_ASC
+ sh: AttribDict({'COMMENT': 'TEST TRACE IN QFILE #1'})
/Users/runner/miniconda3/envs/test/lib/python3.11/site-packages/obspy/io/sh/__init__.py:36: DocTestFailure
016
017 Example
018 -------
019
020 Don't use this module directly but utilize it through the
021 :func:`~obspy.core.inventory.inventory.read_inventory` function.
022
023 >>> import obspy
024 >>> inv = obspy.read_inventory("/path/to/channel_level_fdsn.txt")
025 >>> print(inv) # # doctest: +ELLIPSIS +NORMALIZE_WHITESPACE
Differences (unified diff with -expected +actual):
@@ -1,13 +1,13 @@
-Inventory created at ...
- Created by: ObsPy ...
- https://www.obspy.org
- Sending institution: None
- Contains:
- Networks (2):
- AK, AZ
- Stations (3):
- AK.BAGL ()
- AK.BWN ()
- AZ.BZN ()
- Channels (6):
- AK.BAGL..LHZ, AK.BWN..LHZ (2x), AZ.BZN..LHZ (3x)
+Inventory created at 2025-08-19T13:27:25.690715Z
+	Created by: ObsPy 1.4.2.post0+14.gf4b209e56e
+		 https://www.obspy.org
+	Sending institution: None
+	Contains:
+		Networks (2):
+			AK, AZ
+		Stations (3):
+			AK.BAGL ()
+			AK.BWN ()
+			AZ.BZN ()
+		Channels (6):
+			AK.BAGL..LHZ, AK.BWN..LHZ (2x), AZ.BZN..LHZ (3x)
/Users/runner/miniconda3/envs/test/lib/python3.11/site-packages/obspy/io/stationtxt/__init__.py:25: DocTestFailure
014 Reading
015 -------
016 Importing WAV files is done similar to reading any other waveform data
017 format within ObsPy by using the :func:`~obspy.core.stream.read()` method of
018 the :mod:`obspy.core` module. Examples seismograms files may be found at
019 https://examples.obspy.org.
020
021 >>> from obspy import read
022 >>> st = read("/path/to/3cssan.near.8.1.RNON.wav")
023 >>> print(st) #doctest: +NORMALIZE_WHITESPACE
Expected:
1 Trace(s) in Stream:
... | 1970-01-01T00:00:00.000000Z - 1970-01-01T00:00:00.371143Z
| 7000.0 Hz, 2599 samples
Got:
1 Trace(s) in Stream:
... | 1970-01-01T00:00:00.000000Z - 1970-01-01T00:00:00.371143Z | 7000.0 Hz, 2599 samples
/Users/runner/miniconda3/envs/test/lib/python3.11/site-packages/obspy/io/wav/__init__.py:23: DocTestFailure
076 :type filename: str
077 :param filename: Audio WAV file to be read.
078 :rtype: :class:`~obspy.core.stream.Stream`
079 :return: A ObsPy Stream object.
080
081 .. rubric:: Example
082
083 >>> from obspy import read
084 >>> st = read("/path/to/3cssan.near.8.1.RNON.wav")
085 >>> print(st) #doctest: +NORMALIZE_WHITESPACE
Expected:
1 Trace(s) in Stream:
... | 1970-01-01T00:00:00.000000Z - 1970-01-01T00:00:00.371143Z
| 7000.0 Hz, 2599 samples
Got:
1 Trace(s) in Stream:
... | 1970-01-01T00:00:00.000000Z - 1970-01-01T00:00:00.371143Z | 7000.0 Hz, 2599 samples
/Users/runner/miniconda3/envs/test/lib/python3.11/site-packages/obspy/io/wav/core.py:85: DocTestFailure
175
176 :rtype: tuple(:class:`numpy.ndarray`, :class:`numpy.ndarray`,
177 :class:`numpy.ndarray`)
178 :returns: The three rotated components, oriented in Z, N, and E if
179 `inverse` is `False`. Otherwise they will be oriented as specified
180 by the dips and azimuths.
181
182 An input of ZNE yields an output of ZNE
183
184 >>> rotate2zne(np.arange(3), 0, -90, np.arange(3) * 2, 0, 0, np.arange(3) * 3, 90, 0) # doctest: +NORMALIZE_WHITESPACE
Expected:
(array([ 0., 1., 2.]), array([ 0., 2., 4.]), array([ 0., 3., 6.]))
Got:
(array([ 0., 1., 2.]), array([ 0., 2., 4.]), array([ 0., 3., 6.]))
/Users/runner/miniconda3/envs/test/lib/python3.11/site-packages/obspy/signal/rotate.py:184: DocTestFailure
050 Travel Times
051 ^^^^^^^^^^^^
052 The models' main method is the
053 :meth:`~obspy.taup.tau.TauPyModel.get_travel_times` method; as the name
054 suggests it returns travel times for the chosen phases, distance, source depth,
055 and model. By default it returns arrivals for a number of phases.
056
057 >>> arrivals = model.get_travel_times(source_depth_in_km=55,
058 ... distance_in_degree=67)
059 >>> print(arrivals) # doctest: +NORMALIZE_WHITESPACE
Differences (unified diff with -expected +actual):
@@ -1,29 +1,29 @@
28 arrivals
- P phase arrival at 647.041 seconds
- pP phase arrival at 662.233 seconds
- sP phase arrival at 668.704 seconds
- PcP phase arrival at 674.865 seconds
- PP phase arrival at 794.992 seconds
- PKiKP phase arrival at 1034.098 seconds
- pPKiKP phase arrival at 1050.528 seconds
- sPKiKP phase arrival at 1056.721 seconds
- S phase arrival at 1176.948 seconds
- pS phase arrival at 1195.508 seconds
- SP phase arrival at 1196.830 seconds
- sS phase arrival at 1203.129 seconds
- PS phase arrival at 1205.421 seconds
- SKS phase arrival at 1239.090 seconds
- SKKS phase arrival at 1239.109 seconds
- ScS phase arrival at 1239.512 seconds
- SKiKP phase arrival at 1242.388 seconds
- pSKS phase arrival at 1260.314 seconds
- sSKS phase arrival at 1266.921 seconds
- SS phase arrival at 1437.427 seconds
- PKIKKIKP phase arrival at 1855.271 seconds
- SKIKKIKP phase arrival at 2063.564 seconds
- PKIKKIKS phase arrival at 2069.756 seconds
- SKIKKIKS phase arrival at 2277.857 seconds
- PKIKPPKIKP phase arrival at 2353.934 seconds
- PKPPKP phase arrival at 2356.426 seconds
- PKPPKP phase arrival at 2358.899 seconds
- SKIKSSKIKS phase arrival at 3208.155 seconds
+	P phase arrival at 647.041 seconds
+	pP phase arrival at 662.233 seconds
+	sP phase arrival at 668.704 seconds
+	PcP phase arrival at 674.865 seconds
+	PP phase arrival at 794.992 seconds
+	PKiKP phase arrival at 1034.098 seconds
+	pPKiKP phase arrival at 1050.528 seconds
+	sPKiKP phase arrival at 1056.721 seconds
+	S phase arrival at 1176.948 seconds
+	pS phase arrival at 1195.508 seconds
+	SP phase arrival at 1196.830 seconds
+	sS phase arrival at 1203.129 seconds
+	PS phase arrival at 1205.421 seconds
+	SKS phase arrival at 1239.090 seconds
+	SKKS phase arrival at 1239.109 seconds
+	ScS phase arrival at 1239.512 seconds
+	SKiKP phase arrival at 1242.388 seconds
+	pSKS phase arrival at 1260.314 seconds
+	sSKS phase arrival at 1266.921 seconds
+	SS phase arrival at 1437.427 seconds
+	PKIKKIKP phase arrival at 1855.271 seconds
+	SKIKKIKP phase arrival at 2063.564 seconds
+	PKIKKIKS phase arrival at 2069.756 seconds
+	SKIKKIKS phase arrival at 2277.857 seconds
+	PKIKPPKIKP phase arrival at 2353.934 seconds
+	PKPPKP phase arrival at 2356.426 seconds
+	PKPPKP phase arrival at 2358.899 seconds
+	SKIKSSKIKS phase arrival at 3208.155 seconds
/Users/runner/miniconda3/envs/test/lib/python3.11/site-packages/obspy/taup/__init__.py:59: DocTestFailure

Skipped tests (20)

Submodule Test Skip message
core core/stream.py::obspy.core.stream._is_pickle Skipped: all tests skipped by +SKIP option
core.util core/util/misc.py::obspy.core.util.misc.CatchOutput Skipped: all tests skipped by +SKIP option
core.util core/util/misc.py::obspy.core.util.misc.SuppressOutput Skipped: all tests skipped by +SKIP option
core.util core/util/misc.py::obspy.core.util.misc.TemporaryWorkingDirectory Skipped: all tests skipped by +SKIP option
geodetics geodetics/tests/test_util_geodetics.py::TestUtilGeodetics::test_gps_2_dist_azimuth_bug150 Skipped: Geographiclib installed, not using calc_vincenty_inverse
imaging imaging/tests/test_mopad_script.py::TestMopad::test_script_plot Skipped: Currently broken until further review.
io.ascii io/ascii/core.py::obspy.io.ascii.core._is_slist Skipped: all tests skipped by +SKIP option
io.ascii io/ascii/core.py::obspy.io.ascii.core._is_tspair Skipped: all tests skipped by +SKIP option
io.gcf io/gcf/core.py::obspy.io.gcf.core._write_gcf Skipped: all tests skipped by +SKIP option
io.nordic io/nordic/utils.py::obspy.io.nordic.utils._evmagtonor Skipped: all tests skipped by +SKIP option
io.nordic io/nordic/utils.py::obspy.io.nordic.utils._nortoevmag Skipped: all tests skipped by +SKIP option
io.pde io/pde/mchedr.py::obspy.io.pde.mchedr._is_mchedr Skipped: all tests skipped by +SKIP option
io.quakeml io/quakeml/core.py::obspy.io.quakeml.core._is_quakeml Skipped: all tests skipped by +SKIP option
io.seisan io/seisan/core.py::obspy.io.seisan.core._is_seisan Skipped: all tests skipped by +SKIP option
io.sh io/sh/core.py::obspy.io.sh.core._is_asc Skipped: all tests skipped by +SKIP option
io.sh io/sh/core.py::obspy.io.sh.core._is_q Skipped: all tests skipped by +SKIP option
io.wav io/wav/core.py::obspy.io.wav.core._is_wav Skipped: all tests skipped by +SKIP option
io.y io/y/core.py::obspy.io.y.core._is_y Skipped: all tests skipped by +SKIP option
signal signal/quality_control.py::obspy.signal.quality_control.MSEEDMetadata Skipped: all tests skipped by +SKIP option
signal signal/tests/test_quality_control.py::TestQualityControl::test_schema_validation Skipped: Test requires the jsonschema module

Slowest tests (20)

Runtime Test
56.627s geodetics/tests/test_util_flinnengdahl.py::TestUtilFlinnEngdahl::test_coordinates
5.319s io/xseed/tests/test_core.py::TestCore::test_response_calculation_from_seed_and_xseed
4.472s core/tests/test_event.py::TestEvent::test_plot_farfield_without_quiver_with_maps
3.532s core/tests/test_inventory.py::TestInventoryCartopy::test_location_plot_local
2.212s taup/tests/test_tau.py::TestTauPyModel::test_regional_models
2.082s taup/tests/test_seismic_phase.py::TestTauPySeismicPhase::test_shoot_existing_ray_param
2.054s core/tests/test_inventory.py::TestInventoryCartopy::test_location_plot_global
1.705s io/arclink/tests/test_inventory_xml.py::TestArclinkInventory::test_auto_read_arclink_xml
1.646s signal/tests/test_cross_correlation.py::TestCrossCorrelation::test_correlate_stream_template_and_correlation_detector
1.523s core/stream.py::obspy.core.stream.read
1.400s signal/tests/test_calibration.py::TestCalibration::test_relcal_different_overlaps
1.386s signal/tests/test_spectral_estimation.py::TestPsd::test_ppsd_restricted_stacks
1.377s core/tests/test_trace.py::TestTrace::test_remove_response_plot
1.146s imaging/tests/test_ppsd.py::TestPPSD::test_ppsd_plot
1.125s taup/tests/test_seismic_phase.py::TestTauPySeismicPhase::test_many_identically_named_phases
1.112s taup/tests/test_velocity_model.py::TestTauPyVelocityModel::test_read_velocity_model
0.988s taup/tests/test_tau.py::TestTauPyModel::test_vs_java_iasp91
0.930s io/alsep/tests/test_alsep.py::TestAlsep::test_read_alsep_pse_file_with_ignore_error
0.910s signal/tests/test_interpolation.py::TestInterpolation::test_plot_lanczos_window
0.883s core/tests/test_network.py::TestNetworkCartopy::test_location_plot_global