🔬 Tensile

Version 0.4.0

Automated Tensile Test Analysis for Python

Welcome to Tensile

Tensile is a comprehensive Python library for automated processing of tensile test data from CSV files. It replaces manual Excel workflows with a robust, automated pipeline that validates data quality, detects and corrects measurement errors, segments test phases using statistical methods, calculates mechanical properties, and generates professional reports and visualizations.

Web App: Soon, we will be launching a web application designed for real-world materials testing laboratories, with robust error handling, comprehensive validation, and support for batch processing.

📊 Automated Processing

  • Load CSV files with multi-row headers
  • Automatic column detection
  • 3-level data validation
  • Comprehensive quality reporting

🔧 Error Correction

  • Detect multiple slippages
  • Automatic correction with confidence tracking
  • Handle cascading corrections
  • Post-fracture detection

📈 Statistical Analysis

  • Automated elastic region detection
  • Young's modulus (E)
  • 0.2% offset yield strength (Rp0.2)
  • Ultimate tensile strength (Rm)
  • Total elongation (At)

âš¡ Batch Processing

  • Process multiple tests simultaneously
  • Optional parallel execution
  • Summary statistics (mean, std, CV%)
  • Outlier detection (Z-score, IQR)
  • Multi-sheet Excel reports

📉 Visualization

  • Interactive Plotly charts
  • Publication-quality plots
  • Single test and batch comparison
  • Export to HTML, PNG, SVG

🎯 Easy to Use

  • Industry-standard API usage
  • Method chaining
  • Sensible defaults

Quick Start

Installation

pip install pandas numpy scipy openpyxl plotly piecewise-regression

Single Test Analysis

from tensile import TensileTest

# Load and analyze a test with full pipeline
test = (TensileTest()
        .load("specimen.csv")
        .validate()
        .clean()      # Automated error correction
        .segment()    # Automated elastic region detection
        .analyze())   # Calculate properties

# View results
print(test.summary())

# Create interactive plot
fig = test.plot()
fig.write_html("plot.html")

# Export to CSV
test.export("results.csv")

Batch Processing

from tensile import TensileTestBatch

# Load all tests from a folder
batch = TensileTestBatch.from_folder("Raw data/A/")

# Analyze all tests
batch.analyze_all(parallel=True)

# Get summary statistics
summary = batch.summary_statistics()
print(summary)

# Export comprehensive Excel report
batch.export_summary("batch_results.xlsx")

# Create comparison plot
fig = batch.plot_all(overlay=True)
fig.write_html("batch_comparison.html")