Metadata-Version: 2.4
Name: mechprops-extractor
Version: 0.2.0
Summary: Extract Young's modulus, ultimate point, and break-point from stress-strain curves
Author-email: wyatthoho <wyatthoho@gmail.com>
License: MIT License
        
        Copyright (c) 2026 Wyatt Ho
        
        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/wyatthoho/mechprops-extractor
Project-URL: Repository, https://github.com/wyatthoho/mechprops-extractor
Keywords: stress-strain,mechanical-properties,materials-testing,youngs-modulus
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering
Requires-Python: >=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=2.0
Requires-Dist: matplotlib>=3.10
Requires-Dist: scipy>=1.16
Dynamic: license-file

# Mechanical Properties Extractor

Extracts Young's modulus, ultimate point, and break-point properties from
stress-strain curve data, via ISO 527 linear regression, a custom
RMSProp-based curve fit, or break-point detection.

## Features

- Young's modulus via ISO 527 secant-line linear regression
- Young's modulus via a custom RMSProp-based enclosed-area fit
- Ultimate (peak stress) point detection on the stress-strain curve
- Break-point (failure) detection on the stress-strain curve
- Built-in plots and an animation of the RMSProp fitting process

## Installation

```bash
pip install mechprops-extractor
```

For development (editable install):

```bash
pip install -e .
```

## Usage

Pass your strain and stress data (any array-like: list, tuple, NumPy array,
pandas Series, ...) into a `StressStrainCurve`, then call any combination of
its analysis methods:

```python
from mechprops import StressStrainCurve

strain = [0.0000, 0.0005, 0.0010, 0.0015, 0.0020, 0.0025, 0.0030, 0.0035]
stress = [0.1, 12.5, 24.9, 36.9, 46.8, 54.9, 58.1, 51.1]

curve = StressStrainCurve(strain, stress)

curve.fit_modulus_iso527()      # Young's modulus via ISO 527 linear regression
curve.fit_modulus_rmsprop()     # Young's modulus via RMSProp area minimization
curve.find_ultimate_point()     # (strain, stress) at the ultimate (peak stress) point
curve.find_break_point()        # (strain, stress) at the detected break point
```

Each method returns its computed value and, by default, opens a plot window
illustrating the result — close it to continue. Pass `show=False` to skip the
plot and get the value only. Pass `save_path="path/to/file.png"` to save the
plot as a PNG (in addition to displaying it).
