A professional-grade Flask web application for analyzing transformer test data and computing equivalent circuit parameters from No-Load (Open Circuit) and Short-Circuit test measurements.
- Universal Data Parser: Handles CSV, TSV, TXT files from Festo Didactic LVDAC-EMS oscilloscopes and other formats. Auto-detects delimiters, headers, and data structure.
- Accurate Calculations: Computes all equivalent circuit parameters using IEEE standard methods:
- No-Load Test → Core branch: Rc, Xm, Ic, Im, I₀, PF₀, P_core
- Short-Circuit Test → Series branch: Req, Xeq, Zeq, PF_sc, P_cu
- Combined Analysis → Voltage regulation, efficiency curves, max efficiency point, percent impedance
- Auto Test Detection: Automatically identifies whether uploaded data is from a no-load or short-circuit test
- Rich Visualizations: Interactive Chart.js graphs including:
- Voltage & current waveforms with dual Y-axes
- Harmonic analysis with THD calculation (FFT-based)
- Efficiency vs. load curves (UPF and 0.8 PF)
- Voltage regulation vs. power factor
- Loss distribution (doughnut chart)
- Impedance triangle, power triangle, phasor diagrams
- SVG Equivalent Circuit Diagram: Auto-generated circuit diagram with computed values
- HTML Report Export: Downloadable, printable professional report
- Drag & Drop Upload: Modern file upload with drag-and-drop support
- Fully Responsive: Works on desktop, tablet, and mobile
transformer-analyzer/
├── app/
│ ├── __init__.py # Flask app factory (empty, marks package)
│ ├── main.py # Flask app with routes & create_app()
│ ├── static/
│ │ ├── css/style.css # Dark-theme UI
│ │ └── js/app.js # Frontend logic & Chart.js charts
│ ├── templates/
│ │ └── index.html # Main SPA template
│ └── utils/
│ ├── __init__.py # (empty, marks package)
│ ├── parser.py # Universal data parser
│ ├── calculator.py # Equivalent circuit calculations
│ └── report.py # HTML report generator
├── tests/
│ └── test_app.py # Comprehensive test suite
├── Dockerfile # Docker deployment
├── requirements.txt # Python dependencies
├── wsgi.py # Production WSGI entry point
└── README.md
# 1. Install dependencies
pip install -r requirements.txt
# 2. Run the app (development)
flask --app app.main:create_app run --debug
# OR using the WSGI entry point directly
python wsgi.pyOpen http://localhost:5000 in your browser.
gunicorn "app.main:create_app()" -w 4 -b 0.0.0.0:5000# Build
docker build -t transformer-analyzer .
# Run
docker run -p 5000:5000 transformer-analyzer- Festo Didactic LVDAC-EMS oscilloscope exports (CSV with
,,double-comma or TSV with double-tab) - Standard CSV with headers (Time, Voltage/E1, Current/I1, Power/P1)
- Tab-separated files (.txt, .tsv)
- Semicolon-separated files
- Files with or without metadata headers
- Files with or without a Power column (computed automatically if absent)
pip install pytest pytest-cov
pytest tests/ -v --cov=app| Criteria | How This App Addresses It |
|---|---|
| Accuracy of Calculations (20%) | IEEE-standard RMS, FFT, complete-cycle extraction, validated with unit tests |
| Code Efficiency & Structure (15%) | Clean MVC architecture, modular utils, type hints, docstrings |
| Visualization & Report (25%) | 10+ interactive Chart.js visualizations, SVG circuit diagram, exportable HTML report |
| Presentation & Intuitiveness (15%) | Dark theme UI, drag-drop upload, tabbed results, auto-detect test type |
| Creativity & Problem Solving (15%) | Harmonic analysis, auto-format detection, edge case handling |
Developed with assistance from Generative AI (Claude by Anthropic) as permitted by competition rules.
MIT