INSCALDEFO3

Calibrate unwrapped deformation at PSCs


EnvironmentsPYTHON :: EASI
Quick linksDescription :: Parameters :: Parameter descriptions :: Details :: Examples :: Related

Back to top

Description


INSCALDEFO3 uses pre-defined stationary reference points to remove residual errors in surface displacement products. The input displacement file must be in the original slant range geometry.
Back to top

Parameters


inscaldefo3(fili, dbic, filo, dboc, filedem, filref, tfile, option, calwin, adjmethod)

Name Type Caption Length Value range
FILI* str Input displacement file name 1 -   Default: 1
DBIC List[int] Input displacement channel 0 - 1  
FILO* str Output file name 1 -    
DBOC List[int] Output displacement channel 0 - 1  
FILEDEM str File name of DEM 0 -    
FILREF str File containing Delaunay segment 0 -    
TFILE* str Text file containing coordinates of stationary points 1 -    
OPTION str Option to interpolate over NODATA values in calibration window 0 - 10 SKIP|NOSKIP
Default: NOSKIP
CALWIN List[int] Calibration window size (in pixels) 0 - 2 Default: 1,1
ADJMETHOD str Displacement adjustment method 0 - 32 ALL| UNDER #.#| CLAMP #.#| UNDERSIGMA #.#| CLAMPSIGMA #.#| AVERAGEALL| AVERAGEUNDER #.#| AVERAGECLAMP #.#| AVERAGEUNDERSIGMA #.#| AVERAGECLAMPSIGMA #.#
Default: ALL

* Required parameter
Back to top

Parameter descriptions

FILI

The name of the file containing the surface displacement values to be calibrated. The input file is in slant range and contains unwrapped line of sight displacement measurements in meters.

DBIC

The input channel of displacement values to be calibrated. The default value is one.

FILO

The output file which will contain the calibrated displacement values. The name of the output file must be specified. If the output file already exists, the DBOC channel must exist. If the output file does not exist, a single channel file will be written and DBOC must be set to one.

DBOC

The output channel of calibrated displacements. If FILO equals FILI, the displacement values for the DBOC channel are overwritten.

FILEDEM

This parameter specifies the name of the DEM file containing elevation values used to convert geodetic locations identified in TFILE to image co-ordinates. This parameter is ignored if TFILE includes elevation values (in meters).

FILREF

This parameter specifies the name of the input file containing the Delaunay segment used to interpolate displacements for TFILE calibration points when the calibration window only contains NODATA values.

TFILE

The full path name of the text file of the image coordinates (pixel, line) or geodetic coordinates (decimal longitude, decimal latitude) of the stationary calibration points. Each calibration location must be specified as a separate line. Image or geodetic coordinates must be separated by spaces, tabs, or commas. Empty lines and lines that begin with a slash ( / or \ ) are treated as comments and are ignored.

The first line defines the column arrangement and coordinate type. The first line must start with # followed by column designations. Valid column designations are "pixel", "line", "lat", "long" and "elev". The column order is interchangeable with the header defining how the remaining lines will be interpreted. Note: The number of data columns must match the header definition in the order defined by the header. Examples of valid headers are:

Elevation values (WGS-84) may be provided with geodetic locations. If elevation values are supplied, the FILEDEM parameter is not used.

Image co-ordinates in the text file represent pixel and line numbers that are 1-based to match Focus values; that is, the pixel in the upper-left corner of the image has coordinates (1,1) and the pixel in the lower-right corner has coordinates (number-of-pixels, number-of-lines). Fractional values are supported however, they will be truncated to integer values.

Geodetic coordinates in the text file represent latitude and longitude values in decimal format. Northern and Eastern hemispheres are positive values.

OPTION

The available options are as follows:

CALWIN

The size of the image window in pixels and lines, centered on each calibration point. All valid displacements in the calibration window are averaged and used as the correction value for the given calibration point. The default values of 1,1 means that only the value at the exact coordinate is used as the correction at each calibration point.

To define a square window, enter a single value. To define a rectangular window, enter values for the X (column) and Y (row) directions respectively. The specified window size is used for all calibration points. Even values will be increased by one to allow centralized pixel position.

ADJMETHOD

The adjustment algorithm to be used.

The available options are as follows:

