====== Troubleshooting: "Too few points left after culling" ====== This error occurs when the scripts cannot determine the offsets between two files. Offsets are found by preforming a cross correlation of common data windows within the two images. Failure can occur if the images do not match up very easily (such as is the offsets are large), if the SAR images are not properly focused, or if there are too few discernable features (such as if the scene is dominated by water). For most instances (but not all), this problem can be fixed by manually finding the offsets. Offsets are determined at two points in process_2pass.pl; first when matching up the master and slave slc's, and second when matching the interferogram to the DEM. If the last files created in the directory have "ampcor" in the filenames, then the failure ocurred while determining the offsets between the slc's. Otherwise, if "ampmag" is in the filenames, the the problem is with matching up the DEM. The procedure to fix the problem is identical for both cases, but the syntax is slightly different. In both situations, you should first display both of the images side-by-side and manually determine the range/azimuth (i.e. x/y) offsets by visually matching common features. To get the sign correct, determine the offsets as follows: (pixel position of slave scene)-(pixel position of master scene). Follow the directions below depending on your situation. ===== Offsets between the slc's ==== You want to manually reproduce the work of the script //make_offsets.pl//. You can check the log file to see the correct arguments that are passed to the command. FIXME Instructions to be posted. ===== Offsets between the interferogram and DEM ===== Before progressing further, make sure that (1) the full path to the DEM file was correctly given in the process_2pass parameter file, (2) the binary DEM file was formatted correctly to be read by ROI_PAC, (3) the coordinate and pixel size are correct in the *dem.rsc file, and (4) that SIM/SIM_*.hgt (which is your cropped DEM) is the same general geographical region as your SAR scene. If one of these is wrong, fix the problem and restart process_2pass. If SIM_*.hgt looks correct, then you want to manually reproduce the work of the script //synth_offset.pl//. You can check the log file to see the correct arguments that are passed to the command. <code> offset.pl YYYYMMDD-YYYYMMDD_4rlks.cor SIM_4rlks.hgt ampmag_gross 2 rmg 0 0 1. 1. 20 20 64 300 no 1 no </code> The arguments "0 0" in the command above gives the initial guess at the offsets. You can replace these values with your best guess from visual inspection of the *.hgt and *.cor files. The scripts should be able to determine the offsets within 300 pixels. The arguments "20 20" in the command above determine the number of window samples analyzed in the X and Y directions, respectively. Increasing the number of samples increases the odds of determining the correct offsets. Try doubling the number of samples to 40 (or higher) and run the offset.pl script on the command line in the INT directory. You will first need to delete all files that begin with ampmag*. Note that the file names may also be different than what is shown above. Next, use the program fitoff to statistically analyze the offsets from your samples. <code> fitoff ampmag_gross.off ampmag_gross_cull.off 1.5 0.5 10 > fitoff_gross.out </code> The numbers passed to the command define how tight the statistics must be. If fewer than 10 points meet the statistical requirements, then the program fails and you get the familiar error "To few points after culling". However, if successful, the results are printed to the text file //fitoff_gross.out//. Ideally, the number of points remaining should be greater than 100 and the rms should be less than 0.1. If not, you may want to redo //offset.pl// with more samples. The important results are the x and y offsets printed under "Translation Vector". Now you need to run //offset.pl// and //fitoff// once again to refine the offset estimate. This time, use your new x-y offset estimate, and use 50 or more samples. You can also remove "_gross" from all of your file names. For //fitoff//, replace the 10 with 50, and output the result to the file //cull.out//, which is the file roi_pac needs to continue past this step. <code> offset.pl YYYYMMDD-YYYYMMDD_4rlks.cor SIM_4rlks.hgt ampmag 2 rmg 0 0 1. 1. 50 50 64 64 no 1 no fitoff ampmag.off ampmag_cull.off 1.5 0.5 50 > cull.out </code> The procedure is successful if cull.out was generated, and the rms is low (<0.1). You can restart //process_2pass.pl// at //done_sim_off// to continue the processing.

faa.txt · Last modified: 2010/03/04 23:51 by das