PSIQINTERP

Convert complex data to other interpretations


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

Back to top

Description


PSIQINTERP converts back and forth between complex-valued layers and real-valued interpretations. For example, you can use the algorithm to do the following:
Back to top

Parameters


psiqinterp(fili, dbic, cinterp, dboc, filo, ftype, foptions)

Name Type Caption Length Value range
FILI * str Input-file name 1 -    
DBIC List[int] Database input-channel list 0 -    
CINTERP * str Complex SAR interpretation 1 -   Intensity|Amplitude|Phase R|Phase D|Decibel|Real|Imaginary|RI|IQ|Complex|Polar
DBOC List[int] Database output-channel list 0 -    
FILO * str Database output-file name 1 -    
FTYPE str Output-file type 0 -   Default: PIX
FOPTIONS str Output-file options 0 -    

* Required parameter
Back to top

Parameter descriptions

FILI

The name of the input file that contains the complex or real-valued channel or channels to modify or interpret.

DBIC

The list of input image channels to convert.

To convert to intensity, amplitude, phase in radians, phase in degrees, decibels, real or imaginary part, or to convert between complex representations, the input layer must be of type [C16S] or [C32R].

To create complex-valued or polar-valued layers, the input must be real values [32R] or signed integer [16S] layers.

CINTERP

The interpretation type. You can enter either the short or long form of the following values:

DBOC

If the output file (FILO) corresponds to a new file, do not specify a value for DBOC. If the output file exists already, the number of channels must equal that specified for the combined value of DBIC and CINTERP.

Note: If the value of CINTERP is IQ or RI, the number of channels must be twice that specified for DBIC.

If CINTERP is Complex or Polar, the number of real-valued input channels must be twice the number specified for DBIC. If the input and output are complex valued, the number of channels for DBIC and DBOC must be identical.

If the output file exists already, the channels specified for DBOC must be in either 32-bit real format [32R] for real-valued output or one of [C16R] (for signed complex integer) or [C32R] for (floating-point complex) valued output. If the file does not exist already, the default will be [32R] for real-valued output and [C32R] for complex-valued output.

FILO

The name of the output file to create.

The name can be that of either a new or an existing file, but must differ from that of the input file. If the file exists already, the size—that is, the number of image rows and columns—of the output file must match the size of the input file.

FTYPE

The format of the output file.

The format must be a GDB-recognized type.

The following formats are supported:

The default value is PIX.

For a complete list of GDB-recognized file types, see GDB-supported file formats.

FOPTIONS

The options to apply when creating the output file specific to the file format, such as compression schemes, file-format subtypes, and so forth.

Typically, the available options for a format include a compression scheme, format subtype, or other information. In most applications, the default (no options) is suitable for most applications.

For a complete list of GDB-recognized file types and their available options, see GDB-supported file formats.

Back to top

Details

Many SAR images are delivered in single-look (SLC) or multilook (MLC) complex format. PSIQINTERP provides the ability to manipulate complex-valued layers.

The algorithm can do the following:

When converting from a complex-valued layer written in Cartesian format (a + bi) to real-valued layers, where a corresponds to the real part (I) and b to the imaginary part (Q), CINTERP supports the following transformations:

With the Cartesian complex number, (a + bi) = 0.206871 − 0.0338254i, CINTERP supports the following transformations:

When converting from a complex-valued layer in polar format (rho, theta) to real-valued layers, where r corresponds to the magnitude and theta to the (unwrapped) phase, in degrees, CINTERP supports the following transformations:

With the polar-complex number (rho, theta) = (5.71684, 47.98211), CINTERP supports the following transformations:

To convert from real values to complex layers, the input layers specified in the input-channel list must be real valued with two channels of input required for each complex-valued output channel. The real-valued input can be converted to complex layers in either Cartesian or polar format. The two real values a and b are interpreted as (a + bi) when CINTERP is Complex, and as rho, theta when CINTERP is Polar.

For example, if the input data specified in the input-channel list contains the value 2.4 in the first channel and -1.9 in the second, with CINTERP as Complex, the Cartesian pair is written as (2.4 -1.9i). The intensity is (2.4)2 + (-1.9)2 = 9.37 and phase of arctan (-1.9/2.4) = -38.367 degrees. If CINTERP is Polar, the intensity is (2.4)2 = 5.76, and the phase is interpreted as -1.9 degrees.

The exception to this rule is when the real valued input layer has the Scale or SARPixelContent metadata tag. These metadata tags indicate the values are to be always interpreted as intensity, amplitude or decibel. If these metadata tags are present, the input is converted prior to being written as a complex pair.

For example, if the first layer of input data contains the Scale = decibel metadata tag with a value of 2.4, and the second channel has a value of -1.9, with CINTERP as Complex, the first channel is converted from 2.4 dB = 100.24 = 1.7378 prior to writing the output as the complex number (1.7378, -1.9).

PSIQINTERP accepts calibrated or noncalibrated 16-bit signed channels [C16S] in raw vendor format as input. With SAR data sets distributed in multiple files, use the key-file name. For more information, see GDB-supported file formats.

Back to top

Example

In the following example, the four channels of a SLC RADARSAT-2 Fine QuadPol image are ingested with the sigma nought calibration applied. The four resulting complex channels [C32R] are then converted to intensities using PSIQINTERP. The resulting file will have four channels [32R].

from pci.saringest import saringest
from pci.psiqinterp import psiqinterp

fili = "product.xml"
filo = "RS2_FQ17_slc.pix"
dbiw = []
poption = "NEAR"
dblayout = "BAND"
calibtyp = "SIGMA"

saringest(fili, filo, dbiw, poption, dblayout, calibtyp)

fili = "RS2_FQ17_slc.pix" 
dbic = [1,2,3,4] 
cinterp = "Int" 
dboc = []
filo = "RS2_FQ17_int.pix" 
ftype = "PIX" 
foptions = "" 

psiqinterp(fili, dbic, cinterp, dboc, filo, ftype, foptions)
	

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