You can preface each option with AVERAGE, which raises (or lowers) the entire displacement channel by single value (the average difference). This is an effective alternative to trying to create a varying surface that goes through the points. Prefacing an option with AVERAGE is also useful in removing a systematic error; for example: AVERAGEALL or AVERAGEUNDERSIGMA 2.0.

Back to top

Details

INSCALDEFO3 corrects terrain displacement by calculating the residual errors for the stable locations defined in TFILE. A best fit low order polynomial of residual errors is generated and removed from the entire image area. TFILE contains calibration points stored as either image or geodetic coordinates. If height values (in meters relative to WGS 84 ellipsoid) are given with the geodetic locations, a DEM file is not required. Geodetic coordinates and elevations extracted either from TFILE or the DEM are projected to image co-ordinates.

Each calibration point represents a stationary location. The area used to calculate each residual error is controlled by the CALWIN parameter. For sparse data sets, the FILREF parameter controls whether Delaunay interpolation (created by TRIANGULATE) is used when the calibration window does not contain any valid data. If the calibration window extends beyond the image, it is truncated to be fully within the image. The average displacement within the calibration window is used as an estimate of the residual error.

The average residual within each calibration window is adjusted using the methodology defined by ADJMETHOD. Once the residual errors have been computed, a sparse pyramid interpolation based on the adjusted displacement errors is applied to the entire image to remove the residual errors.

Back to top

Examples

Calibrate a displacement file based on residual estimates derived from 3x3 areas around the user specified geodetic locations given in TFILE and write the output to FILO. Interpolate using Delauney triangles for calibration windows containing no valid data.

from pci.inscaldefo3 import inscaldefo3

fili      =   "C:/Deformation.pix"             # unwrapped deformation file
dbic      =   [1]                              # input is on channel 1
filo      =   "C:/Calibrated_Deformation.pix"  # name of calibrated output file
dboc      =   []                               # write to output file
filedem   =   "C:/DEM.pix"                     # DEM to provide elevation info
filref    =   "C:/PSC_points.pix"              # Delaunay points
tfile     =   "C:/Geodetic_Points.txt"         # geodetic locations as text
option    =   "NOSKIP"                         # 
calwin    =   [3, 3]                           # average over 3x3 window
adjmethod =   "ALL"                            # use all calibration points

inscaldefo3(fili, dbic, filo, dboc, filedem, filref, tfile, option, calwin, adjmethod)
            

Calibrate a displacement file based on residual estimates derived from 5x3 areas around the user specified image locations given in TFILE. Ignore any residuals that are more than 2 standard deviations from the mean error and do not interpolate if the window does not contain valid data.

from pci.inscaldefo3 import inscaldefo3

fili      =   "C:/Deformation.pix"             # unwrapped deformation file
dbic      =   [1]                              # input is on channel 1
filo      =   "C:/Calibrated_Deformation.pix"  # name of calibrated output file
dboc      =   []                               # write to output file
filedem   =   ""                               # DEM is not required
filref    =   ""                               # Delaunay not required
tfile     =   "C:/Image_Points.txt"            # image locations (text)
option    =   "SKIP"                           # 
calwin    =   [5, 3]                           # average over 5x3 window
adjmethod =   "UNDERSIGMA 2.0"                 # use points within 2 sigma of mean

inscaldefo3(fili, dbic, filo, dboc, filedem, filref, tfile, option, calwin, adjmethod)
        

Calibrate a displacement file based on residual estimates derived from 3x3 areas around the user specified geodetic locations with elevation (in meters) given in TFILE. Apply the average of all residuals that are less than 2 standard deviations from the mean error to the whole image and do not interpolate over calibration windows containing only NO DATA values.

from pci.inscaldefo3 import inscaldefo3

fili      =   "C:/Deformation.pix"             # unwrapped deformation file
dbic      =   [1]                              # input is on channel 1
filo      =   "C:/Calibrated_Deformation.pix"  # name of output file
dboc      =   []                               # write to output file
filedem   =   ""                               # DEM is not required
filref    =   ""                               # Delaunay not required
tfile     =   "C:/GeodeticAndElevation.txt"    # geodetic and elevation
optoin    =   "SKIP"                           # 
calwin    =   [3]                              # average over 3x3 window
adjmethod =   "AVERAGEUNDERSIGMA 2.0"          # use avg of residues less than 2SD

inscaldefo3(fili, dbic, filo, dboc, filedem, filref, tfile, option, calwin, adjmethod)
        

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