What's New in ObsPy 1.4 - obspy/obspy GitHub Wiki

Logo

This document details significant new features and changes in ObsPy 1.4.0 (DOI for this version: 10.5281/zenodo.6645832). The Full Changelog at the end is more comprehensive. This release is based on around 640 commits of ca 23 individual contributors over the course of the last 8 months since the last major release 1.3.0.

Documentation and resources for this version can (as always) be found at: https://docs.obspy.org


Aside from the occasional change and new feature, there never was any formal funding for ObsPy and it has been developed by enthusiastic volunteers, mostly from academia. If you use ObsPy, please consider acknowledging us so we can justify investing time into it.


Index


Supported Systems

We officially support the following systems (meaning we test that they work with ObsPy; other versions - especially newer ones, might work, but we cannot guarantee that, upper boundary is basically versions available through conda-forge at time of release).

Python modules:

  • Python: 3.8, 3.9, 3.10 and 3.11
  • NumPy: 1.20.0 - 1.23.4
  • SciPy: 1.7.0 - 1.9.3
  • matplotlib: 3.3.0 - 3.6.2
  • cartopy: 0.20.x - 0.21.0

Supported Operating Systems:

  • Windows
  • OSX
  • Linux
  • Raspberry Pi

See test reports for version 1.4.0.


Updating ObsPy

Updating should be straight-forward. So depending on your installation do

# Generic Python
#
# For the first time we also have binary wheels for Linux and OSX so
# this now also works without a compiler.
$ pip install -U obspy pytest pytest-json-report
# Anaconda Python Distribution
$ conda update -c conda-forge obspy pytest pytest-json-report

..or whatever your package manager of choice needs to be told to update a package.


Backwards Incompatible / Breaking Changes / Removals

  • In response calculations, unknown units (e.g. "RAD/S" - radian per second) will now be reported as "undefined" to evalresp instead of "DIS" (displacement), which in the past led to a differentiation being added with default parameters (since default is output="VEL"). Now, when unknown units are in the response, evalresp should just calculate the response exactly as specified in the station metadata. This should not affect most use cases at all, since usually units are known to evalresp.
  • obspy.clients.seishub has been removed, since it is outdated and not even test servers have been running for years
  • obspy.db has been removed, since it was mostly being used in discontinued seishub server

New Deprecations

  • NRL: the client connecting online to NRL is deprecated, since IRIS is moving towards a new NRL webpage that is lacking the easy machine readable navigation info and the old NRL web page is slated for removal in Spring 2023. The NRL client can still be used with a full NRL download from the new NRL web page though.

Notable Changes in IO modules

  • io.alsep: New module for reading data from the Apollo missions stored in ALSEP format
  • io.nlloc: fix reading seismic phases written by newer NonLinLoc version 7 and various fixes and improvements, see details in full changelog
  • io.nordic: various fixes and improvements, see details in full changelog
  • io.sac: new kwarg keep_sac_header=True that can be set to False to force a "fresh" SAC on output to SAC format and fix writing SACPZ with unset sensor elements in metadata
  • io.seiscomp: updated sc3ml schema files for various improvements reading sc3ml files

Notable Bug Fixes and Improvements

