avaframe 2.1__tar.gz → 2.2a1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- avaframe-2.2a1/.github/pull_request_template.md +12 -0
- avaframe-2.2a1/.github/workflows/require-checklist.yml +16 -0
- {avaframe-2.1 → avaframe-2.2a1}/PKG-INFO +1 -1
- avaframe-2.2a1/avaframe/RELEASE-VERSION.txt +1 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/ana5Utils/DFAPathGeneration.py +260 -5
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/ana5Utils/DFAPathGenerationCfg.ini +21 -2
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/com1DFA/DFAToolsCython.c +663 -510
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/com1DFA/DFAfunctionsCython.c +3650 -3446
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/com1DFA/DFAfunctionsCython.pyx +3 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/com1DFA/com1DFA.py +161 -25
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/com1DFA/com1DFACfg.ini +6 -1
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/com1DFA/com1DFATools.py +6 -5
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/com1DFA/damCom1DFA.c +396 -243
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/com1DFA/deriveParameterSet.py +68 -43
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/com1DFA/particleTools.py +176 -1
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/com8MoTPSA/com8MoTPSACfg.ini +2 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/com9MoTVoellmy/MoT-Voellmy_win.exe +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/in1Data/getInput.py +63 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/in2Trans/transformFields.py +28 -27
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/in3Utils/cfgUtils.py +2 -1
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/in3Utils/geoTrans.py +211 -120
- avaframe-2.2a1/avaframe/in3Utils/spatialVoellmyInputs.py +145 -0
- avaframe-2.2a1/avaframe/in3Utils/spatialVoellmyInputsCfg.ini +6 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/log2Report/generateCompareReport.py +78 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/out3Plot/outDebugPlots.py +105 -1
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/out3Plot/outParticlesAnalysis.py +130 -23
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/out3Plot/plotUtils.py +19 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/out3Plot/plotUtilsCfg.ini +3 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/runCom6RockAvalanche.py +52 -4
- avaframe-2.2a1/avaframe/runScripts/runParticlesAssetsInfo.py +112 -0
- avaframe-2.2a1/avaframe/runScripts/runSpatialVoellmyInputs.py +55 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/runStandardTestsCom1DFA.py +26 -2
- {avaframe-2.1 → avaframe-2.2a1}/avaframe.egg-info/PKG-INFO +1 -1
- {avaframe-2.1 → avaframe-2.2a1}/avaframe.egg-info/SOURCES.txt +8 -0
- avaframe-2.2a1/avaframe.egg-info/scm_file_list.json +1675 -0
- avaframe-2.2a1/avaframe.egg-info/scm_version.json +8 -0
- avaframe-2.1/avaframe/RELEASE-VERSION.txt +0 -1
- {avaframe-2.1 → avaframe-2.2a1}/.coveragerc +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/.gitattributes +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/.github/ISSUE_TEMPLATE/com1dfa-dev-topic.md +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/.github/ISSUE_TEMPLATE/standard-issue.md +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/.github/workflows/buildAndUploadPyPi.yml +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/.github/workflows/runTestSinglePython.yml +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/.gitignore +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/.qlty/qlty.toml +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/.readthedocs.yml +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/.zenodo.json +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/LICENSE.txt +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/MANIFEST.in +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/README.md +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/__init__.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/ana1Tests/FPtest.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/ana1Tests/__init__.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/ana1Tests/analysisTools.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/ana1Tests/damBreak.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/ana1Tests/energyLineTest.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/ana1Tests/energyLineTestCfg.ini +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/ana1Tests/rotationTest.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/ana1Tests/rotationTestCfg.ini +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/ana1Tests/simiSolTest.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/ana1Tests/testUtilities.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/ana3AIMEC/__init__.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/ana3AIMEC/aimecTools.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/ana3AIMEC/ana3AIMEC.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/ana3AIMEC/ana3AIMECCfg.ini +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/ana3AIMEC/dfa2Aimec.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/ana4Stats/__init__.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/ana4Stats/getStats.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/ana4Stats/getStatsCfg.ini +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/ana4Stats/probAna.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/ana4Stats/probAnaCfg.ini +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/ana5Utils/__init__.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/ana5Utils/distanceTimeAnalysis.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/ana5Utils/distanceTimeAnalysisCfg.ini +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/avaframeCfg.ini +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/com1DFA/DFAToolsCython.pxd +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/com1DFA/DFAToolsCython.pyx +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/com1DFA/DFAfunctionsCython.pxd +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/com1DFA/DFAtools.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/com1DFA/__init__.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/com1DFA/checkCfg.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/com1DFA/damCom1DFA.pxd +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/com1DFA/damCom1DFA.pyx +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/com1DFA/debrisFunctions.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/com1DFA/particleInitialisation.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/com1DFA/testSPH.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/com1DFA/timeDiscretizations.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/com2AB/__init__.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/com2AB/com2AB.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/com2AB/com2ABCfg.ini +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/com3Hybrid/__init__.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/com3Hybrid/com3Hybrid.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/com3Hybrid/com3HybridCfg.ini +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/com4FlowPy/__init__.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/com4FlowPy/com4FlowPy.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/com4FlowPy/com4FlowPyCfg.ini +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/com4FlowPy/flowClass.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/com4FlowPy/flowCore.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/com4FlowPy/splitAndMerge.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/com5SnowSlide/__init__.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/com5SnowSlide/com5SnowSlide.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/com5SnowSlide/com5SnowSlideCfg.ini +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/com6RockAvalanche/__init__.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/com6RockAvalanche/com6RockAvalanche.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/com6RockAvalanche/com6RockAvalancheCfg.ini +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/com6RockAvalanche/scarp.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/com6RockAvalanche/scarpCfg.ini +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/com7Regional/__init__.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/com7Regional/com7Regional.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/com7Regional/com7RegionalCfg.ini +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/com7Regional/splitInputs.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/com7Regional/splitInputsCfg.ini +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/com8MoTPSA/README_dev.md +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/com8MoTPSA/__init__.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/com8MoTPSA/com8MoTPSA.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/com8MoTPSA/runAna4ProbAnaCom8MoTPSA.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/com8MoTPSA/runCom8MoTPSA.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/com9MoTVoellmy/MoT-Voellmy_linux.exe +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/com9MoTVoellmy/__init__.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/com9MoTVoellmy/_buildMoTVoellmy.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/com9MoTVoellmy/com9MoTVoellmy.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/com9MoTVoellmy/com9MoTVoellmyCfg.ini +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/com9MoTVoellmy/runCom9MoTVoellmy.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/in1Data/__init__.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/in1Data/computeFromDistribution.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/in1Data/computeFromDistributionCfg.ini +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/in2Trans/__init__.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/in2Trans/ascUtils.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/in2Trans/rasterUtils.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/in2Trans/shpConversion.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/in3Utils/MoTUtils.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/in3Utils/__init__.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/in3Utils/cfgHandling.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/in3Utils/fileHandlerUtils.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/in3Utils/generateTopo.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/in3Utils/generateTopoCfg.ini +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/in3Utils/getReleaseArea.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/in3Utils/getReleaseAreaCfg.ini +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/in3Utils/initialiseDirs.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/in3Utils/initializeProject.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/in3Utils/logUtils.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/in3Utils/logging.conf +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/log2Report/__init__.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/log2Report/generateCompareReportCfg.ini +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/log2Report/generateReport.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/out1Peak/__init__.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/out1Peak/outPlotAllPeak.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/out1Peak/outPlotAllPeakDiffs.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/out3Plot/__init__.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/out3Plot/amaPlots.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/out3Plot/in1DataPlots.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/out3Plot/outAB.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/out3Plot/outAIMEC.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/out3Plot/outAna1Plots.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/out3Plot/outCom1DFA.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/out3Plot/outCom3Plots.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/out3Plot/outCom7Regional.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/out3Plot/outContours.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/out3Plot/outDistanceTimeAnalysis.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/out3Plot/outParticlesAnalysisCfg.ini +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/out3Plot/outProfilePlots.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/out3Plot/outQuickPlot.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/out3Plot/outQuickPlotCfg.ini +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/out3Plot/outTopo.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/out3Plot/outTransformPlots.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/out3Plot/statsPlots.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/runAna4ProbAna.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/runAna5DFAPathGeneration.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/runCom1DFA.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/runCom2AB.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/runCom4FlowPy.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/runCom5SnowSlide.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/runCom6Scarp.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/runCom7Regional.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/runIn1RelInfo.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/runOperational.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/runPlotCom1DFA.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/runProbAnalysisOnly.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/runScripts/runAimecSummaryPlot.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/runScripts/runAna3AIMEC.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/runScripts/runAna3AIMECCompMods.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/runScripts/runAnalyzeDamBreak.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/runScripts/runAnalyzeSimilaritySol.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/runScripts/runCom3Hybrid.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/runScripts/runComputeDist.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/runScripts/runContourPlot.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/runScripts/runCreateProbCfgsFlowPy.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/runScripts/runD2Th.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/runScripts/runDamBreak.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/runScripts/runEnergyLineTest.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/runScripts/runExportToCsv.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/runScripts/runFetchPointValues.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/runScripts/runGenProjTopoRelease.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/runScripts/runGenerateTopo.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/runScripts/runInitializeProject.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/runScripts/runParticleAnalysisPlots.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/runScripts/runPlotAlongGivenProfile.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/runScripts/runPlotAreaRefDiffs.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/runScripts/runPlotContoursFromAsc.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/runScripts/runPlotContoursFromAscCfg.ini +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/runScripts/runPlotProfile.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/runScripts/runPlotTopo.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/runScripts/runProbAna.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/runScripts/runQuickPlotOne.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/runScripts/runQuickPlotSimple.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/runScripts/runRangeTimeDiagram.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/runScripts/runRenaming.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/runScripts/runRotationTest.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/runScripts/runSimilaritySol.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/runScripts/runStatsExample.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/runScripts/runStatsExampleSimple.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/runScripts/runStatsPlots.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/runScripts/runTestFP.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/runScripts/runThalwegTimeDiagram.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/runScripts/runVariationsTestsCom1DFA.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/runScripts/runWriteDesDict.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/runTmp1Ex.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/runUpdateBenchmarkTestsCom1DFA.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/tmp1Ex/__init__.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/tmp1Ex/tmp1Ex.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/tmp1Ex/tmp1ExCfg.ini +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe/version.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe.egg-info/dependency_links.txt +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe.egg-info/requires.txt +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/avaframe.egg-info/top_level.txt +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/pyproject.toml +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/requirements.txt +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/setup.cfg +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/setup.py +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/tinyHelper/extractDEM.sh +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/tinyHelper/logHelper_extractProcessAndTimes.sh +0 -0
- {avaframe-2.1 → avaframe-2.2a1}/tinyHelper/logHelper_extractProcessTimesAndParams.sh +0 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
## PR Checklist
|
|
2
|
+
|
|
3
|
+
Please confirm before requesting review:
|
|
4
|
+
|
|
5
|
+
- [ ] I ran `pytest` locally without fails
|
|
6
|
+
- [ ] I added/updated tests where needed
|
|
7
|
+
- [ ] I updated documentation where needed
|
|
8
|
+
|
|
9
|
+
Confirm before the final merge/rebase into master
|
|
10
|
+
|
|
11
|
+
- [ ] Commits are sensibly squashed and rebased onto latest master
|
|
12
|
+
- [ ] Standardtest run without difference (with recompiled cython code)
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
name: Require PR Checklist
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
types: [opened, edited, synchronize, reopened]
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
require-checklist:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
|
|
13
|
+
steps:
|
|
14
|
+
- uses: mheap/require-checklist-action@v2
|
|
15
|
+
with:
|
|
16
|
+
requireChecklist: true
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
2.2a1
|
|
@@ -4,13 +4,16 @@
|
|
|
4
4
|
|
|
5
5
|
# Load modules
|
|
6
6
|
import math
|
|
7
|
+
import heapq
|
|
7
8
|
import numpy as np
|
|
8
9
|
import logging
|
|
9
10
|
import pathlib
|
|
10
11
|
import shutil
|
|
12
|
+
from scipy.ndimage import distance_transform_edt
|
|
11
13
|
|
|
12
14
|
# Local imports
|
|
13
15
|
from avaframe.in1Data import getInput as gI
|
|
16
|
+
import avaframe.in2Trans.rasterUtils as IOf
|
|
14
17
|
import avaframe.in2Trans.shpConversion as shpConv
|
|
15
18
|
from avaframe.in3Utils import cfgUtils
|
|
16
19
|
from avaframe.in3Utils import fileHandlerUtils as fU
|
|
@@ -80,10 +83,22 @@ def generatePathAndSplitpoint(avalancheDir, cfgDFAPath, cfgMain, runDFAModule):
|
|
|
80
83
|
log.error(message)
|
|
81
84
|
raise FileExistsError(message)
|
|
82
85
|
|
|
86
|
+
# the peak flow thickness fields are only needed when the path is extended to the deposit
|
|
87
|
+
# front; parse the peak files once here instead of re-reading them for every simulation
|
|
88
|
+
extendToFront = cfgDFAPath['PATH'].getint('extBottomOption', fallback=0) == 1
|
|
89
|
+
peakFilesDF = None
|
|
90
|
+
if extendToFront:
|
|
91
|
+
peakFilesDir = pathlib.Path(avalancheDir, 'Outputs', 'com1DFA', 'peakFiles')
|
|
92
|
+
peakFilesDF = fU.makeSimDF(peakFilesDir, avaDir=avalancheDir)
|
|
93
|
+
|
|
83
94
|
for simName, simDFrow in simDF.iterrows():
|
|
84
95
|
log.info('Computing avalanche path from simulation: %s', simName)
|
|
85
96
|
pathFromPart = cfgDFAPath['PATH'].getboolean('pathFromPart')
|
|
86
97
|
resampleDistance = cfgDFAPath['PATH'].getfloat('nCellsResample') * dem['header']['cellsize']
|
|
98
|
+
# peak flow thickness field, only needed when extending the path to the deposit front
|
|
99
|
+
fieldPFT = None
|
|
100
|
+
if extendToFront:
|
|
101
|
+
fieldPFT = readPeakFT(peakFilesDF, simName)
|
|
87
102
|
# get the mass average path
|
|
88
103
|
avaProfileMass, particlesIni = generateMassAveragePath(avalancheDir, pathFromPart, simName, dem,
|
|
89
104
|
addVelocityInfo=cfgDFAPath['PATH'].getboolean('addVelocityInfo'))
|
|
@@ -93,7 +108,8 @@ def generatePathAndSplitpoint(avalancheDir, cfgDFAPath, cfgMain, runDFAModule):
|
|
|
93
108
|
# make the parabolic fit
|
|
94
109
|
parabolicFit = getParabolicFit(cfgDFAPath['PATH'], avaProfileMass, dem)
|
|
95
110
|
# here the avaProfileMass given in input is overwritten and returns only an x, y, z extended profile
|
|
96
|
-
avaProfileMass = extendDFAPath(cfgDFAPath['PATH'], avaProfileMass, dem, particlesIni
|
|
111
|
+
avaProfileMass = extendDFAPath(cfgDFAPath['PATH'], avaProfileMass, dem, particlesIni,
|
|
112
|
+
fieldPFT=fieldPFT)
|
|
97
113
|
# resample path and keep track of start and end of mass averaged part
|
|
98
114
|
avaProfileMass = resamplePath(cfgDFAPath['PATH'], dem, avaProfileMass)
|
|
99
115
|
# get split point
|
|
@@ -306,7 +322,33 @@ def getMassAvgPathFromFields(fieldsList, fieldHeader, dem):
|
|
|
306
322
|
return avaProfileMass
|
|
307
323
|
|
|
308
324
|
|
|
309
|
-
def
|
|
325
|
+
def readPeakFT(peakFilesDF, simName):
|
|
326
|
+
""" get the peak flow thickness field (pft) of one simulation from the peak file dataframe
|
|
327
|
+
|
|
328
|
+
Parameters
|
|
329
|
+
-----------
|
|
330
|
+
peakFilesDF: pandas DataFrame
|
|
331
|
+
peak files of all simulations (from fU.makeSimDF), parsed once for the whole run
|
|
332
|
+
simName: str
|
|
333
|
+
simulation name
|
|
334
|
+
|
|
335
|
+
Returns
|
|
336
|
+
--------
|
|
337
|
+
fieldPFT: numpy array
|
|
338
|
+
peak flow thickness raster (same grid as the simulation dem),
|
|
339
|
+
None if no pft peak field is available for this simulation
|
|
340
|
+
"""
|
|
341
|
+
# the simulation can be identified by its full name or by its hash (the index of the
|
|
342
|
+
# configuration dataframe iterated in generatePathAndSplitpoint is the hash)
|
|
343
|
+
isSim = (peakFilesDF['simName'] == simName) | (peakFilesDF['simID'] == simName)
|
|
344
|
+
index = peakFilesDF.index[isSim & (peakFilesDF['resType'] == 'pft')]
|
|
345
|
+
if len(index) == 0:
|
|
346
|
+
log.warning('No pft peak field found for simulation %s' % simName)
|
|
347
|
+
return None
|
|
348
|
+
return IOf.readRaster(peakFilesDF.loc[index[0], 'files'])['rasterData']
|
|
349
|
+
|
|
350
|
+
|
|
351
|
+
def extendDFAPath(cfg, avaProfile, dem, particlesIni, fieldPFT=None):
|
|
310
352
|
""" extend the DFA path at the top and bottom
|
|
311
353
|
avaProfile with x, y, z, s information
|
|
312
354
|
|
|
@@ -316,6 +358,8 @@ def extendDFAPath(cfg, avaProfile, dem, particlesIni):
|
|
|
316
358
|
configuration object with:
|
|
317
359
|
|
|
318
360
|
- extTopOption: int, how to extend towards the top? 0 for heighst point method, a for largest runout method
|
|
361
|
+
- extBottomOption: int, how to extend towards the bottom? 0 for the straight-line extrapolation
|
|
362
|
+
method, 1 for the least-cost extension to the deposit front (requires fieldPFT)
|
|
319
363
|
- nCellsResample: int, resampling length is given by nCellsResample*demCellSize
|
|
320
364
|
- nCellsMinExtend: int, when extending towards the bottom, take points at more
|
|
321
365
|
than nCellsMinExtend*demCellSize from last point to get the direction
|
|
@@ -329,6 +373,8 @@ def extendDFAPath(cfg, avaProfile, dem, particlesIni):
|
|
|
329
373
|
dem dict
|
|
330
374
|
particlesIni: dict
|
|
331
375
|
initial particles dict
|
|
376
|
+
fieldPFT: numpy array, optional
|
|
377
|
+
peak flow thickness field on the dem grid, only used if extBottomOption = 1
|
|
332
378
|
|
|
333
379
|
Returns
|
|
334
380
|
--------
|
|
@@ -339,7 +385,15 @@ def extendDFAPath(cfg, avaProfile, dem, particlesIni):
|
|
|
339
385
|
resampleDistance = cfg.getfloat('nCellsResample') * dem['header']['cellsize']
|
|
340
386
|
avaProfile, _ = gT.prepareLine(dem, avaProfile, distance=resampleDistance, Point=None)
|
|
341
387
|
avaProfile = extendProfileTop(cfg.getint('extTopOption'), particlesIni, avaProfile)
|
|
342
|
-
|
|
388
|
+
if cfg.getint('extBottomOption', fallback=0) == 1:
|
|
389
|
+
if fieldPFT is None:
|
|
390
|
+
log.warning('extBottomOption is 1 but no peak flow thickness field was provided, '
|
|
391
|
+
'falling back to the straight-line bottom extension')
|
|
392
|
+
avaProfile = extendProfileBottom(cfg, dem, avaProfile)
|
|
393
|
+
else:
|
|
394
|
+
avaProfile = extendProfileToFront(cfg, dem, avaProfile, fieldPFT)
|
|
395
|
+
else:
|
|
396
|
+
avaProfile = extendProfileBottom(cfg, dem, avaProfile)
|
|
343
397
|
return avaProfile
|
|
344
398
|
|
|
345
399
|
|
|
@@ -523,6 +577,205 @@ def extendProfileBottom(cfg, dem, profile):
|
|
|
523
577
|
return profile
|
|
524
578
|
|
|
525
579
|
|
|
580
|
+
def extendProfileToFront(cfg, dem, profile, fieldPFT):
|
|
581
|
+
""" extend the DFA path at the bottom to the front of the deposit
|
|
582
|
+
|
|
583
|
+
Locate the front of the deposit in the peak flow thickness field (findFlowFront)
|
|
584
|
+
and extend the profile to it along a least-cost path over the dem
|
|
585
|
+
(leastCostPath). In contrast to extendProfileBottom, the extension follows
|
|
586
|
+
the terrain and the deposit and stops at the front instead of extrapolating
|
|
587
|
+
a straight line of fixed relative length. If the front cannot be located or
|
|
588
|
+
reached, the profile falls back to the straight-line extension
|
|
589
|
+
(extendProfileBottom).
|
|
590
|
+
|
|
591
|
+
Parameters
|
|
592
|
+
-----------
|
|
593
|
+
cfg: configParser
|
|
594
|
+
configuration object with:
|
|
595
|
+
|
|
596
|
+
- ftThreshold: float, minimum flow thickness (m) for a cell to belong to the flow footprint
|
|
597
|
+
- lowFrontFraction: float, fraction of the flow elevation range defining the front band
|
|
598
|
+
- upSlopePenalty: float, cost multiplier on the positive elevation gain of an edge
|
|
599
|
+
- flowDistPenalty: float, cost multiplier on the distance (m) of a cell from the flow footprint
|
|
600
|
+
dem: dict
|
|
601
|
+
dem dict
|
|
602
|
+
profile: dict
|
|
603
|
+
profile to extend
|
|
604
|
+
fieldPFT: numpy array
|
|
605
|
+
peak flow thickness field (pft) on the same grid as the dem
|
|
606
|
+
|
|
607
|
+
Returns
|
|
608
|
+
--------
|
|
609
|
+
profile: dict
|
|
610
|
+
extended profile (x, y, z, s)
|
|
611
|
+
"""
|
|
612
|
+
header = dem['header']
|
|
613
|
+
csz = header['cellsize']
|
|
614
|
+
zRaster = dem['rasterData']
|
|
615
|
+
if fieldPFT.shape != zRaster.shape:
|
|
616
|
+
message = 'Peak flow thickness field and dem do not have the same shape'
|
|
617
|
+
log.error(message)
|
|
618
|
+
raise AssertionError(message)
|
|
619
|
+
# get last point
|
|
620
|
+
xLast = profile['x'][-1]
|
|
621
|
+
yLast = profile['y'][-1]
|
|
622
|
+
sLast = profile['s'][-1]
|
|
623
|
+
# locate the deposit front
|
|
624
|
+
frontRow, frontCol = findFlowFront(fieldPFT, zRaster, cfg.getfloat('ftThreshold'),
|
|
625
|
+
cfg.getfloat('lowFrontFraction'))
|
|
626
|
+
if frontRow is None:
|
|
627
|
+
log.warning('No flow cell above ftThreshold was found, '
|
|
628
|
+
'falling back to the straight-line bottom extension')
|
|
629
|
+
return extendProfileBottom(cfg, dem, profile)
|
|
630
|
+
# cell of the last profile point (profile and field share the dem grid)
|
|
631
|
+
startRow = min(max(int(round((yLast - header['yllcenter']) / csz)), 0), zRaster.shape[0] - 1)
|
|
632
|
+
startCol = min(max(int(round((xLast - header['xllcenter']) / csz)), 0), zRaster.shape[1] - 1)
|
|
633
|
+
cellPath = leastCostPath((startRow, startCol), (frontRow, frontCol), fieldPFT, zRaster, csz,
|
|
634
|
+
cfg.getfloat('ftThreshold'), cfg.getfloat('upSlopePenalty'),
|
|
635
|
+
cfg.getfloat('flowDistPenalty'))
|
|
636
|
+
if len(cellPath) < 2:
|
|
637
|
+
log.warning('No least-cost path to the deposit front was found, '
|
|
638
|
+
'falling back to the straight-line bottom extension')
|
|
639
|
+
return extendProfileBottom(cfg, dem, profile)
|
|
640
|
+
# drop the first cell (the path end itself) and convert to coordinates; the extension
|
|
641
|
+
# points are cell centers of valid dem cells, so z is read directly from the raster
|
|
642
|
+
rows, cols = np.array(cellPath[1:]).T
|
|
643
|
+
xExtBottom = header['xllcenter'] + cols * csz
|
|
644
|
+
yExtBottom = header['yllcenter'] + rows * csz
|
|
645
|
+
zExtBottom = zRaster[rows, cols]
|
|
646
|
+
dx = np.diff(np.append(xLast, xExtBottom))
|
|
647
|
+
dy = np.diff(np.append(yLast, yExtBottom))
|
|
648
|
+
sExtBottom = sLast + np.cumsum(np.sqrt(dx**2 + dy**2))
|
|
649
|
+
log.info('Path extended to the deposit front (%.0f m beyond the mass averaged path end)'
|
|
650
|
+
% (sExtBottom[-1] - sLast))
|
|
651
|
+
|
|
652
|
+
# extend profile
|
|
653
|
+
profile['x'] = np.append(profile['x'], xExtBottom)
|
|
654
|
+
profile['y'] = np.append(profile['y'], yExtBottom)
|
|
655
|
+
profile['z'] = np.append(profile['z'], zExtBottom)
|
|
656
|
+
profile['s'] = np.append(profile['s'], sExtBottom)
|
|
657
|
+
return profile
|
|
658
|
+
|
|
659
|
+
|
|
660
|
+
def findFlowFront(fieldPFT, demRaster, ftThreshold, lowFrontFraction):
|
|
661
|
+
""" locate the front of the deposit in a peak flow thickness field
|
|
662
|
+
|
|
663
|
+
The front is the flow-thickness-weighted centroid of the flow cells lying
|
|
664
|
+
in the lowest lowFrontFraction of the flow elevation range. The band always
|
|
665
|
+
contains the lowest flow cell; for a flat deposit it covers the whole
|
|
666
|
+
footprint, so the front falls back to the centroid of the deposit. If the
|
|
667
|
+
centroid falls outside the flow footprint (e.g. between two deposit lobes),
|
|
668
|
+
the front is snapped to the nearest cell of the band.
|
|
669
|
+
|
|
670
|
+
Parameters
|
|
671
|
+
-----------
|
|
672
|
+
fieldPFT: numpy array
|
|
673
|
+
peak flow thickness field
|
|
674
|
+
demRaster: numpy array
|
|
675
|
+
dem raster of the same shape
|
|
676
|
+
ftThreshold: float
|
|
677
|
+
minimum flow thickness (m) for a cell to belong to the flow footprint
|
|
678
|
+
lowFrontFraction: float
|
|
679
|
+
fraction of the flow elevation range defining the front band
|
|
680
|
+
|
|
681
|
+
Returns
|
|
682
|
+
--------
|
|
683
|
+
frontRow, frontCol: int
|
|
684
|
+
cell of the front, (None, None) if there is no flow above ftThreshold
|
|
685
|
+
"""
|
|
686
|
+
flow = (fieldPFT > ftThreshold) & np.isfinite(demRaster)
|
|
687
|
+
if not flow.any():
|
|
688
|
+
return None, None
|
|
689
|
+
rows, cols = np.nonzero(flow)
|
|
690
|
+
elev = demRaster[rows, cols]
|
|
691
|
+
lowBand = elev <= elev.min() + lowFrontFraction * (elev.max() - elev.min())
|
|
692
|
+
weight = fieldPFT[rows, cols] * lowBand
|
|
693
|
+
# weight.sum() is always positive: the lowest flow cell is in lowBand and, being a flow
|
|
694
|
+
# cell, carries fieldPFT > ftThreshold >= 0, so no divide-by-zero guard is needed
|
|
695
|
+
frontRow = int(round(np.sum(rows * weight) / weight.sum()))
|
|
696
|
+
frontCol = int(round(np.sum(cols * weight) / weight.sum()))
|
|
697
|
+
if not flow[frontRow, frontCol]:
|
|
698
|
+
# centroid outside the footprint (e.g. two deposit lobes): snap to the band
|
|
699
|
+
bandInd = np.flatnonzero(lowBand)
|
|
700
|
+
iNear = bandInd[np.argmin((rows[bandInd] - frontRow)**2 + (cols[bandInd] - frontCol)**2)]
|
|
701
|
+
frontRow, frontCol = int(rows[iNear]), int(cols[iNear])
|
|
702
|
+
return frontRow, frontCol
|
|
703
|
+
|
|
704
|
+
|
|
705
|
+
def leastCostPath(startCell, goalCell, fieldPFT, demRaster, csz, ftThreshold, upSlopePenalty,
|
|
706
|
+
flowDistPenalty):
|
|
707
|
+
""" Dijkstra least-cost path between two cells of the dem grid
|
|
708
|
+
|
|
709
|
+
The cost of an edge is its horizontal length plus a penalty on the positive
|
|
710
|
+
elevation gain and a penalty on the distance (m) of the target cell from
|
|
711
|
+
the flow footprint, so that the path descends along the deposit.
|
|
712
|
+
|
|
713
|
+
Parameters
|
|
714
|
+
-----------
|
|
715
|
+
startCell, goalCell: tuple
|
|
716
|
+
(row, col) of the start and goal cells
|
|
717
|
+
fieldPFT: numpy array
|
|
718
|
+
peak flow thickness field used to build the flow footprint
|
|
719
|
+
demRaster: numpy array
|
|
720
|
+
dem raster of the same shape
|
|
721
|
+
csz: float
|
|
722
|
+
cell size (m)
|
|
723
|
+
ftThreshold: float
|
|
724
|
+
minimum flow thickness (m) for a cell to belong to the flow footprint
|
|
725
|
+
upSlopePenalty: float
|
|
726
|
+
cost multiplier on the positive elevation gain of an edge
|
|
727
|
+
flowDistPenalty: float
|
|
728
|
+
cost multiplier on the distance (m) of a cell from the flow footprint
|
|
729
|
+
|
|
730
|
+
Returns
|
|
731
|
+
--------
|
|
732
|
+
cellPath: list
|
|
733
|
+
(row, col) cells from start to goal, empty if the goal is unreachable
|
|
734
|
+
"""
|
|
735
|
+
if upSlopePenalty < 0 or flowDistPenalty < 0:
|
|
736
|
+
message = 'The penalty parameters of the least-cost path must not be negative'
|
|
737
|
+
log.error(message)
|
|
738
|
+
raise AssertionError(message)
|
|
739
|
+
# distance (m) from the flow footprint, used to keep the path on the deposit
|
|
740
|
+
distToFlow = distance_transform_edt(~(fieldPFT > ftThreshold), sampling=csz)
|
|
741
|
+
nRows, nCols = demRaster.shape
|
|
742
|
+
demValid = np.isfinite(demRaster)
|
|
743
|
+
neighbours = ((-1, -1), (-1, 0), (-1, 1), (0, -1), (0, 1), (1, -1), (1, 0), (1, 1))
|
|
744
|
+
diagDist = csz * math.sqrt(2.)
|
|
745
|
+
costGrid = np.full((nRows, nCols), np.inf)
|
|
746
|
+
costGrid[startCell] = 0.
|
|
747
|
+
previousCell = np.full((nRows, nCols, 2), -1, dtype=np.int64)
|
|
748
|
+
queue = [(0., int(startCell[0]), int(startCell[1]))]
|
|
749
|
+
while queue:
|
|
750
|
+
cost, row, col = heapq.heappop(queue)
|
|
751
|
+
if (row, col) == (goalCell[0], goalCell[1]):
|
|
752
|
+
break
|
|
753
|
+
if cost > costGrid[row, col]:
|
|
754
|
+
continue
|
|
755
|
+
for dRow, dCol in neighbours:
|
|
756
|
+
nRow, nCol = row + dRow, col + dCol
|
|
757
|
+
if 0 <= nRow < nRows and 0 <= nCol < nCols and demValid[nRow, nCol]:
|
|
758
|
+
# no diagonal moves across the corner of two nodata cells
|
|
759
|
+
if dRow and dCol and not (demValid[row, nCol] and demValid[nRow, col]):
|
|
760
|
+
continue
|
|
761
|
+
dz = demRaster[nRow, nCol] - demRaster[row, col]
|
|
762
|
+
edge = ((diagDist if (dRow and dCol) else csz) + max(dz, 0.) * upSlopePenalty
|
|
763
|
+
+ distToFlow[nRow, nCol] * flowDistPenalty)
|
|
764
|
+
if cost + edge < costGrid[nRow, nCol]:
|
|
765
|
+
costGrid[nRow, nCol] = cost + edge
|
|
766
|
+
previousCell[nRow, nCol] = (row, col)
|
|
767
|
+
heapq.heappush(queue, (cost + edge, nRow, nCol))
|
|
768
|
+
if previousCell[goalCell[0], goalCell[1], 0] < 0 and tuple(goalCell) != tuple(startCell):
|
|
769
|
+
return []
|
|
770
|
+
cellPath = []
|
|
771
|
+
row, col = int(goalCell[0]), int(goalCell[1])
|
|
772
|
+
while row >= 0:
|
|
773
|
+
cellPath.append((row, col))
|
|
774
|
+
row, col = int(previousCell[row, col, 0]), int(previousCell[row, col, 1])
|
|
775
|
+
cellPath.reverse()
|
|
776
|
+
return cellPath
|
|
777
|
+
|
|
778
|
+
|
|
526
779
|
def getParabolicFit(cfg, avaProfile, dem):
|
|
527
780
|
"""fit a parabola on a set of (s, z) points
|
|
528
781
|
|
|
@@ -652,8 +905,10 @@ def resamplePath(cfg, dem, avaProfile):
|
|
|
652
905
|
avaProfile, _ = gT.prepareLine(dem, avaProfile, distance=resampleDistance, Point=None)
|
|
653
906
|
# make sure we get the good start and end point... prepareLine might make a small error on the s coord
|
|
654
907
|
indFirst = np.argwhere(avaProfile['s'] >= s0 - resampleDistance/3)[0][0]
|
|
655
|
-
# look for the first point in the extension and take the one before
|
|
656
|
-
|
|
908
|
+
# look for the first point in the extension and take the one before; if the extension is
|
|
909
|
+
# shorter than a resample step, the mass averaged part reaches the last point
|
|
910
|
+
indEndCandidates = np.argwhere(avaProfile['s'] >= sEnd + resampleDistance/3)
|
|
911
|
+
indEnd = indEndCandidates[0][0]-1 if len(indEndCandidates) > 0 else np.size(avaProfile['s'])-1
|
|
657
912
|
avaProfile['indStartMassAverage'] = indFirst
|
|
658
913
|
avaProfile['indEndMassAverage'] = indEnd
|
|
659
914
|
return avaProfile
|
|
@@ -21,6 +21,12 @@ nCellsResample = 10
|
|
|
21
21
|
# option 1: find the point that will lead to the longest runout
|
|
22
22
|
extTopOption = 1
|
|
23
23
|
|
|
24
|
+
# extension method at the bottom
|
|
25
|
+
# option 0: extend the path in the direction of its last points by factBottomExt x sMax
|
|
26
|
+
# option 1: extend the path to the front of the deposit with a least-cost path (Dijkstra) over the dem,
|
|
27
|
+
# based on the peak flow thickness field (pft) of the simulation
|
|
28
|
+
extBottomOption = 0
|
|
29
|
+
|
|
24
30
|
# when extending the path at the bottom, extend path in
|
|
25
31
|
# the direction extracted form the last points of the path
|
|
26
32
|
# (all points at a distance nCellsMinExtend x cellSize < distance < nCellsMaxExtend x cellSize
|
|
@@ -30,7 +36,8 @@ nCellsMaxExtend = 20
|
|
|
30
36
|
# this value needs to be chosen in accordance with nCellsResample (if nCellsMaxExtend < nCellsResample no points
|
|
31
37
|
# might be found for the path extension process)
|
|
32
38
|
|
|
33
|
-
# for the extrapolation at the bottom, add factBottomExt * sMax to the path
|
|
39
|
+
# for the extrapolation at the bottom (extBottomOption = 0), add factBottomExt * sMax to the path
|
|
40
|
+
# (and then check if the extension
|
|
34
41
|
# is on the DEM, if not iterate by dichotomy until we find a point on the topography or reach a maximum
|
|
35
42
|
# iteration number (integer, in this case we pick the last point found inside the dem)
|
|
36
43
|
# or precision (nBottomExtPrecision * cellSize))
|
|
@@ -38,6 +45,17 @@ factBottomExt = 0.3
|
|
|
38
45
|
maxIterationExtBot = 10
|
|
39
46
|
nBottomExtPrecision = 10
|
|
40
47
|
|
|
48
|
+
# parameters of the bottom extension to the deposit front (extBottomOption = 1)
|
|
49
|
+
# minimum flow thickness [m] for a cell to belong to the flow footprint
|
|
50
|
+
ftThreshold = 0.01
|
|
51
|
+
# the front is the flow-thickness-weighted centroid of the flow cells lying in the lowest
|
|
52
|
+
# lowFrontFraction of the flow elevation range
|
|
53
|
+
lowFrontFraction = 0.05
|
|
54
|
+
# penalties of the least-cost path: upSlopePenalty applies to the positive elevation gain [m]
|
|
55
|
+
# of an edge, flowDistPenalty to the distance [m] of a cell from the flow footprint
|
|
56
|
+
upSlopePenalty = 10.
|
|
57
|
+
flowDistPenalty = 5.
|
|
58
|
+
|
|
41
59
|
# split point finding
|
|
42
60
|
# first fit a parabola on the non extended path. Start and end point match the profile
|
|
43
61
|
# the 3rd constraint is given by:
|
|
@@ -66,7 +84,8 @@ tSteps = 0:5
|
|
|
66
84
|
|
|
67
85
|
# resType (ppr, pft, pfv, pta, FT, FV, P, FM, Vx, Vy, Vz, TA, particles). pta|FT|FM is the minimum for generating the
|
|
68
86
|
# path from fields, pta|particles is the minimum for generating the path from particles (see pathFromPart parameter)
|
|
69
|
-
|
|
87
|
+
# pft is additionally required for the bottom extension to the deposit front (extBottomOption = 1)
|
|
88
|
+
resType = pta|FT|FM|pft
|
|
70
89
|
|
|
71
90
|
# list of simulations that shall be performed (null, ent, res, entres, available (use all available input data))
|
|
72
91
|
simTypeList = null
|