I have a folder with Day 1 Min, Day 1 Max and Day 2 Min, Day 2 Max...Day X Min, Day X Max rasters in it. I want to loop through this folder and use cell statistics on them to sum each day's min/max values (i.e. Day 1 Min + Day 1 Max).
I tried the following and got no results. Any pointers? How do I ensure that Cell Stats is summing the same days and not across multiple days?
MainFolder = r"C:\Users\uma.bhandaram\Desktop\2015\RasterCon2015"
for (path, dirs, files) in os.walk(MainFolder):
for dir in dirs:
env.workspace = os.path.join(path, dir)
listRstrs = arcpy.ListRasters("Con.tif")
for raster in listRstrs:
rasterlist = []
rasterlist.append(raster)
outCellStats = CellStatistics(rasterlist, "SUM", "DATA")
outCellStats.save(os.path.join(path, dir) + "Check.tif")