Skip to main content

Signal Subspace

Language grade: Python ci_python ci_meson ci_cmake

pypi versions PyPi Download stats

1-D and ensemble signal subspace analysis with methods such as Esprit and RootMusic in Fortran, C, and Python

based in part upon the Spectral Analysis Lib public domain code

The core subspace code is written in Fortran 2008 and is called from other languages (Python, C). Since the programs are Fortran / Python based, they should compile and run in virtually any platform from embedded to supercomputer.

In particular, this program (Fortran, called by C or C++ optionally) works from compilers including:

  • Gfortran (GCC)
  • Intel oneAPI (ifort, icc, icpc)

Build

Prereqs:

  • Linux: apt install liblapack-dev g++ gcc gfortran cmake
  • Mac: brew install lapack gcc cmake
  • Windows: use MSYS2 or Windows Subsystem for Linux
ctest -S setup.cmake -VV

Then you can test Python calling the Fortran libraries by:

pip install -e .

pytest -v

In the examples below, observe the frequency estimates printed along with their corresponding eigenvalues. A larger eigenvalue is increased confidence in that particular frequency estimate.

Fortran

ESPRIT example with noisy sinusoid

There are two versions of this program, one a full accuracy using double complex numbers, and the other using single real numbers as input. The single real (4 bytes/number) runs about 4 times faster than the double complex (16 bytes/number) program.

./f_esprit_cmpl

./f_esprit_real

C ESPRIT example with noisy sinusoid

Here is an example of calling Fortran Esprit from C, which uses real single precision float:

./c_esprit

C++ ESPRIT example with noisy sinusoid

Example of calling Fortran Esprit from C++, which uses real single precision float:

./cpp_esprit

Python

Compile Fortran ESPRIT to use from Python via f2py

pip install -e .

Selftest Fortran/C/C++/Python Esprit from Python:

pytest

Notes

/liblapack.so: undefined reference to `ATL_zgeru'

Try removing Atlas:

apt remove libatlas-base-dev

Flang / Clang / Clang++

You may need

apt install libc++abi-dev

Plots comparing Fortran to Python

python BasicEspritExample.py

Metadata

Release files for signal-subspace 1.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for signal-subspace 1.1.1
File Size Uploaded
signal_subspace-1.1.1.tar.gz 12.5 kB Details

Release files / signal_subspace-1.1.1.tar.gz

Download URL signal_subspace-1.1.1.tar.gz
Size 12.5 kB
Tags Source
SHA-256 checksum
How to use checksums
6b07a9270c442303f5ca603750fc6ebccc4a1e91b9dfcab9f48f77da3f2f5df8
BLAKE2b-256 checksum
How to use checksums
7849371e90dc1104a4c96e819e5cf1c961c111b1590e1e1f7fc9c70098fbddd1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1.post20200622 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

Release history Release notifications | RSS feed

This release

1.1.1 This release

1 release file

1.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page