Skip to main content

Algorithms and scripts for analyzing recordings of electric fish waveforms.

Project description

Build Status codecov


Algorithms and programs for analysing electric field recordings of weakly electric fish.

Weakly electric fish generate an electric organ discharge (EOD). In wave-type fish the EOD resembles a sinewave of a specific frequency and with higher harmonics. In pulse-type fish EODs have a distinct waveform and are separated in time.THe thunderfish package provides tools for analysing both wavefish and pulsefish EODs.


Git Repository


The thunderfish package provides the following software:

  • fishfinder: Browse EOD recordings and detect EOD frequencyies on the fly.
  • thunderfish: Automatically detect and analyze all EOD waveforms in a short recording and generate a summary plot and data tables. Read documentation.
  • collectfish: Collect data generated by thunderfish. Read documentation.
  • eodexplorer: View and explore properties of EOD waveforms. Read documentation.


The following modules provide the algorithms for analyzing EOD recordings. Look into the modules for more information.


  • Configuration file with help texts for analysis parameter.
  • User input from console.
  • Load time-series data from files.
  • Read and write tables with a rich hierarchical header including units and formats.

Basic data analysis

  • Detect and hande peaks and troughs as well as threshold crossings in data arrays.
  • Compute and plot powerspectra and spectrograms for a given minimum frequency resolution.
  • Analyse Voronoi diagrams based on scipy.spatial.
  • Simple GUI for viewing and exploring multivariate data.

EOD analysis

  • Select the region within a recording with the most stable signal of largest amplitude that is not clipped.
  • Check whether a pulse-type or a wave-type weakly electric fish is present in a recording.
  • Create a list of EOD frequencies with fishes present in all provided fish lists.
  • Analyse EOD waveforms.
  • Extract and analyze harmonic frequencies from power spectra.
  • Extract and cluster pulse fish EOD waverforms.

EOD simulations

  • Simulate EOD waveforms.
  • Simulations of spatial electric fields.
  • Plot fish outlines.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for thunderfish, version 1.9.2
Filename, size File type Python version Upload date Hashes
Filename, size thunderfish-1.9.2-py3-none-any.whl (225.3 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size thunderfish-1.9.2.tar.gz (203.3 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page