Terminal UI for Double Compression (TPA) analysis of Zwick exports (.csv / .tra) with grouped statistics, QC reporting, and publication-ready plotting.
- Install dependencies:
pip install -r requirements.txt
- Run the app:
python app.py
- Robust Zwick parser:
- Auto-detects delimiter (comma/semicolon/tab) and header row.
- Accepts mixed English/German headers (
Force/Standardkraft,Deformation/Dehnung,Time/Zeit).
- Smarter cycle detection:
- Two-peak detection with fallback thresholds/prominence attempts.
- Baseline force correction and overlap safeguards between cycle windows.
- Expanded TPA metrics:
- Hardness, Cohesiveness, Springiness, Resilience, Chewiness, Adhesiveness.
- True stress/true strain traces and modulus fit within a configurable strain window.
- Built-in QC package:
- Per-file cycle markers, areas, control parameters, and warnings.
- Annotated QC figures plus interpretation guide export.
- Statistics engine upgrades:
auto,parametric, andnonparametricmodes.- Auto mode uses Shapiro + Levene checks.
- Tests include Welch t-test, Mann-Whitney U, ANOVA + Tukey, and Kruskal-Wallis + Dunn (BH).
- Compact-letter group significance display for summaries.
- Plot Studio:
- Custom graph builder (panel/overlay layouts).
- Curve modes: individual replicates, mean+band, or both.
- Band type: SD or 95% CI.
- Group overlays using aligned time.
- Figure presets (
1:1,4:3,16:9,A4) plus custom width/height and DPI.
- Grouping and style controls:
- Auto group inference from filename.
- Manual assignment, batch assignment by filename terms, and group order controls.
- Stable per-group palette with per-group hex overrides.
- Session persistence:
- Auto-saves working state to
.tpa_analyzer_session.jsonin the active data directory. - Restores grouping, parameters, plot specs, and style settings on refresh.
- Auto-saves working state to
- Set a directory containing
.csv/.trafiles. - Review inferred groups and adjust manually or in batch.
- Tune analysis parameters (trigger, prominence, peak distance, modulus window, etc.).
- Run analysis.
- Build custom plots if needed.
- Export tables, plots, or both.
Creates exports/<timestamp>/ with:
tpa_results_summary.csvtpa_qc_summary.csvtpa_group_stats.csvtpa_pairwise_stats.csv
Creates output_plots/<timestamp>/ with:
default_stack.pnggrouped_metrics.png(when stats are available)overlays/overlay_<group>.pngcustom/custom_<index>_<title>.pngqc_report/:qc_summary.csvqc_control_parameters.csvqc_markers_and_areas.csvfiles/*_qc.pngQC_REPORT_INTERPRETATION.md
Creates exports/<timestamp>/ with all table exports plus:
plots/default_stack.pngplots/grouped_metrics.png(when stats are available)plots/overlays/overlay_<group>.pngplots/custom/custom_<index>_<title>.pngqc_report/*(same QC package as above)
pandas,numpy,scipymatplotlib,seaborntextualpingouin
The workflow at .github/workflows/build-binaries.yml produces:
tpa-analyzer-macos-app.zipcontainingTPA Analyzer.app(macOS)tpa-analyzer.exe(Windows)- Uses platform-specific icons from
assets/:tpa-analyzer-icon.icnsfor the macOS app bundletpa-analyzer-icon.icofor the Windows executable
Steps:
- Push this repository to GitHub.
- Open Actions -> Build Binaries.
- Click Run workflow (or push a tag like
v1.0.0). - Download artifacts:
tpa-analyzer-macOS(containstpa-analyzer-macos-app.zip->TPA Analyzer.app)tpa-analyzer-Windows(containstpa-analyzer.exe)
Troubleshooting:
- If a binary fails with
ModuleNotFoundErrorfortextual.*modules, rebuild with the current workflow (it includes--collect-submodules textual --collect-data textual).