This tool creates a new raster in which each grid cell is equal to the cosine of the corresponding grid cell in an input raster. The input raster image should contain angular data measured in either degrees or radians. The algorithm determines the input units by checking the ZUnits field in the raster header file (.dep). If this field is not set to radians, it is assumed that the input raster is measured in degrees and the appropriate conversion is made before the operation is carried out. Grid cells with NoData values in the input raster will be assigned NoData values in the output raster.
The following is an example of a Python script that uses this tool:
wd = pluginHost.getWorkingDirectory()
inputFile = wd + "input.dep"
outputFile = wd + "output.dep"
args = [inputFile, outputFile]
pluginHost.runPlugin("Cos", args, False)
This is a Groovy script also using this tool:
def wd = pluginHost.getWorkingDirectory()
def inputFile = wd + "input.dep"
def outputFile = wd + "output.dep"
String args = [inputFile, outputFile]
pluginHost.runPlugin("Cos", args, false)