| Environments | PYTHON :: EASI :: MODELER |
| Quick links | Description :: Parameters :: Parameter descriptions :: Details :: Example :: Related |
| Back to top |
| Back to top |
autoshift(fili, filref, dbic, filo, searchr, numtiles)
| Name | Type | Caption | Length | Value range |
|---|---|---|---|---|
| FILI * | str | Input complex SAR image | 1 - | |
| FILREF * | str | Reference complex SAR image | 1 - | |
| DBIC | List[int] | Input SAR image channels | 0 - | |
| FILO * | str | Output shifted SAR image | 1 - | |
| SEARCHR | List[int] | Search radius (pixels) | 0 - 1 | Default: 16 |
| NUMTILES | List[int] | Number of tiles (x-dimension, y-dimension) | 0 - 2 | Default: 4 |
| Back to top |
FILI
Specifies the name of the input image file to be shifted. The specified image must have the same georeferencing and pixel size, and at least some overlap with the reference image file.
The input image must be a data set that has already been imported into the PCIDSK (.pix) format by SARINGEST, or it may be the key file name of any GDB-supported POLSAR data set in its distribution format. The specified image must have the same georeferencing and pixel size, and at least some overlap with the reference image file.
FILREF
Specifies the name of the file that contains the reference image data. This reference image must have the same geocoding and pixel size as the input test image file.
DBIC
Specifies the list of input channels to be processed. The specified channels must exist for the test and reference images, and must be comparable; that is, they must have the same data type and polarization. By default, all channels from the input test image (FILI) are used to compute the correlation, and output to the defined output file (FILO).
FILO
Specifies the name of the output file that is created. This file will contain the same number of channels as the specified input channels.
The specified file must not already exist.
SEARCHR
Specifies the distance, in pixels, in the X- and Y-directions over which the search for the best match between the reference and test image will be conducted. The value must be equal to or greater than the maximum offset between the images, in pixel units.
NUMTILES
Specifies the number of tiles into which the overlap area will be divided, in the X- and Y-directions; for example, "4,4" specifies four tiles across and four tiles down. The tiles should all contain valid image data values (non-background pixels).
| Back to top |
AUTOSHIFT shifts a test image by modifying its geocoding extents to guarantee pixel alignment with the reference image. To preserve the original data, no resampling is applied to the test image file. The offset is computed based on the highest correlation of complex and/or intensity values of all pixels in the search window. This function supports any polarimetric (single, dual, full polarimetric) data set from all acquisition modes. The function is NoData-aware; which means any pixel values defined as 'NoData' in the metadata will be ignored. The output image file retains all the metadata from the input test image file.
| Back to top |
This example changes the geocoding coordinates of the most recent image based on a reference image. The input image background value (NODATAVAL) is 0 and has been defined in the metadata of the input file.
from pci.autoshift import autoshift fili = "rsat2_FQ15_sep19.pix" # Input image to be shifted filref = "rsat2_FQ15_sep25.pix" # Reference image filename dbic = [] # Uses all input image channels to compute the correlation filo = "rsat2_FQ15_sep19_shifted" # Output file name searchr = [] numtiles= [4,4] #Use 4 tiles in the X- and Y-directions autoshift(fili, filref, dbic, filo, searchr, numtiles)
© PCI Geomatics Enterprises, Inc.®, 2026. All rights reserved.