Skip to main content

crashmetrics

PyPI Python Tests Docs License: MIT

Open-source Python for automotive crash safety calculations: injury criteria, Euro NCAP and Bharat NCAP scoring, pedestrian protection, AIS-100 compliance and LS-DYNA energy checks.

Documentation: https://vsk1729.github.io/crashmetrics/, with step-by-step guides, runnable examples, the full API reference and the protocol notes (every interpretation the package makes).

Development status: alpha. Validate results against the official protocol; the package does not certify regulatory compliance.

Install

python -m pip install crashmetrics

Python 3.10 or later; the only dependency is NumPy 1.24 or later.

What it covers

Area Highlights Guide
Signals SAE J211 CFC filter, resultants, unit conversion, HIC, peak, 3 ms clip, exceedance curves Signals
Pedestrian (Euro NCAP) Headform grid with correction factor, blue / default-red / A-pillar points; aPLI, upper legform, total VRU score Headform, Legforms
Pedestrian (India) AIS-100 compliance: Flex-PLI and legacy legform, upper legform, HIC1000 / HIC1700 zones; Flex-PLI assessment interval and Euro NCAP Flex-PLI score Flex-PLI and AIS-100
Frontal dummies DAMAGE, BrIC, neck loads, Nij, R94 limits, chest deflection, VC, CTI, THOR Rmax and abdomen, acetabulum, iliac force drop, femur, Tibia Index, knee slider Frontal criteria
Euro NCAP 2026 MPDB (20 points) and full width (10 points) with modifiers and the compatibility penalty MPDB and full width
Bharat NCAP AIS-197 ODB frontal and MDB side scores, ES-2 criteria, pole test, star rating Bharat NCAP
Vehicle OLC, delta-V, rebound, crush, absorbed energy, CFE, SEA Pulse and energy
LS-DYNA glstat / matsum energy checks, d3hsp run summary, crashmetrics-energy command LS-DYNA energy
Analytics Batch runs into tables for dashboards, DOE studies and ML datasets Batch and analytics

Quick examples

from crashmetrics.pedestrian import calculate_hic, check_flexpli, hic_colour
from crashmetrics.signals import cfc_filter, resultant, to_g, to_seconds

# HIC15 from LS-DYNA headform output (mm-ms-kg): filter each axis, then the resultant
t = to_seconds(time_ms, "ms")
a = resultant(*(cfc_filter(t, to_g(c, "mm/ms^2"), cfc=1000) for c in (ax, ay, az)))
hic = calculate_hic(t, a, window_ms=15.0)
print(hic.value, hic_colour(hic.value))          # Euro NCAP headform colour

# AIS-100 Rev.1 Flex-PLI check (peaks in N m and mm)
check = check_flexpli(tibia_moment=300, mcl=20, acl=6, pcl=5)
print(check.passed, check.worst, check.utilisation)

Bharat NCAP star rating, Euro NCAP MPDB score, legform grids and more are in the guides.

Runnable examples

The examples/ folder has ten scripts with synthetic data, one per topic, from 01_signals_hic.py to 10_batch_analytics.py. The test suite checks that each one still prints exactly its documented output.

python examples/07_bharat_ncap.py

Where the numbers come from

Formulas and limits come from publicly available protocols and standards: Euro NCAP (assessment protocols, CP 005, CP 007), Bharat NCAP (AIS-197), AIS-100, UN R94 and R127, UN GTR 9, FMVSS 208, SAE J211 and published research. The tests reproduce the protocols' own worked examples where they give one, and check other formulas against hand calculations and closed-form solutions.

Contributing

Issues and pull requests are welcome. See Development and releases for the setup and the checks CI runs, and the changelog for what changed.

Disclaimer and trademarks

crashmetrics is an engineering calculation aid and an independent open-source project. It is not affiliated with, endorsed by or sponsored by Ansys, Euro NCAP, Bharat NCAP, ARAI, UNECE or any other organisation whose software, file formats, protocols or regulations it refers to. LS-DYNA, Ansys and Euro NCAP are trademarks or registered trademarks of their respective owners, used here only to describe compatibility. The LS-DYNA readers were written from the text layout of output files; no LS-DYNA code or documentation is included.

License

MIT. See the LICENSE file.

Metadata

Release files for crashmetrics 0.9.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 crashmetrics 0.9.1
File Size Uploaded Provenance Actions
crashmetrics-0.9.1.tar.gz 144.7 kB With provenance Details for crashmetrics-0.9.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for crashmetrics 0.9.1
File Interpreter ABI Platform Actions
crashmetrics-0.9.1-py3-none-any.whl Python 3 none any Details for crashmetrics-0.9.1-py3-none-any.whl

Total release size: 238.8 kB

Release files / crashmetrics-0.9.1.tar.gz

Download URL crashmetrics-0.9.1.tar.gz
Size 144.7 kB
Tags Source
SHA-256 checksum
How to use checksums
59f99e47e2e5db5a743618faacd6fb9f1bf012f3a75c1f84b0b80f502b53a0d8
BLAKE2b-256 checksum
How to use checksums
aab61df1909c684c07e302809226e5d58c51dfcc1977b4eda9d22a122911ad74
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 28, 2026.

Transparency log

Release files / crashmetrics-0.9.1-py3-none-any.whl

Download URL crashmetrics-0.9.1-py3-none-any.whl
Size 94.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fd12d747e1f594c75b3e68963351f6d736ec7dc3f7ea151b8ea2445aaa091b0a
BLAKE2b-256 checksum
How to use checksums
3ffe5578552a32119826e7a46f2b55bace8c3013d76ddd948ca107a3893b03fe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 28, 2026.

Transparency log

Security for crashmetrics 0.9.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for crashmetrics-0.9.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 28, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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