AnsweredAssumed Answered

# CELL STATISTICS ISSUES

Question asked by tonalca6864 on Dec 6, 2018

Hi,

A rather simple thing in python but not getting the right outputs. Same inputs, same thing done in ArcMap and no problem at all.

``# Input rastersrast_jan = Raster(env.workspace + "\\" + StageAge + "_Upwelling_mag_jan")rast_feb = Raster(env.workspace + "\\" + StageAge + "_Upwelling_mag_feb")rast_mar = Raster(env.workspace + "\\" + StageAge + "_Upwelling_mag_mar")rast_apr = Raster(env.workspace + "\\" + StageAge + "_Upwelling_mag_apr")rast_may = Raster(env.workspace + "\\" + StageAge + "_Upwelling_mag_may")rast_jun = Raster(env.workspace + "\\" + StageAge + "_Upwelling_mag_jun")rast_jul = Raster(env.workspace + "\\" + StageAge + "_Upwelling_mag_jul")rast_aug = Raster(env.workspace + "\\" + StageAge + "_Upwelling_mag_aug")rast_sep = Raster(env.workspace + "\\" + StageAge + "_Upwelling_mag_sep")rast_oct = Raster(env.workspace + "\\" + StageAge + "_Upwelling_mag_oct")rast_nov = Raster(env.workspace + "\\" + StageAge + "_Upwelling_mag_nov")rast_dec = Raster(env.workspace + "\\" + StageAge + "_Upwelling_mag_dec")outRas_sum = CellStatistics([rast_jan + rast_feb + rast_mar + rast_apr + rast_may + rast_jun + rast_jul + rast_aug + rast_sep + rast_oct + rast_nov + rast_dec], "SUM", "DATA")outRas_sum.save(env.workspace + "\\" + StageAge + "_Upwelling_annual_SUM")outRas_mean = CellStatistics([rast_jan + rast_feb + rast_mar + rast_apr + rast_may + rast_jun + rast_jul + rast_aug + rast_sep + rast_oct + rast_nov + rast_dec], "MEAN", "DATA")outRas_mean.save(env.workspace + "\\" + StageAge + "_Upwelling_monthly_AV")``

Issues:

• The "DATA" option is performing as if it were "NODATA"
• The second output is supposed to be the MEAN but it does the SUM

Am I missing something really obvious here? any ideas?

Thanks