ComputeModulusAndPhase

This application computes the modulus and the phase of a complex SAR image or an image with 2 components (real and imaginary parts).

Description

This application computes the modulus and the phase of a complex SAR image. The input should be a single band image with complex pixels or a 2 bands image (real and imaginary components in separate bands).

This application has several output images and supports “multi-writing”. Instead of computing and writing each image independently, the streamed image blocks are written in a synchronous way for each output. The output images will be computed strip by strip, using the available RAM to compute the strip size, and a user defined streaming mode can be specified using the streaming extended filenames (type, mode and value). Note that multi-writing can be disabled using the multi-write extended filename option: &multiwrite=false, in this case the output images will be written one by one. Note that multi-writing is not supported for MPI writers.

Parameters

Input Image -in image Mandatory
Input image (complex single band or 2 bands (real/imaginary parts))

Modulus -modulus image [dtype] Mandatory
Modulus of the input image computes with the following formula: \sqrt{real*real + imag*imag} where real and imag are respectively the real and the imaginary part of the input complex image.

Phase -phase image [dtype] Mandatory
Phase of the input image computes with the following formula: \tan^{-1}(\frac{imag}{real}) where real and imag are respectively the real and the imaginary part of the input complex image.

Available RAM (MB) -ram int Default value: 256
Available memory for processing (in MB).

Examples

From the command-line:

otbcli_ComputeModulusAndPhase -in monobandComplexFloat.tif -modulus modulus.tif -phase phase.tif

From Python:

import otbApplication

app = otbApplication.Registry.CreateApplication("ComputeModulusAndPhase")

app.SetParameterString("in", "monobandComplexFloat.tif")
app.SetParameterString("modulus", "modulus.tif")
app.SetParameterString("phase", "phase.tif")

app.ExecuteAndWriteOutput()

Limitations

The application takes as input single band image with complex pixels or a 2 bands image (real and imaginary part in separate bands).