Bugs
  • prevent memory leakage in very long running (realtime) applications by Trace.stats.processing growing without limitations
  • fix map plots (Catalog, Inventory) when using custom settings for e.g. "projection" (these weren't properly passed through and thus ignored in last version)
  • Baer picker: fix some crashes on certain libffi versions
  • polarization analysis: fix calculation of timestamps as center of processed sliding window in some methods
Improvements
  • FDSN client: station bulk request can now use all valid options, like geographical constraints
  • spectrogram: improve default parameters for input data with sampling rates much higher or lower than the most common values around 100 Hz
  • coincidence trigger: performance improvements
  • taup: many miscellaneous improvements, see full changelog for details

Full Changelog

1.4.0 (doi: 10.5281/zenodo.6645832)
===================================

Changes:
 - obspy.core:
   * Minimum supported Python version is now 3.8 (see #3081, #3087)
   * Minimum supported dependency versions are now numpy 1.20, scipy 1.7 and
     matplotlib 3.3 (see #3081, #3087)
   * response: avoid reporting all unkown units (e.g. "RAD/S") to evalresp as
     displacement ("DIS") which with default value for "output" ("VEL") leads
     to evalresp adding a differentiation during response calculation. Instead
     report undefined unit, which makes evalresp use response as is and
     essentially ignoring "output" parameter (see #2945)
   * Improved expanded channel information in string representation of Station,
     e.g. when displaying station in IPython shell (see #3024)
   * limit length of list which records processing info (see #2882)
   * map plots: fix initial map setup, properly pass through user specified
     options, like "projection" etc (see #3191)
 - obspy.clients.fdsn:
   * update URL for NCEDC to https (see #3203)
   * add all valid parameters to get_stations_bulk, e.g. geographical
     constraints (see #3140)
   * do not use autodiscovery of file format in get_stations, unless "format"
     is set to something we do not recognize (see #3138)
   * fix a bug in routing client that made any request made error out when
     "debug=True" was set (see #3214)
   * fix raising FDSNTooManyRequestsException when server rejects request due
     to rate limiting, due to a bug instead a TypeError was raised (see #3219)
 - obspy.clients.seishub:
   * submodule removed completely, since it is outdated and not even test
     servers have been running for years (see #2994)
 - obspy.db:
   * submodule removed completely, since mostly being used in discontinued
     seishub server (see #2994)
 - obspy.imaging:
   * spectrogram: change the computation for default window length if not
     specified to give useful values for sampling rates much higher or lower
     than 100 Hz (see #3093)
   * spectrogram: better exception type and messages when input signal is too
     short (see #3093)
   * map plots: fix initial map setup, properly pass through user specified
     options, like "projection" etc (see #3191)
 - obspy.io.alsep:
   * new module for reading data from the Apollo missions stored in ALSEP
     format (see #3156)
 - obspy.io.nlloc:
   * avoid mangling channel/component code when writing nonlinloc phase file,
     just write full channel code unchanged into nonlinloc's "component" field
     (see #3223)
   * fix reading nonlinloc hypocenter files written by newer nonlinloc
     versions, data parsed into Arrivals was wrong (see #3223)
   * read geometrical station azimuth instead of ray takeoff azimuth from
     hypocenter. This is more robust (ray takeoff values sometimes not accurate
     at all) and also follows more the QuakeML documentation that states
     "Azimuth of station as seen from the epicenter" which implies a simple
     geometrical calculation (see #3224)
   * ignore ray takeoff dip if the stated quality for it is "0 - unreliable".
     our example data show that values can be blatantly wrong when quality is
     reported as "0" (see #3224)
   * write timing error as "0.0" if it is not set on a pick, as recommended by
     nonlinloc's author (see #2371, #3224)
 - obspy.io.nordic:
   * add support for writing multiple amplitudes for one pick (only new format)
     and writes some amplitude lines more compact (see #3075, also #2814)
   * add full support for reading and writing apparent velocity and backazimuth
     with new nordic format (see #3075)
   * fix comments on angle of incidence vs. takeoff angle (What is called
     angle of incidence in Seisan is the same as what is usually referred to as
     takeoff angle, see #3075)
   * add function to check whether phase is valid IASPEI phase in Seisan (#3075)
   * full support for writing high-accuracy origin line (see #3075)
 - obspy.io.sac:
   * expose a `keep_sac_header` flag to the `write` plugin, which allows users
     to write a "fresh" SAC header, instead of attempting to merge information
     from an old SAC header, if one exists. (see #2760)
   * fix writing SACPZ when a channel's sensor filed is unset (see #3187)
 - obspy.signal:
   * coincidence trigger: improve speed of template matching and less memory
     usage (see #3104)
   * Baer picker: fix a bug that could cause crashes on certain versions of
     libffi (see #3183)
   * polarization analysis: fix calculation of timestamps of the resulting
     values (see #3211)
 - obspy.taup:
   * add option "indicate_wave_type" to distinguish S waves in ray paths
     plot by using wiggly lines for shear waves (see #3047)
   * improved accuracy of ray paths by change of root-finding algorithm
     in SeismicPhase.refine_arrival (see #3064, #3096)
   * improved accuracy of travel time estimates by using theta function
     (see #3068)
   * add support for models without a core or inner core
     (see #1200, #1423, #2086, #2192, #2390, #3070)
   * add support for a wider range of diffracted phases, like SedPdiffKP
     (see #3085) and PKdiffP (see #3095)
   * allow rapid travel time plotting in plot_travel_times by using
     precalculated travel times (see #3092)
   * return pierce points for any depth (see #1742, #3072)
   * bug fix for rays which cannot turn due to low velocity at bottom
     of layer (see #3080)
   * add some checks for bad phases, so "ScScS" is not allowed
     (see #2774, #3082)
   * bug fix for sources within high slowness regions (see #2976, #3100)