out1Peak.outPlotAllPeakDiffs.computeAreaDiff

computeAreaDiff(refRaster, simRaster, thresholdValueReference, thresholdValueSimulation, dem, cropToArea=None)[source]

compute difference between two rasters based on a thresholdValue

Parameters
  • refRaster (numpy ndarray) – reference raster

  • simRaster (numpy ndarray) – simulation result raster

  • thresholdValueReference (float) – threshold value to mask reference raster

  • thresholdValueSimlation (float) – threshold value to mask simulation raster

  • dem (dict) – dictionary with info on DEM used for sims, here areaRaster is required to compute actual areas of indicators

  • cropToArea (None or numpy ndarray) – None or raster that is used to define where comparison is computed (0 -no, 1-yes)

Returns

  • refMask (numpy ndarray) – array with 1 indicating reference data found exceeding threshold and 0 not found

  • compRaster (numpy ndarray) – array with 1 indicating simulation data found exceeding threshold and 0 not found

  • indicatorDict (dict) –

    dictionary with info on true positive, false positive, false negative

    arrays with 1 indicating true positive, false positive, false negative areas and 0 all other entries number of cells where tp, fp, np total area for tp, fp, fn