Releases: ankitdutta428/PyDebFlow
Releases · ankitdutta428/PyDebFlow
PyDebFlow v0.2.0.2 - Initial Release
PyDebFlow v0.2.0 — Feature Release
This PR introduces all changes required for the v0.2.0 release of PyDebFlow.
👑 Crown Zone (renamed from "Release Zone")
- Renamed the "Release Zone" tab → Crown throughout the entire codebase and GUI
- Added Point and Polygon mode buttons so users can mark, draw, and delete crown zones interactively
- Added a 🗑️ Remove button to delete the current marker in one click
- Coordinate entry now uses Latitude / Longitude for geographic (lat/lon) DEMs and Row / Column for projected DEMs — auto-detected from the loaded GeoTIFF
- Added scroll-wheel zoom on the Crown terrain canvas
📏 Cross-Section Profile (0.1 m Resolution)
- Profile transect x-axis now sampled at 0.1 m intervals (capped at 5 000 pts for performance)
- Plot title shows actual transect length and sample count
- Matplotlib NavigationToolbar (Zoom / Pan / Home) added below the profile plot
- 💾 Save Plot button exports as PNG / PDF / SVG
📈 Hydrograph (Multi-Point)
- Added 📍 Set Point, ➕ Add to Graph, and 🗑️ Clear All buttons
- Up to 8 concurrent monitor points plotted on the same graph with distinct colour-coded series
- Each point shows flow height (top panel) and velocity + discharge (bottom panel)
- Monitor points labelled on the terrain map for easy identification
- Matplotlib NavigationToolbar + 💾 Save Plot button
📊 Statistics Tab (New)
A new Statistics tab is automatically populated after each simulation:
| Section | Metrics |
|---|---|
| Descriptive | Mean, Std Dev, Min/Max, P5–P95, Skewness, Kurtosis |
| Spatial | Flow area (m²/km²), Perimeter, Centroid (row/col or lat/lon), Bounding box extent |
| Temporal | Simulation duration, Peak height & time, Rise time (0→90%), Recession time (→50%) |
| Phase | Mean solid/fluid fraction, Peak discharge (m³/s) |
| Statistical Tests | Shapiro-Wilk normality test, KS test vs uniform distribution |
- 🔄 Compute Statistics button to recompute on demand
- 💾 Save CSV and 💾 Save TXT export buttons
🔍 Zoom / Pan / Save (All Widgets)
- Scroll-wheel zoom on terrain maps in Crown, Profile, and Hydrograph widgets
- Matplotlib toolbar (Zoom, Pan, Home, Back, Forward) on Profile and Hydrograph canvases
- Save plot in PNG / PDF / SVG from any analysis widget
🧪 Tests (tests/test_v020.py)
26 new tests covering:
- Lat/Lon ↔ Row/Col round-trip accuracy
- Profile x-axis 0.1 m resolution and cap logic
- Multi-point hydrograph add/clear/series count
- Statistics computation structure, keys, and value correctness
- Save-to-file (PNG, PDF, CSV)
📖 Documentation
- README.md — Added "What's New in v0.2.0" feature table
- Updated GUI Features list, Architecture file tree, and CLI reference (
--release-polygon) - src/init.py — Bumped
__version__to"0.2.0"
Files Changed
| File | Change |
|---|---|
| src/gui/release_zone_widget.py | Rewritten as CrownWidget; backward-compat alias ReleaseZoneWidget kept |
| src/gui/analysis_widgets.py | Overhauled: profile resolution, toolbars, save, multi-point hydro, new StatisticsWidget |
| src/gui/main_window.py | Crown tab rename; Statistics tab added; set_data wired to StatisticsWidget |
| src/core/terrain.py | Added is_geographic, cell_size_deg, mean_lat for coordinate conversion |
| src/init.py | Version bumped to 0.2.0 |
| README.md | v0.2.0 feature table, updated sections |
| tests/test_v020.py | New — 26 tests for all v0.2.0 features |
PyDebFlow v0.1.0 - Initial Release (Python + npm)
PyDebFlow v0.1.0 🎉
Advanced Two-Phase Mass Flow Simulation Software
First public release of PyDebFlow - available on both PyPI and npm!
📦 Installation
# Python
pip install pydebflow
# JavaScript/TypeScript (requires Python + pydebflow installed)
npm install pydebflow
##🔧 npm Package Usage
```typescript
import { PyDebFlow } from 'pydebflow';
const sim = new PyDebFlow();
const terrain = await sim.createSyntheticSlope({ rows: 80, cols: 60 });
const results = await sim.runSimulation(
terrain,
{ centerI: 15, centerJ: 30, radius: 8, height: 5.0 },
{ tEnd: 30 }
);
console.log('Affected area:', results.affectedArea, 'm²');PyDebFlow v0.1.0 - Initial Release
PyDebFlow v0.1.0 🎉
Advanced Two-Phase Mass Flow Simulation Software
The first public release of PyDebFlow - a Python library for simulating debris flows, avalanches, and lahars inspired by r.avaflow and RAMMS.
✨ Features
Core Simulation
- Two-phase flow model (solid + fluid)
- NOC-TVD solver with flux limiters
- Support for GeoTIFF and ASCII Grid DEMs
- Synthetic terrain generation
Physics Models
- Voellmy rheology with presets (snow, rock, debris)
- Mohr-Coulomb friction
- Bingham & Herschel-Bulkley models
- Entrainment/deposition modeling
Visualization
- 3D PyVista terrain viewer with flow animation
- Matplotlib result plots
- Video export (MP4)
User Interface
- PyQt6 desktop GUI
- Professional CLI (
pydebflow simulate,pydebflow gui) - Shell scripts for Windows/Linux/macOS
📦 Installation
pip install pydebflowAnd then to run it in javascript environments:
npm install pydebflow