Metadata-Version: 2.4
Name: pyisomme
Version: 0.0.4
Summary: Tools for ISO-MME file format (merge, report, calculate, CFC-filter, ...)
Author-email: Jonas Keller <jonaskeller14@googlemail.com>
License: MIT License
        
        Copyright (c) 2024 Jonas Keller
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/jonaskeller14/pyisomme
Keywords: pyisomme,isomme,iso-mme,iso
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: matplotlib~=3.7.4
Requires-Dist: astropy~=6.0.0
Requires-Dist: pandas~=2.2.0
Requires-Dist: tqdm~=4.66.1
Requires-Dist: numpy~=1.26.3
Requires-Dist: scipy~=1.12.0
Requires-Dist: python-pptx~=0.6.23
Requires-Dist: setuptools~=58.1.0
Requires-Dist: dtwalign~=0.1.1
Provides-Extra: dev
Requires-Dist: objective_rating_metrics; extra == "dev"
Dynamic: license-file

# pyisomme

## Installation

```
pip install pyisomme
```

## Features
- Read/write ISO-MME (compressed/uncompressed)
- Modify Channel and calculate Injury Risk Values (HIC, a3ms, DAMAGE, OLC, BrIC, NIJ, ...)
- Plot Curves and compare multiple ISO-MMEs
- Create PowerPoint Reports (Euro-NCAP, UN-R137, UN-R94)
- Display Limit bars in plots
- Compare performance of left-hand-drive vehicle with right-hand-drive vehicle
- Command line tool script for fast and easy use [pyisomme/\_\_main__.py](pyisomme/__main__.py) (list, merge, rename, plot, report, ...)

## Command Line Interface
List all commands with description
```
python -m pyisomme --help
python -m pyisomme <command> --help
```
### Examples
Merge multiple ISO-MME container
```
python -m pyisomme merge ./iso_merged.zip ./iso_1/v1.mme ./iso_2.zip ./iso_3.tar.gz
```
Resample (start=0ms / step=1ms / stop=100ms) with linear interpolation
```
python -m pyisomme merge ./iso_1/v1.mme ./iso_1/v1.mme --resample 0 0.001 0.1 
```
Plot Channel(s) for quick visualization (automatically calculates resultant head acceleration from x/y/z-channels and filters with filter-class A / 1000 Hz)
```
python -m pyisomme plot ./iso_1/v1.mme --codes 24HEAD??????ACRA --xlim 0 100 --calculate
```
Create Report (and only consider data from 0-200 ms)
```
python -m pyisomme report EuroNCAP_Frontal_MPDB report.pptx data\nhtsa\09203 --crop 0 0.2
```

## Python Examples
- [Read ISO-MME](docs/isomme_read.ipynb)
- [Write ISO-MME](docs/isomme_write.ipynb)


- [Signal deriviation/integration](docs/channel_diff_int.ipynb)
- [Add/Subtract/Multiply/Divide Signals](docs/channel_operators.ipynb)
- [Apply cfc-filter](docs/channel_filter.ipynb)


- [Plotting](docs/plotting.ipynb)

- [Report](docs/report.ipynb)

## Limitations
- Only test-info (.mme), channel-info (.chn) and channel data files (.001/.002/...) are supported. All other files (videos, photos, txt-files) will be ignored when reading and writing.
- No warning before overwriting! Be careful with merge-command and writing methods.
