ana5Utils.DFAPathGeneration.extendProfileToFront
- extendProfileToFront(cfg, dem, profile, fieldPFT)[source]
extend the DFA path at the bottom to the front of the deposit
Locate the front of the deposit in the peak flow thickness field (findFlowFront) and extend the profile to it along a least-cost path over the dem (leastCostPath). In contrast to extendProfileBottom, the extension follows the terrain and the deposit and stops at the front instead of extrapolating a straight line of fixed relative length. If the front cannot be located or reached, the profile falls back to the straight-line extension (extendProfileBottom).
- Parameters
cfg (configParser) – configuration object with:
ftThreshold: float, minimum flow thickness (m) for a cell to belong to the flow footprint
lowFrontFraction: float, fraction of the flow elevation range defining the front band
upSlopePenalty: float, cost multiplier on the positive elevation gain of an edge
flowDistPenalty: float, cost multiplier on the distance (m) of a cell from the flow footprint
dem (dict) – dem dict
profile (dict) – profile to extend
fieldPFT (numpy array) – peak flow thickness field (pft) on the same grid as the dem
- Returns
profile – extended profile (x, y, z, s)
- Return type
dict