Modal analysis data management, simulation and storage tool
Project description
Introduction
This library is a work in progress developed by the Applied Mechanics Lab, IQS School of Engineering, as part of the research in Structural Health Monitoring (SHM). This library enables the user to store and process Frequency Response Functions (FRF). The library includes a wide range of frequency-based damage indicators found in the literature. Currently, Transmissibility Functions (TF) are being implemented in the library. The library also includes tools for building certain geometries in ANSYS and get their FRFs. If you plan on using the ANSYS module, be sure to have a working ANSYS installation.
Features
Basic usage: Load, store and plot FRFs.
Post-processing FRFs: Modify properties of FRF.
Frequency-based correlation indicators: Indicators used for damage detection, similarity and model updating purposes.
ANSYS
Installation
In order to install this module, just run
pip install pymodal
in your terminal. This will also potentially install all the requirements, which you can find in requirements.txt, although they will be included here as well for clarity’s sake:
numpy
scipy
matplotlib
pandas
pyansys
Dev Installation
If you wish to try and add some features yourself or modify some of the existing ones, clone the repository and, in the same folder where the repo is cloned, run the following command:
pip install -e .[dev]
This will also potentially install all the development requirements, which you can find in requirements-dev.txt, although they are included here as well for clarity’s sake:
pytest
docutils
doc8
flake8
Basic usage
Make an instance of FRF class:
At least one of the following must be specified: Resolution, Bandwidth or Maximum frequency. If not specified, minimum frequency is assumed to be 0 Hz.
frf_data = pymodal.FRF(
frf,
resolution,
bandwidth,
max_freq,
min_freq,
name,
part,
modal_frequencies
)
Generate instance named frf_data from frf numpy array.
Add new FRFs to existing instance:
def extend(self, frf: list, name: list = None)
Save instance as zip file:
def extend(self, frf: list, name: list = None)
Plot FRF: Plot all FRFs together with varying colors unless otherwise specified.
def plot(self,
ax: list = None,
fontsize: float = 12,
title: str = 'Frequency Response',
title_size: float = None,
major_locator: int = 4,
minor_locator: int = 4,
fontname: str = 'serif',
color: list = None,
ylabel: str = None,
bottom_ylim: float = None,
decimals_y: int = 1,
decimals_x: int = 1):
Use slice to only plot specific FRFs.
frf_data[0].plot()
plt.show()
Post-processing FRFs
Change resolution
frf.change_resolution(frequencies=[0,100])
Change FRF lines
Change frequency range
Extract real part of FRF
Extract imaginary part of FRF
Calculate magnitude of FRF
Calculate phase of FRF
Extract modal frequencies
Extract mode shapes
Synthetic FRFs
Silhouette
Transmissibility matrix
Frequency-based damage indicators
Currently, the pymodal library holds the following damage indicators:
Frequency Response Function RMS [FRFRMS]:
def get_FRFRMS(self, ref:int)
https://www.sciencedirect.com/science/article/abs/pii/S1270963802011938
Global Amplitude Criterion [GAC]:
def get_GAC(self, ref:int, frf: list = None)
Average Integration Global Amplitude Criterion (AIGAC):
def get_AIGAC(self, ref:int)
Frequency Domain Assurance Criterion (FDAC):
Response Vector Assurance Criterion (RVAC)
Detection and Relative Quantification (DRQ)
Detection and Relative Quantification curvature-based (DRQ’’)
Frequency Response Function Scale Factor (FRFSF)
Coefficient of Determination (R^2)
ODS difference indicator (∆ODS)
Frequency Response Function Similarity Metric (FRFSM)
Complex Frequency Domain Assurance Crietrion [CFDAC]
Spectral Correlation Index [SCI] https://www.sciencedirect.com/science/article/abs/pii/S0888327018306551?via%3Dihub
def get_SCI(self, ref:int, part: str = 'abs')
MCP server
Pymodal ships an MCP server that exposes collection construction, signal processing, FRF computation, SHM-indicator math and PyTorch-dataset hand-off as tools an LLM agent can call directly.
Install the optional dependency:
pip install -e .[mcp]
Run the server (stdio transport):
python -m pymodal.mcp
# or, after install:
pymodal-mcp
Configure your MCP client (Claude Desktop, Claude Code, …) to launch python -m pymodal.mcp as a server. Every tool takes file paths in and writes file paths out, so a typical agent flow is
create_timeseries_collection → add_gaussian_noise → timeseries_to_frf → compute_indicator → split_collection → torch_dataset_summary.
Use list_indicators and list_collection_classes for in-tool discovery.
ANSYS
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pymodal-0.2.0.tar.gz.
File metadata
- Download URL: pymodal-0.2.0.tar.gz
- Upload date:
- Size: 55.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aee3974661103bb64e1c03f67c1eb1760aed8179c88f6255ae4584ddc8d53106
|
|
| MD5 |
c8f58e6b465dc715dbfddea4380ec0cc
|
|
| BLAKE2b-256 |
edcad100ced90b8ffc2a826c857472ee4dbc2edfd4f127b875780ad8bfdc97b6
|
Provenance
The following attestation bundles were made for pymodal-0.2.0.tar.gz:
Publisher:
publish-pypi.yml on grcarmenaty/pymodal
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pymodal-0.2.0.tar.gz -
Subject digest:
aee3974661103bb64e1c03f67c1eb1760aed8179c88f6255ae4584ddc8d53106 - Sigstore transparency entry: 1712888669
- Sigstore integration time:
-
Permalink:
grcarmenaty/pymodal@80bdd495c478d61bb5c31b0444cd8099a0c75c66 -
Branch / Tag:
refs/tags/0.2.0 - Owner: https://github.com/grcarmenaty
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@80bdd495c478d61bb5c31b0444cd8099a0c75c66 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pymodal-0.2.0-py3-none-any.whl.
File metadata
- Download URL: pymodal-0.2.0-py3-none-any.whl
- Upload date:
- Size: 54.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ad4e0fc3a21a0f047f1306f583eaaa8b922e19ec9ccb511ba9f3d77e170a2b42
|
|
| MD5 |
f0723e23e171f92e454ae1fe65b191df
|
|
| BLAKE2b-256 |
2f5450c8ebb7376391ac5cb5b57c8d7efac2311fc469d140904f89842c24aa17
|
Provenance
The following attestation bundles were made for pymodal-0.2.0-py3-none-any.whl:
Publisher:
publish-pypi.yml on grcarmenaty/pymodal
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pymodal-0.2.0-py3-none-any.whl -
Subject digest:
ad4e0fc3a21a0f047f1306f583eaaa8b922e19ec9ccb511ba9f3d77e170a2b42 - Sigstore transparency entry: 1712888712
- Sigstore integration time:
-
Permalink:
grcarmenaty/pymodal@80bdd495c478d61bb5c31b0444cd8099a0c75c66 -
Branch / Tag:
refs/tags/0.2.0 - Owner: https://github.com/grcarmenaty
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@80bdd495c478d61bb5c31b0444cd8099a0c75c66 -
Trigger Event:
push
-
Statement type: