TASSEL

Tasseled-cap transformation


EnvironmentsPYTHON :: EASI :: MODELER
Quick linksDescription :: Parameters :: Parameter descriptions :: Details :: Example

Back to top

Description


TASSEL calculates the tasseled-cap transformation for the sensor and bands you specify.
Back to top

Parameters


tassel(fili, visirchn, filo, datatype, scaloffs, scalfact, ftype, foptions)

Name Type Caption Length Value range
FILI * str Name of input file 1 -    
VISIRCHN List[int] Required bands to calculate tasseled cap 0 - 6  
FILO * str Name of the output file 1 -    
DATATYPE str Output raster type 0 - 3 8U | 16S | 16U | 32R
Default: 16S
SCALOFFS List[float] Scaling offset 0 - 3  
SCALFACT List[float] Scaling factor 0 - 3  
FTYPE str Format of output file 0 - 4 Default: PIX
FOPTIONS str Options for output format 0 -    

* Required parameter
Back to top

Parameter descriptions

FILI

The name of the input PCIDSK file.

The file must contain the specific bands necessary to calculate the tasseled-cap transformation. The number of bands in the file must range from three through six (Blue/Green/Red/NIR/SWIR1.6/SWIR2.2).

VISIRCHN

The bands required to calculate the tasseled-cap transformation.

You must specify each required band for each sensor in a specific order to ensure that the tasseled cap is computed correctly.

If you do not specify a value, the required bands are determined based on the metadata of the input file. The file metadata must have the necessary band information.

Sensor Parameter definition

Deimos-1
DMC
Resourcesat-2 LISS-4
SPOT-1
SPOT-2
SPOT-3

<green>,<red>,<nir>

ALI
Landsat-4 TM
Landsat-5 TM
Landsat-7 ETM+
Landsat-8
Sentinel-2
WorldView-3 (16-channel)

<blue,<green>,<red>,<nir>,<swir>,<swir1>

ALOS Avnir-2
CBERS-4 MUX
CBERS-4 WFI
Deimos-2
FASat Charlie
Formasat-2
Gaofen 1
Gaofen 2
GeoEye-1
Gokturk1
Ikonos-2
IRS-1A
IRS-2B
KazEOSat-2
KOMPSAT-2
KOMPSAT-3
KOMPSAT-3A
OrbView-2
PeruSAT-1
Pleiades
QuickBird
RapidEye
SPOT-6
SPOT-7
SuperView-1
TripleSat
WorldView-2
WorldView-4
ZY-3
ZY3-2

<blue,<green>,<red>,<nir>

Aster
CBERS-4 P10
IRS-1C
IRS-1D
IRS-P6
Resourcesat-2 AWiFS
Resourcesat-2 LISS-3
SAC-C
SPOT-4
SPOT-5

<green>,<red>,<nir>,<swir>

For example, consider a Landsat-8 sensor with the following band designations:

Channel Band
1 NIR
2 Red
3 Blue
4 Green
5 SWIR (1.5 um)
6 SWIR (2.6 um)

In such a case, enter the value as 3,4,2,1,5,6.

If a required band for a sensor is missing, the tasseled-cap transformation cannot be calculated.

If you do not specify a value, the band information is read from the metadata of the input file and based on wavelength.

FILO

The name of the output file to which to write the processed data.

The output file must not exist. The output file will be created based on the type specified for FTYPE and the options specified for FOPTIONS. The file will have the three output channels: brightness, greenness, and wetness. The type of output channel will be that specified for DATATYPE and have the same geocoding information and metadata as the input file.

DATATYPE

The data type of the output channel to create. When the output is written to existing channels, this parameter is ignored.

The following data types are supported:

When the number of output channels is greater than one, the specified data type is used for each output channel.

The default value is 16S.

This parameter is optional.

SCALOFFS

Specifies the scaling offset used for converting the computed values to Digital Numbers (DNs) for storage in the output image.

A separate scaling offset for each output channel may be provided as a comma-separated list. (Brightness, Greenness, Wetness)

The target pixel-value range, after scaling, is as shown in the following table.

Output data type Output range limit
8-bit -0 to 254
16-bit signed -32767 to 32767
16-bit unsigned 0 to 65534
32-bit N/A

This parameter is optional.

If the scaling offset is specified, the scaling factor parameter must be specified as well.

These parameters are used jointly to convert the computed values to DNs as follows:

                            DN = Reflectance * Scaling factor + Scaling offset
               

Note: the radiometric gain and bias values stored in channel metadata are mutually related to the scaling factor and scaling offset values as follows:

                            Gain = Gain = 1 / Scaling factor
                            Bias = -Scaling offset / Scaling factor

                            Scaling factor = 1 / Gain
                            Scaling offset = -Bias / Gain
              

The default scaling offset and factor values for brightness, greenness, and wetness are as shown in the following table.

Data type Tasseled-cap index (channel) Scaling factor Scaling offset
8-bit unsigned Brightness 0.0 84.666667
  Greenness 96.25 317.50
  Wetness 175.625 158.75
16-bit signed Brightness 0.0 10000.0
  Greenness 0.0 10000.0
  Wetness 0.0 10000.0
16-bit unsigned Brightness 0.0 10000.0
  Greenness 3000.0 10000.0
  Wetness 11000.0 10000.0
32-bit real Brightness 0.0 1.0
  Greenness 0.0 1.0
  Wetness 0.0 1.0
If you do not specify a value:
The algorithm to calculate the scaling is as follows:

This parameter is optional.

SCALFACT

Specifies the scaling factor for converting the computed tasseled-cap values to Digital Numbers (DNs) for storage in the output image.

A separate scaling factor for each output channel may be provided as a comma-separated list. (Brightness, Greenness, Wetness).

If the Scaling factor is specified, the Scaling offset must be specified as well.

This parameter is optional.

Please refer to the Scaling offset parameter for more details, and for the list of data type-dependent default values.

FTYPE

The format of the output file.

The format must be one of the following GDB-supported types:

The default value is PIX.

FOPTIONS

The options specific to the format to apply when creating the output file. With each, the default of no options is allowed (empty string).

Typically, the available options for a format include a compression scheme, format subtype, or other information.

For information about the available options for each supported format, see:
Back to top

Details

TASSEL creates a tasseled-cap transformation for various sensors by using a specific coefficient (A1...An). The algorithm calculates a simple, linear transformation, as shown in the following example, based on six-band Landsat-8 data:

To calculate the tasseled-cap transformation, the input file must contain the specific bands necessary. The number of bands in the file must range from three through six (Blue/Green/Red/NIR/SWIR1.6/SWIR2.2). You must also specify the necessary bands (channels) in the correct order.

The output will always be three channels: brightness, greenness, and wetness.

The tasseled-cap transformation for brightness is written to the first output channel, greenness to the second channel, and wetness to the third channel of the output file.

Back to top

Example

In the following example, a tasseled-cap transformation is applied to Landsat-8 data with linear scaling.

from pci.tassel import tassel

fili = 'AtcorCorr_landsat8.pix'
visirchn = []
filo = 'Tassel_landsat8.pix'
ftype = ''
foptions =''
scaloffs = []
scalfact = []
datatype= '16S'

tassel(fili, visirchn, filo, datatype, scaloffs, scalfact, ftype, foptions)

© PCI Geomatics Enterprises, Inc.®, 2026. All rights reserved.