As mentioned in the title, simple script to set null cell values below three standard deviations beyond the mean:
import arcpy, sys, os #Accept input and output raster inRas = sys.argv outRas = sys.argv #Pull mean and standard deviation from input raster meanie = arcpy.GetRasterProperties_management(inRas, "MEAN") meanres = meanie.getOutput(0) meanfloat = float(meanres) stdev = arcpy.GetRasterProperties_management(inRas, "STD") stdres = stdev.getOutput(0) stdfloat = float(stdres) #Calculate threshold value threshold = meanfloat + (3 * stdfloat) threstring = str(threshold) #Create where clause whereClause = "VALUE < " + threstring #Test output arcpy.AddMessage (whereClause) #Run SetNull outRas = arcpy.SetNull(inRas, inRas, whereClause)
This results in the following error:
Traceback (most recent call last): File "Z:<directory-redacted>\Nullify.py", line 27, in <module> outRas = arcpy.SetNull(inRas, inRas, whereClause) AttributeError: 'module' object has no attribute 'SetNull' Failed to execute (Nullifiy).
If anyone has any ideas, I'd really appreciate the help, thanks so much.