Skip to main content

pymechtest

License PyPI Code Style CI

pymechtest is a small, hopefully helpful python package to help engineers collate, process, analyse, and report on mechanical test data. I built pymechtest to help automate the things I did on a near-daily basis as a materials engineer. I hope it can prove some use to you too!

What is it?

:warning: This project should be considered in alpha and may change significantly without deprecation cycles.

Have you ever had to process a bunch of csv output from a mechanical test machine, copying and pasting data into a hacky Excel template to calculate things like elastic modulus and yield strength?

Only to then have to make another Excel file where you create a summary table...

And then have to copy and paste that into a report or an email...

And then you have to plot the data in Excel and spend half an hour tweaking the colours to get it to look at least halfway professional...

And then you discover Excel has formatted your strain column as a date for literally no reason so now your plots have broken...

And then next week you have to do all this again! :angry:

No more! :boom:

pymechtest has a very simple goal: to reduce the amount of time engineers spend munging data after a batch of mechanical testing.

Here is a quick taste of how easy it is to go from raw data to a gorgeous stress-strain plot:

from pymechtest import Tensile

# header and id_row are related to the structure of your csv files
tens = Tensile(folder = "path/to/raw/data", header = 8, id_row = 3)

# Plot a really nice stress-strain curve with Altair
tens.plot_curves()

plot_curves

The key features are:

  • Intuitive: The API is very intuitive, with descriptive methods like plot_curves and summarise
  • Column Autodetection: pymechtest will try to auto-detect which columns correspond to stress and strain, and ask you to clarify if it can't.
  • Sensible Defaults: The API is designed around sensible defaults for things like modulus strain range, whether to expect a yield strength etc.
  • Automatic Calculations: pymechtest will automatically calculate strength, elastic modulus, yield strength etc. for you.
  • Elegant Looking Stress Strain Curves: pymechtest uses altair to plot amazing looking stress strain curves.
  • Reliable: pymechtest uses battle-tested libraries like pandas, numpy and altair to do most of the work. The API is really a domain-specific convenience wrapper. pymechtest also maintains high test coverage.

Installation

pip install pymechtest

I also plan to make a conda package for this, once I've learned how to do it!

Help

An important note about pymechtest

While I've tried to generalise the API to be of use on different formats of raw data, it is impossible to cover every type of format and ensure compatability.

One way you can help is by try it on your data format, and raise an issue or submit a PR implementing your new format!

Release files for pymechtest 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pymechtest 0.1.4
File Size Uploaded
pymechtest-0.1.4.tar.gz 24.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pymechtest 0.1.4
File Interpreter ABI Platform
pymechtest-0.1.4-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 49.2 kB

Release files / pymechtest-0.1.4.tar.gz

Download URL pymechtest-0.1.4.tar.gz
Size 24.1 kB
Tags Source
SHA-256 checksum
How to use checksums
f929eb3d1739096b1f9f748269497f58d59e0eb4552163b60db615fa9412fcec
BLAKE2b-256 checksum
How to use checksums
a199ec135adca7ce04ef7a8d139dae65c0a470d0ddafb2e33a5fe941fa6dd4eb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.2 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7

Release files / pymechtest-0.1.4-py2.py3-none-any.whl

Download URL pymechtest-0.1.4-py2.py3-none-any.whl
Size 25.1 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
0e42f4810189c7bdd5bc9c8b574275a8ee58823d63b3f0017015c5e993d69c32
BLAKE2b-256 checksum
How to use checksums
03ebfcf22ecfc7027de7a1b8bec82ffb15335505a6a2d42bc9253178cfe71849
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.2 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7

Release history Release notifications | RSS feed

This release

0.1.4 This release

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

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