PyMODA logo

PyMODA Lancaster University Physics

Use this command to install PyMODA:
winget install --id=LUPhysics.PyMODA -e

PyMODA is a Python implementation of MODA (Multiscale Oscillatory Dynamics Analysis), a numerical toolbox developed by the Nonlinear & Biomedical Physics group at Lancaster University and the Nonlinear Dynamics and Synergetic Group at the Faculty of Electrical Engineering, University of Ljubljana, Slovenia under the supervision of Aneta Stefanovska.

PyMODA is a Python implementation of MODA (Multiscale Oscillatory Dynamics Analysis), designed to analyze and model oscillatory dynamics across multiple scales. It provides researchers with a powerful tool to study complex systems, including biological, physical, and engineering phenomena.

Key Features:

  • Implementation of MODA: Enables analysis of multiscale oscillatory dynamics in both simulated and experimental data.
  • Phase Shift Detection: Identifies phase shifts between signals at different scales, providing insights into synchronization patterns.
  • Cross-Scale Analysis: Assesses how oscillations interact across different temporal or spatial scales.
  • Integration with Python Ecosystem: Compatible with popular libraries such as NumPy and Matplotlib for seamless data processing and visualization.

Audience & Benefit: Ideal for researchers in physics, biology, engineering, and medicine to analyze complex oscillatory systems. PyMODA helps uncover hidden dynamics in experimental or simulated data, aiding in the development of more accurate models and predictions.

The software is available via winget for easy installation, ensuring a smooth setup process on compatible systems.

README

PyMODA

DOI License: GPL

PyMODA is a Python implementation of MODA (Multiscale Oscillatory Dynamics Analysis). The user interface is written using PyQt5, and the algorithms are imported from PyMODAlib. PyMODA is packaged as a standalone program using PyInstaller.

PyMODA is cross-platform and does not require any paid software. To get started, please see the User Guide or the Developer Guide.

Status

PyMODA plans to offer all the functionality available in MODA, but development is still in progress. This table shows the current status of different features.

WindowStatusWorks without MATLAB RuntimeNotes
Time-Frequency Analysis:heavy_check_mark::heavy_check_mark:
Detecting Harmonics:heavy_check_mark::heavy_check_mark:
Wavelet Phase Coherence:heavy_check_mark:Required for surrogates onlySurrogates not perfected
Group Phase Coherence:heavy_check_mark::heavy_check_mark:
Ridge Extraction and Filtering:heavy_check_mark:No
Wavelet Bispectrum Analysis:heavy_check_mark:No
Dynamical Bayesian InferencePartially implemented:heavy_check_mark:Algorithm not perfected

User Guide

This guide is aimed at users wishing to set up and run PyMODA. If you're interested in modifying or contributing to the program, you should use the Developer Guide.

Requirements

Some of PyMODA's functionality requires the MATLAB Runtime, version 9.6. If you don't have it installed, you'll still be able to use the functionality which doesn't depend on it.

Installation

Windows

To install PyMODA, download and run the setup executable. If you see a Windows Smartscreen popup, click "More info", then "Run anyway".

If you prefer, you can automate the entire download and installation process using this Powershell command:

Set-ExecutionPolicy Bypass -Scope Process -Force; 
iex ((New-Object System.Net.WebClient).DownloadString(
'https://raw.githubusercontent.com/luphysics/pymoda-install/master/windows/install.ps1'
))

Linux

Copy the following command into a terminal, then press enter:

sh -c "$(curl -fsSL https://raw.githubusercontent.com/luphysics/pymoda-install/master/linux/install.sh)"

PyMODA will automatically open when the process is complete.

> Tip: Most terminals require Ctrl+Shift+V instead of Ctrl+V for pasting.

macOS

Copy the following command into a terminal, then press enter:

sh -c "$(curl -fsSL https://raw.githubusercontent.com/luphysics/pymoda-install/master/macos/install.sh)"

> Tip: To open a terminal, press Cmd+Space, type "terminal" and press enter.

PyMODA will automatically open when the process is complete.

Launching PyMODA after installation

Windows

On Windows, PyMODA will create a desktop shortcut when it launches for the first time. You can also search for it in the Start menu.

macOS/Linux

On macOS and Linux, PyMODA adds a command, pymoda, to the terminal. You can use this command to launch PyMODA in future.

> Note: You may need to restart all open terminals for this to take effect.

Saving data

After performing a calculation, the results can be saved using the options under the Save item in the menu bar. Results can be saved to .mat (MATLAB) and .npy (Numpy) files.

When a data file is opened, it will have the following format:

  • In MATLAB: a struct containing a single struct.
  • In Python: a dictionary containing a single dictionary.

For each window, the name of the struct/dictionary is as follows:

NameWindow
TFDataTime-Frequency Analysis
DHDataDetecting Harmonics
PCDataWavelet Phase Coherence
GCDataGroup Phase Coherence
REDataRidge Extraction and Filtering
BADataWavelet Bispectrum Analysis
DBDataDynamical Bayesian Inference

> Note: Saving data is not yet implemented for Dynamical Bayesian Inference.

Versions
1.1.0
Website
License