Skip to content

Releases: comoglu/sc-extractor

v1.0.2 — Fix missing picks on Python < 3.11 (Windows/Spyder)

26 May 04:47

Choose a tag to compare

What's fixed

Picks with non-standard fractional seconds are no longer silently dropped on Python 3.7–3.10.

datetime.fromisoformat on Python 3.7–3.10 only accepts the formats produced by datetime.isoformat() — which uses exactly 0 or 6 fractional second digits. SeisComP XML can emit any number of digits (e.g. 11:39:39.7 or 11:39:35.71221), causing fromisoformat to raise ValueError on older Python. Those arrivals were then silently skipped.

Impact: On a file containing picks with 1- or 5-digit fractional seconds, users on Windows/Spyder (Python 3.9 or 3.10) would get fewer records than expected. The Stacey test file has three such picks, giving 21 records instead of the correct 24.

Fix: Fractional seconds are now normalised to exactly 6 digits before parsing, making _parse_iso safe on Python 3.7+.

How to update

git pull

Or download the source zip from this release page.

v1.0.1 — Fix station magnitude selection for multi-type origins

26 May 04:37

Choose a tag to compare

What's fixed

Station magnitude now correctly reflects the preferred network magnitude type.

In SeisComP XML files where a single origin stores station magnitudes for multiple magnitude types (e.g. MLv, ML, and MLa all present as stationMagnitude children of the same origin), the extractor was previously selecting the first entry in document order rather than the one linked to the preferred network magnitude. This caused:

  • station_magnitude_type and station_magnitude_value to reflect the wrong magnitude type (e.g. MLv instead of the preferred MLa).
  • station_magnitude_residual and station_magnitude_used to be empty for all affected stations, because the first-match publicID was not in the preferred magnitude's contribution list.

The fix scans all stationMagnitude elements matching a station's NET.STA pair and prefers the entry whose publicID appears in the preferred magnitude's stationMagnitudeContribution list. It falls back to the first match for stations that have magnitude data but did not contribute to the preferred magnitude.

How to update

If you cloned before this release, run:

git pull

Or download the source zip from this release page.

Requirements

  • Python 3.9+
  • pip install PyQt5 (GUI only)
  • pip install pyarrow (Parquet export, optional)