bharathgs /
Awesome-pytorch-list
A comprehensive list of pytorch related content on github,such as different models,implementations,helper libraries,tutorials etc.
84/100 healthLoading repository data…
federicogmz / repository
A comprehensive Python package implementing the SHALSTAB (Shallow Landsliding STABility) model for slope stability analysis. This tool evaluates infinite slope stability by integrating topographic analysis, hydrologic modelling, and geotechnical parameters to assess landslide susceptibility or hazard in a physically-based framework.
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
A comprehensive Python package for slope stability analysis using the SHALSTAB (Shallow Landsliding STABility) model. This implementation provides tools for analyzing slope stability using physically-based models that consider topographic, hydrologic, and geotechnical factors.
Developed at SIATA — Medellín's early warning system for geohazards.
The SHALSTAB model evaluates infinite slope stability by combining:
pip install shalstab
git clone https://github.com/federicogmz/shalstab.git
cd shalstab
pip install -e .
pip install -r requirements.txt
The easiest way to test if SHALSTAB is installed correctly or to get familiar with its implementation is to use the provided training data:
import shalstab
# Use training data
analyzer = shalstab.Analyzer(
dem_path=shalstab.training_dem,
geo=shalstab.training_geology,
geo_columns=["Cohesion", "Phi", "Gamma_kN_m", "Ks_m_s"]
)
# Run analysis
critical_rain = analyzer.calculate_critical_rainfall()
SHALSTAB (Shallow Landsliding STABility) is a physically-based model developed by Montgomery and Dietrich (1994) for analyzing shallow landslide susceptibility. The model combines:
The model is particularly suited for analyzing rainfall-triggered shallow landslides in natural slopes where the failure surface is parallel to the ground surface.
The SHALSTAB model is based on several key assumptions:
Suitable for:
Limitations:
The fundamental SHALSTAB stability criterion compares the ratio of upslope contributing area to contour length (destabilizing force) with a stabilizing term that includes soil properties and rainfall:
a/b ≤ (T/q) × [(c/(γw × z × cos²θ × tanφ)) + (γ/γw) × (1 - tanθ/tanφ)]
Where:
a = upslope contributing area (m²)b = contour length (cell width, m)T = transmissivity (k × z × cosθ, m²/day)q = recharge rate (rainfall intensity, mm/day converted to m/day)c = soil cohesion (kPa)γw = unit weight of water (9.81 kN/m³)z = soil thickness (m)θ = slope angle (radians)φ = internal friction angle (radians)γ = soil unit weight (kN/m³)k = saturated hydraulic conductivity (m/s)The critical rainfall represents the minimum rainfall intensity required to trigger slope failure:
qcrit = (T/a) × [(c/(γw × z × cos²θ × tanφ)) + (γ/γw) × (1 - tanθ/tanφ)]
This equation is derived by rearranging the stability criterion to solve for the critical recharge rate.
The model classifies each cell into one of four stability categories:
tanθ/tanφ < γ/γw - Stable regardless of rainfalltanθ/tanφ > 1 - Unstable regardless of rainfallThe log(q/T) ratio provides a dimensionless measure of stability:
log(q/T) = log10(q × cell_size / flow_accumulated) - log10(T)
Where:
The package implements the Catani et al. (2010) empirical model for soil thickness estimation:
z = zmax × [1 - ((tanθ - tanθmin) / (tanθmax - tanθmin)) × (1 - zmin/zmax)]
Where:
z = calculated soil thickness (m)zmax = maximum soil thickness (typically 5.0 m)zmin = minimum soil thickness (typically 0.1 m)θ = local slope angle (radians)θmax, θmin = maximum and minimum slope angles in study areaModel Assumptions:
Applications:
Slope angles are calculated using finite difference approximation:
slope = arctan(√((dz/dx)² + (dz/dy)²))
The calculation process involves:
The package uses the D8 flow direction algorithm:
Soil transmissivity represents the ability to transmit water laterally:
T = k × z × cosθ
Where:
T = transmissivity (m²/day)k = saturated hydraulic conductivity (m/s, converted to m/day)z = soil thickness (m)θ = slope angle (radians)The model assumes steady-state conditions where:
Soil strength follows the Mohr-Coulomb relationship:
τ = c + σn × tanφ
Where:
τ = shear strength (kPa)c = cohesion (kPa)σn = normal stress (kPa)φ = internal friction angle (degrees)For infinite slope conditions, the factor of safety is:
FS = (c + (γ×z×cosθ - γw×zw×cosθ) × tanφ) / (γ×z×sinθ×cosθ)
Where:
FS = factor of safetyzw = height of water table above failure plane (m)The failure probability calculation provides a relative ranking of landslide susceptibility:
Process:
calculate_log_qt()-log(q/T)P = ((inverted - min) / (max - min)) × 100Interpretation:
Important Note: The probability is relative, not absolute. It represents comparative susceptibility across the study area rather than actual failure rates.
import shalstab
# Example 1: Using file paths (recommended)
analyzer = shalstab.Analyzer(
dem_path="elevation.tif",
geo="geology.geojson",
geo_columns=["cohesion", "friction", "gamma", "permeability"]
)
# Example 2: Using GeoDataFrame
import geopandas as gpd
geology = gpd.read_file("geology.shp")
analyzer = shalstab.Analyzer("elevation.tif", geology, geo_columns=["cohesion", "friction", "gamma", "permeability"])
# Initialize full analyzer with file paths
analyzer = shalstab.Analyzer(
dem_path="high_res_dem.tif",
geo="geology_with_properties.geojson",
geo_columns=[
"cohesion_kpa", # Soil cohesion (kPa)
"friction_deg", # Internal friction angle (degrees)
"gamma_knm3", # Soil unit weight (kN/m³)
"k_ms" # Hydraulic conductivity (m/s)
],
figsize=(15, 10)
)
# Calculate critical rainfall with visualization
critical_rainfall = analyzer.calculate_critical_rainfall(show_plot=True)
print(f"Critical rainfall range: {critical_rainfall.min():.1f} - {critical_rainfall.max():.1f} mm/day")
# Analyze stability for specific rainfall events
rainfall_events = [10, 25, 50, 100] # mm/day
for rainfall in rainfall_events:
stability, fig = analyzer.calculate_stability(rainfall_mm_day=rainfall)
# Calculate unstable area
unstable_cells = (stability == 3).sum()
cell_area = abs(analyzer.dem.rio.resolution()[0] * analyzer.dem.rio.resolution()[1])
unstable_area_km2 = unstable_cells * cell_area / 1e6
print(f"Rainfall {rainfall} mm/day: {unstable_area_km2:.2f} km² unstable")
# Save results
analyzer.export_raster(stability, f"stability_{rainfall}mm.tif")
fig.savefig(f"stability_plot_{rainfall}mm.png", dpi=300, bbox_inches='tight')
# Calculate relative failure probability
probability = analyzer.calculate_failure_probability()
print(f"High risk areas (>80%): {(probability > 80).sum()} cells")
# Export all results
analyzer.export_raster(critical_rainfall, "critical_rainfall.tif")
analyzer.export_raster(probability, "failure_probability.tif")
analyzer.export_raster(analyzer.soil_thickness, "soil_thickness.tif")
# Multi-scenario analysis
scenarios = {
"dry_s
Selected from shared topics, language and repository description—not editorial ratings.
bharathgs /
A comprehensive list of pytorch related content on github,such as different models,implementations,helper libraries,tutorials etc.
84/100 healthAkashSingh3031 /
Dive into this repository, a comprehensive resource covering Data Structures, Algorithms, 450 DSA by Love Babbar, Striver DSA sheet, Apna College DSA Sheet, and FAANG Questions! 🚀 That's not all! We've got Technical Subjects like Operating Systems, DBMS, SQL, Computer Networks, and Object-Oriented Programming, all waiting for you.
96/100 healthNyandwi /
A comprehensive machine learning repository containing 30+ notebooks on different concepts, algorithms and techniques.
93/100 healthA comprehensive list of Deep Learning / Artificial Intelligence and Machine Learning tutorials - rapidly expanding into areas of AI/Deep Learning / Machine Vision / NLP and industry specific areas such as Climate / Energy, Automotives, Retail, Pharma, Medicine, Healthcare, Policy, Ethics and more.
81/100 healthJosh-XT /
AGiXT is a dynamic AI Agent Automation Platform that seamlessly orchestrates instruction management and complex task execution across diverse AI providers. Combining adaptive memory, smart features, and a versatile plugin system, AGiXT delivers efficient and comprehensive AI solutions.
92/100 healthTrusted-AI /
A comprehensive set of fairness metrics for datasets and machine learning models, explanations for these metrics, and algorithms to mitigate bias in datasets and models.
86/100 health