I have a script that calculates standard deviation for a list of grids using the Cell Statistics function in Spatial Analyst for ArcGIS 10.0 The syntax is this:
stdevGrid = arcpy.sa.CellStatistics(filteredGrids, "STD", "DATA")
However, the output of this command is obvious wrong. Some values are higher than the maximum values for any of the input grids.
In Arctoolbox, I did the same calculation over the same grids and got an output that seemed much more reasonable. However, even using the python window in Arcmap produced the same wacky grid from the original command.
In desperation, I tried to build the command using modelbuilder and check out the resultant code. The output used this command
arcpy.gp.CellStatistics_sa(filteredGrids,<pathForOutputGrid>,"STD","DATA")
I ran this in python and it got the same (correct) result as Arctoolbox, not the incorrect values that the original command did.
The only thing I can figure is that there is an environment setting I'm missing, but as the new line in the exact same place in the original script produced a different output, I'm wondering if this is a bug in ArcGIS 10.0.
Has anyone else run into something like this? Does anyone have any idea why this happens?