TfMSLarge
Summary
Defines an MSLarge transformation function which is determined from the mean multiplier and standard deviation multiplier shape–controlling parameters as well as the lower and upper threshold that identify the range within which to apply the function.
Learn more about how the parameters affect this transformation function
Discussion
The tool that uses the TfMSLarge object is Rescale by Function.
Where \(x\) is the input value, there are two equations for the MSLarge function, depending on the product of \(a * m\):
If \(x > a * m\):
\(f(x) = 1 - (b * s) \space / \space (x - (a * m) + (b * s))\)
where:
\(x\) is the input value
\(m\) is the mean
\(s\) is the standard deviation
\(a\) is a multiplier of the mean
\(b\) is a multiplier of the standard deviation
The \(a\) and \(b\) multipliers are input parameters.
If \(x <= a * m\):
\(f(x) = 0\)
The function values range from 0 to 1, which are then transformed to the evaluation scale.
The MSLarge function is useful when the large input values are preferred and they should receive higher output evaluation values.
The result from the MSLarge transformation function can be similar to that from the Large transformation function, depending on how the multipliers of the mean and standard deviation are defined.
Syntax
TfMSLarge(meanMultiplier, STDMultiplier, lowerThreshold, valueBelowThreshold, upperThreshold, valueAboveThreshold)
| Name | Explanation | Data type |
|---|---|---|
|
meanMultiplier |
The multiplier for the mean of the input values in the MSLarge function equation. The The default value is 1.0. |
Double |
|
STDMultiplier |
The multiplier for the standard deviation of the input values in the MSLarge function equation. The The default value is 1.0. |
Double |
|
lowerThreshold |
Defines the starting value at which to begin applying the specified transformation function. The input value corresponding to the The The default value is None. |
Double |
|
valueBelowThreshold |
A value to assign output cell locations with input values below the The value for The default value is None. |
Variant |
|
upperThreshold |
Defines the ending value at which to stop applying the specified transformation function. The input value corresponding to the The The default value is None. |
Double |
|
valueAboveThreshold |
A value to assign output cell locations with input values above the The value for The default value is None. |
Variant |
Properties
| Name | Explanation | Data type |
|---|---|---|
|
meanMultiplier (Read and Write) |
The value of the |
Double |
|
STDMultiplier (Read and Write) |
The value of the |
Double |
|
lowerThreshold (Read and Write) |
The value of the |
Double |
|
valueBelowThreshold (Read and Write) |
The value that will be assigned to the output cells whose input values are below the |
Variant |
|
upperThreshold (Read and Write) |
The value of the |
Double |
|
valueAboveThreshold (Read and Write) |
The value that will be assigned to the output cells whose input values are above the |
Variant |
Code sample
Demonstrates how to create a TfMSLarge class and use it in the RescaleByFunction tool within the Python window.
import arcpy
from arcpy.sa import *
from arcpy import env
env.workspace = "c:/sapyexamples/data"
outRescale = RescaleByFunction("biomass", TfMSLarge(1.2, 1.25, "#", "#", "#", "#"), 1, 10)
outRescale.save("c:/sapyexamples/rescaletfml1")
Demonstrates how to transform the input data with the RescaleByFunction tool using the TfMSLarge class.
# Name: TfMSLarge_Ex_02.py
# Description: Rescales input raster data using a MSLarge function and
# transforms the function values onto a specified evaluation scale.
# Requirements: Spatial Analyst extension
# Import system modules
import arcpy
from arcpy import env
from arcpy.sa import *
# Set environment settings
env.workspace = "C:/sapyexamples/data"
# Set local variables
inRaster = "biomass"
# Create the TfMSLarge object
meanmult = 1.2
stdmult = 1.25
lowerthresh = "#"
valbelowthresh = "#"
upperthresh = "#"
valabovethresh = "#"
myTfFunction = TfMSLarge(meanmult, stdmult, lowerthresh, valbelowthresh, upperthresh, valabovethresh)
# Set evaluation scale
fromscale = 1
toscale = 10
# Run RescaleByFunction
outRescale = RescaleByFunction(inRaster, myTfFunction, fromscale, toscale)
# Save the output
outRescale.save("c:/sapyexamples/rescaletfml2")