Python package to automate the boring bits of mechanical test data analysis!
Project description
pymechtest
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!
-
Source Code: https://github.com/FollowTheProcess/pymechtest
-
Documentation: https://FollowTheProcess.github.io/pymechtest/
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()
The key features are:
- Intuitive: The API is very intuitive, with descriptive methods like
plot_curves
andsummarise
- 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!
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
File details
Details for the file pymechtest-0.1.4.tar.gz
.
File metadata
- Download URL: pymechtest-0.1.4.tar.gz
- Upload date:
- Size: 24.1 kB
- Tags: Source
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f929eb3d1739096b1f9f748269497f58d59e0eb4552163b60db615fa9412fcec |
|
MD5 | f4e7062df33f795df42f0b7ed869e38d |
|
BLAKE2b-256 | a199ec135adca7ce04ef7a8d139dae65c0a470d0ddafb2e33a5fe941fa6dd4eb |
File details
Details for the file pymechtest-0.1.4-py2.py3-none-any.whl
.
File metadata
- Download URL: pymechtest-0.1.4-py2.py3-none-any.whl
- Upload date:
- Size: 25.1 kB
- Tags: Python 2, Python 3
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0e42f4810189c7bdd5bc9c8b574275a8ee58823d63b3f0017015c5e993d69c32 |
|
MD5 | 6206e80da6c7dbd09a17c42f145e28f2 |
|
BLAKE2b-256 | 03ebfcf22ecfc7027de7a1b8bec82ffb15335505a6a2d42bc9253178cfe71849 |