Skip to main content

Locally stationary process simulation

Project description

lsp-sim

Locally Stationary Process Simulation in Python

This package provides tools to simulate locally stationary processes (LSPs) in Silverman’s sense with a flexible covariance structure: stationary correlation part $r(\tau)$ and time-varying power part $q(\eta)$, both chosen as Gaussian functions.

It includes the functions:

-lsp_f0_sim for simulating LSP realizations

-wv_lsp for calculating the Wigner-Ville distribution of the LSP

A simple Jupyter notebook demo demo_lsp_sim.ipynb is included for exploring parameter effects. Reproducible simulations can be obtained by fixing random seeds.

Installation

Clone the repository and install

git clone https://github.com/RacheleAnderson/lsp-sim.git
cd lsp-sim
uv pip install -e .

Jupyter Demo

Launch the included notebook to see comparisons across parameter sets:

uv run jupyter notebook notebooks/demo_lsp_sim.ipynb

The demo visualizes:

  • Simulated realizations showing different behaviors of the realizations when changing the parameters (3 cases)
  • Covariance matrices for the 3 cases of different parameter configurations
  • Wigner-Ville distribution for the 3 cases of different parameter configurations

Background

The model is presented in the research paper

Anderson, R., Sandsten, M. Time-frequency feature extraction for classification of episodic memory. EURASIP J. Adv. Signal Process. 2020, 19 (2020).

available online (Open Access) at: https://doi.org/10.1186/s13634-020-00681-8

Matlab code is available for repeating the study, see https://github.com/RacheleAnderson/lsp-time-frequency. This Python package is a simple version with the limited scope of simulating LSP realizations according to the model.

License

MIT License — see LICENSE for details.

Project details


Download files

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

Source Distribution

lsp_sim-0.1.0.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lsp_sim-0.1.0-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file lsp_sim-0.1.0.tar.gz.

File metadata

  • Download URL: lsp_sim-0.1.0.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.1

File hashes

Hashes for lsp_sim-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1bededa1b422bd3fa06323a8ff42043430cfd8db9da0aaaa047f7143ffe3a670
MD5 27eab085bec8f3ba6b32c8354b45718b
BLAKE2b-256 07277721c40b7ce02c972edd876a3f1d3c0b591caacc2862a0bdfc2051bed609

See more details on using hashes here.

File details

Details for the file lsp_sim-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: lsp_sim-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.1

File hashes

Hashes for lsp_sim-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7bee99bf31ef2f6e3b913752ac6b03e0dd4e058c0cddb283fae177371611c354
MD5 05120f5247bf3a683c1853a1ae94f35e
BLAKE2b-256 70d9a7fc006933f4a3a5053f0a323e46054caaf0980adc7724ffdffd86f5fc7e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page