def atLoc(mkNameFile,diction,inFol,outFol):
mkArray = funcs.singleTifToArray(mkNameFile)
outArray= np.zeros(mkArray.shape)
for key in diction:
dictVal = diction[key]
keyArray = funcs.singleTifToArray(inFol + str(key) + "_rval.tif")
condlist = [ mkArray == dictVal ]
choicelist = [ keyArray ]
outArray = np.select(condlist, choicelist, outArray)
funcs.array_to_raster(mkNameFile,outArray, outFol+"rval_MK_name_sig2.tif")
#VERY INEFFICIENT -> deprecated:
#iterate over the best_pix Names of Mann Kendall and extract the rvals... of this combination
#return as own raster
#mkNameFile is the Mann-Kendall file to iterate over, inFol contains the rval rasters,
# diction is a dictionary with short numbers as keys (the ones in mkNameFile)
# and long numbers as values
# noData is the value to be skipped as it does not indicate a real combination
评论列表
文章目录