📄 snaphu.1
字号:
.B \-\-mstUse a minimum spanning tree (MST) algorithm for the initialization.This is the default..TP.B \-\-mcfUse a minimum cost flow (MCF) algorithm for the initialization. Thecs2 solver by Goldberg and Cherkassky is used. The modifiednetwork-simplex solver in L1 mode may give different results than thecs2 solver, though in principle both should be L1 optimal..TP.B \-\-nproc \fIn\fPUse \fIn\fP parallel processes when in tile mode. The program forks anew process for each tile so that tiles can be unwrapped in parallel;at most \fIn\fP processes will run concurrently. Forking is donebefore data is read. The standard output streams of child processesare directed to log files in the temporary tile directory..TP.B \-\-piece \fIfirstrow firstcol nrow ncol\fPRead and unwrap only a subset or part of the input interferogram. Theread piece is the \fInrow\fP by \fIncol\fP rectangle whose upper leftcorner is the pixel at row \fIfirstrow\fP and column \fIfirstcol\fP(indexed from 1). All input files (such as amplitude, coherence,etc.) are assumed to be the same size as the input phase file. Alloutput files are \fInrow\fP by \fIncol\fP..TP.B \-\-tile \fIntilerow ntilecol rowovrlp colovrlp\fPUnwrap the interferogram in tile mode. The interferogram ispartitioned into \fIntilerow\fP by \fIntilecol\fP tiles, each of whichis unwrapped independently. Tiles overlap by \fIrowovrlp\fP and\fIcolovrlp\fP pixels in the row and column directions. The tiles arethen segmented into reliable regions based on the cost functions, andthe regions are reassembled. The program creates a subdirectory fortemporary files in the directory of the eventual output file. Thisoption is currently enabled only for statistical cost functions..SH FILE FORMATSThe formats of input files may be specified in a configuration file.All of these formats are composed of raster, single-precision (float,real*4, or complex*8) floating-point data types in the platform'snative byte order. Data are read line by line (across then down).Regardless of the file format, all input data arrays should have thesame number of samples in width and depth and should be coregisteredto one another. Note that weight files and cost files have their ownformats. The allowable formats for other data files are describedbelow..TPCOMPLEX_DATAAlternating floats correspond to the real (in-phase) and imaginary(quadrature) components of complex data samples. The specified linelength should be the number of complex samples (pairs of real andimaginary samples) per line..TPALT_LINE_DATAAlternating lines (rows) of data correspond to lines of purely realdata from two separate arrays. The first array is often the magnitudeof the interferogram, and the second may be unwrapped phase,coherence, etc. This is also sometimes called \fBhgt\fP orline-interleaved format..TPALT_SAMPLE_DATAAlternating samples correspond to purely real samples from twoseparate arrays. This format is sometimes used for the amplitudes ofthe two SAR images..TPFLOAT_DATAThe file contains data for only one channel or array, and the data arepurely real..SH EXAMPLESUnwrap a wrapped topographic interferogram called ``wrappedfile''whose line length is 1024 complex samples (output will be written to afile whose name is compiled into the program):.nf snaphu wrappedfile 1024.fiUnwrap the same file as above, but use brightness information from thefile ``ampfile,'' set the perpendicular baseline to -165 m atmidswath, and place the output in a file called ``unwrappedfile''(coherence data are generated automatically if ``wrappedfile''contains complex data and ``ampfile'' contains amplitude data fromboth SAR images):.nf snaphu wrappedfile 1024 -a ampfile \\\ -b -165 -o unwrappedfile.fiUnwrap the interferogram as above, but read correlationinformation from the file ``corrfile'' instead of generating it fromthe interferogram and amplitude data:.nf snaphu wrappedfile 1024 -a ampfile -c corrfile \\\ -b -165 -o unwrappedfile.fiThe following is equivalent to the previous example, but inputparameters are read from a configuration file, and verbose output isdisplayed:.nf cat > configfile # This is a comment line which will be ignored AMPFILE ampfile CORRFILE corrfile BPERP -165 OUTFILE unwrappedfile <Ctrl-D> snaphu -v -f configfile wrappedfile 1024.fiUnwrap the same interferogram, but use only the MST initialization(with scalar statistical weights) and write the output to ``mstfile'':.nf snaphu -f configfile -i wrappedfile 1024 -o mstfile.fiRead the unwrapped data in ``mstfile'' and use that as theinitialization to the modified network-simplex solver:.nf snaphu -f configfile -u mstfile 1024 -o unwrappedfile.fiNote that in the previous two examples, the output file name in theconfiguration file is overrided by the one given on the command line.The previous two commands together are in principle equivalent to thepreceding one, although round-off errors in flow-to-phase conversionsmay cause minor differencesUnwrap the interferogram as above, but use the MCF algorithm forinitialization:.nf snaphu -f configfile wrappedfile 1024 --mcf.fiUnwrap the interferogram once again, but first flatten it with theunwrapped data in ``estfile,'' then reinsert the subtracted phaseafter unwrapping:.nf snaphu -f configfile wrappedfile 1024 -e estfile.fiThe following assumes that the wrapped input interferogram measuresdeformation, not topography. Unwrap the interferogram with the givencorrelation data:.nf snaphu -d wrappedfile 1024 -c corrfile .fiUnwrap the input interferogram by minimizing the unweighted congruentL2 norm:.nf snaphu -p 2 -n wrappedfile 1024.fiUnwrap the interferogram as a three-by-four set of tiles that overlapby 30 pixels, with the specified configuration file, using twoprocessors:.nf snaphu wrappedfile 1024 -f configfile \\\ --tile 3 4 30 30 --nproc 2.fi.SH "HINTS AND TIPS"The program may print a warning message about costs being clipped toavoid overflow. If too many costs are clipped, the value of COSTSCALEmay need to be decreased in a configuration file (via the \fB\-f\fRoption). If the program prints a warning message about an unexpectedincrease in the total solution cost, this is an indication that toomany costs are clipped. It is usually okay if just a few costs areclipped. In topography mode, if the unwrapped result contains too manydiscontinuities, try increasing the value of LAYMINEI or decreasingthe value of LAYCONST. The former determines the normalized intensitythreshold for layover, and the latter is the relative layoverprobability. If there are too many discontinuities running inazimuth, try decreasing the value of AZDZFACTOR, which affects theratio of azimuth to range costs. If the baseline is not known, take aguess at it and be sure its sign is correct. Specify the SAR imaginggeometry parameters as well as possible. The defaults assume ERS datawith five looks taken in azimuth.In deformation mode, if the unwrapped result contains too manydiscontinuities, try increasing the value of DEFOTHRESHFACTOR ordecreasing the value of DEFOCONST. If the surface displacement variesslowly and true discontinuities are not expected at all, DEFOMAX_CYCLEcan be set to zero. This behavior is also invoked with the \fB\-s\fRoption. The resulting cost functions will be similar tocorrelation-weighted L2 cost functions, though the former are notnecessarily centered on the wrapped gradients. Congruence is stillenforced during rather than after optimization.The program can be run in initialize-only (\fB\-i\fR) mode for quickdown-and-dirty MST or MCF solutions..SH SIGNALSOnce the iterative solver has started, \fBsnaphu\fR traps theinterrupt (INT) and hangup (HUP) signals. Upon receiving aninterrupt, for example if the user types Ctrl-C, the program finishesa minor iteration, dumps its current solution to the output, andexits. If a second interrupt is given after the first (caught)interrupt, the program exits immediately. If a hangup signal isreceived, the program dumps its current solution then continues toexecute normally..SH "EXIT STATUS"Upon successful termination, the program exits with code 0. Errorsresult in exit code 1..SH FILESThe following files may be useful for reference, but are not required.They are included in the program source distribution and may be installedsomewhere on the system..TP\fIsnaphu.conf.full\fPTemplate configuration file setting all valid input parameters (thoughsome may be commented out)..TP\fIsnaphu.conf.brief\fPGeneral-purpose template configuration file setting the mostimportant or commonly modified input parameters..PPIn addition to parameters read from configuration files specified onthe command line, default parameters may be read from a system-wideconfiguration file if such a file is named when the program iscompiled..SH BUGSThe \fB\-w\fR option has not been tested exhaustively.Extreme shadow discontinuities (i.e., abrupt elevation drops inincreasing range due to cliffs facing away from the radar) are notmodeled that well in the cost functions for topography mode.Abrupt changes in surface reflectivity, such as those of coastlinesbetween bright land and dark water, might be misinterpreted as layoverand assigned inappropriate costs.The algorithm's behavior may be unpredictable if the costs are badlyscaled and excessively clipped to fit into their short-integer datatypes.There is no error checking that ensures that the network nodepotentials (incost and outcost) do not overflow their long-integerdata types.Automatic flow clipping is built into the MST initialization, but itcan give erratic results and may loop infinitely for certain inputdata sets. It is consequently turned off by default.Dedicated programs for specific Lp objective functions may work betterthan \fBsnaphu\fR in Lp mode. Note that snaphu enforces congruence aspart of the problem formulation, however, not as a post-optimizationprocessing step. .SH REFERENCESC. W. Chen and H. A. Zebker, ``Two-dimensional phase unwrapping withuse of statistical models for cost functions in nonlinearoptimization,'' \fIJournal of the Optical Society of America A\fP,\fB18\fP, 338-351 (2001).C. W. Chen and H. A. Zebker, ``Network approaches to two-dimensionalphase unwrapping: intractability and two new algorithms,'' \fIJournalof the Optical Society of America A\fP, \fB17\fP, 401-414 (2000).C. W. Chen and H. A. Zebker, ``Phase unwrapping for large SARinterferograms: Statistical segmentation and generalized networkmodels,'' \fIIEEE Transactions on Geoscience and Remote Sensing\fP,\fB40\fP, 1709-1719 (2002).
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -