Sea Truth
Syntax_RegressZZ

to compute the linear regression
ZComputed= A + B * ZRecorded

needs updating

back to Help

 
 
Sea Truth

to compute the linear regression
ZComputed= A + B * ZRecorded
How to Regress ZZ
  • -RegressZZV(v)/FileName_GPS/coefXY_deltaX_deltaY/coefZR_deltaZR/ZM/WZm_WZM/BZm_BZM/ZRm_ZRM/NameLine
  • -RegressZZ/v/P/tmnovXYZ_GPS/0.001_0_-2000/1_0/ZM/2_4/0_100/0_30/ALL
  • -RegressZZ/v/P/tmnovXYZ_GPS/0.001_0_-2000/1_0/ZM/2_4/0_100/0_30/ALL/Plot_1
  • -RegressZZ/v/P/seatruth*depth_points_reproject_pruned/ZM/2_4/0_201/0_30_2.0/ALL
  • -RegressZZ/VWpC/DTM_10f/CXY_1_0_0/CR_1.0_1.0/ZM/WZ_2_3/B_0_201/ZC_0_15_2_1/ALL
  • -RegressZZ/VWpC/seatruth*depths/CXY_1_0_0/CR_1.0_1.0/ZM/WZ_2_3/B_0_201/ZC_0_15_2_1/ALL
 
V(v).........verbose.......(silent)
W(w)........WayPoints
P(p)..........profile........(no profile)
C(c)..........colourflag
DTM or NameTextFile
if DTM in channel U8+S16+1
  • stepDTM.............
  • FullDTM.............


if NOT DTM  text file seatruth/text_file.txt 
  • Textfile FileName.txt contain up to 50 LineName, each with up to 1000 records
    • Format for LineName: > LineName -
    • Format for depth point: XUTM YUTM ZED WZ
    • #Disable any line with a "#" character
  • GPS or DGPS: just to make a note of positioning details of sea truth data
coefXY_deltaX_deltaY/coefZR_deltaZR
Optional
  • This is optional and useless: better use a spreadsheet to prepare the textfile
  • coefXY_deltaX_deltaY/coefZR_deltaZR
    • sea truth data require to be offset and scaled
  • these parameters provide offset and scaling factor as required
    • X and Y are to be converted to UTM coordinates in kilometers and offsets are applie
    • ZR are to be converted to meters and tide-corrected as required
    • X =deltaX + X * coefXY
    • Y =deltaY + Y * coefXY
    • ZR =deltaZR +ZR *coefZR
ZM, ZR or ZT
  • Textfile format: data for regression
    • ZM: text file format is X Y ZR
      • Read ZR from textfile
      • Model ZC from scratch at each depth point (recommended)
    • ZR: text file format is X Y ZR ==> Read ZR from textfile and Read ZC from image
    • ZT: text file format is X Y ZR ZC ==> Read both ZR and ZC from textfile
OPTIONS FOR PLOTTING
.../WZmin_WZmax/BZmin_BZmax/ZRmin_ZRmax/...
  • Limited range for regression
  • WZm_WZM............regression only for sea truth pixels with WZmin<=WZ<=WZmax
  • BZm, BZM..............regression only for sea truth pixels with BZmin<=B <=BZmax
  • ZRm_ZRM..............regression only for sea truth pixels with ZRmin<=ZR<=ZRmax
NameLine
  • Groups: Sea Truth Text File may describe up to 40 groups of depth points, like one/several group(s) of scattered depth points, or a series of depth sounding lines
    • Each group may contain up to 1000 depth points
  • Group name: In the text file, each group is introduced by a header
    • > LineName1 -
    • > LineName2 -
    • > LineName3 -
    • ...
  • Records: followed by up to 1000 records with format XUTM YUTM ZR (or XUTM YUTM ZR ZC
  • NameLine parameter may be specified as LineName (a line name or a line number)
    • ALL: if NameLine is specified by "ALL" in the -RegressZZ... argument, then all depth points from whatever LineName(s) shall be used for computing the regression
    • *: if NameLine is specified by "*", then all depth points from whatever LineName(s) shall be used for computing the regression
    • LineName: else, only depth points that belong to specified LineName shall be used for computing the regression
 

optional
 

  • Plot_16 append Plot_N to burn the seatruth pixels in Channel-Seatruth
APPROACH
  • First offset and scale the recorded data (use a spreadsheet)
  • Assign each recorded point to relevant pixel through georeferencing information provided
  • Then
    • ZR: either read ZC values from 16S channel imageZG of image.pix file
    • ZM: or preferably model each relevant pixel in actual and updated conditions
  • Then compute the linear regression of ZC=A + B * ZR
  • Text file output: then write a database_regressZZ.txt text file
  • PostScript output: then format and execute a GMT script database_regressZZ.sh to display the data and the regression in a database_regressZZ.eps PostScript file
OUTPUT
is textfile database_regressZZ.txt
 
LINEAR REGRESSION ALGORITHM
  • compute
    • average xm of X values (ZRecorded)
    • average ym of Y values (ZComputed)
    • A=Sum[(x-xm)*(y-ym)]
    • B=Sum[(x-xm)*(x-xm)]
    • C=Sum[(y-ym)*(y-ym)]
    • a =A/B
    • a'=A/C
  • regression line y=a * x + b
    • regression slope a
    • regression bias b=ym - a * xm
  • determination coefficient R2=a * a'
    • R2=0.059 means very poor correlation
    • 0<=R2<=1 ==> -1<R<+1
    • The sign for R must be chosen manually
  • correlation coefficient r=sqrt(R2)
RMS ERROR 
quoted from IDRISI glossary




 
  • The root-mean-square error is a measure of the variability of measurements about their true values.
  • The rms error is estimated by taking a sample of measurements, and comparing them to their true values.
  • These differences are then squared and summed.
  • The sum is then divided by the number of measurements to achieve a mean square deviation.
  • The square root of the mean square deviation is then taken to produce a characteristic error measure in the same units as the original measurements.
  • The rms error is directly comparable to the concept of a standard deviation.


 

 

 
 
 
 

How to Regress_ZZ
HowDeep?

 

Georeferencing information must be available


in -DB... and -Mis... arguments

Georeferencing datum provided for spectral image must apply for sea truth dataset 
Sea truth data 
  • Input
    • in ASCII text file
      • line header : > Line# -
      • sea truth data : XUTM YUTM ZRecorded
    • or preferably in ESRI shapefile to be read by shp2text
  • Preparation in 4SM: sea truth data in the form of X Y Zrecorded are
    • first offset and scaled as required
    • then converted into image pixel coordinates: Row Line Zrecorded
  • Computed Depth is either
    • ZM option: modeled for each pixel that matches a sea truth location
      • their image radiances are read from the raw image,
      • and then modeled as explained above in How to Model
    • ZC option: read from sea truth textfile X,Y,Zrecorded, Zcomputed
    • ZR option: read from the S16 channel of image file database.pix
  • Then a regression is computed: ZC = bias + slope * ZR
  • Text output : an ASCII text file with some additional columns: tmnov_regressZZ.txt
  • Graphic output: see below
Graphic Output 
  • A graphic display of the regression is formated in PostScript format: tmnov_seatruth
  • Graphic Options for the -RegressZZ... argument
    • Scaling and offseting of sea truth data: a few scaling/biasing arguments must be provided
      • -RegressZZv/tmnovXYZ_GPS/0.001_0_-2000/1_0/ZM/2_4/0_100/0_30/ALL
        • XUTM=0+XUTM*0.001
        • YUTM=0+YUTM*0.001
      • -RegressZZv/tmnovXYZ_GPS/0.001_0_-2000/1_0/ZM/2_4/0_100/0_30/ALL
        • ZR=0+1*ZR
    • Range selection : .../2_4/0_100/0_30/... Regression may be restricted through range selection criteria:
      • wZ range : wZmin_wZmax: bottom detection based on band_min up to band_max
        • -RegressZZv/tmnovXYZ_GPS/0.001_0_-2000/1_0/ZM/2_4/0_201/0_30/ALL
        • this regression is limited to depths computed using wZ=2 only: wZ=3 and wZ=4 are excluded
      • reflectance range : BZmin<=average_computed_bottom_reflectance<=BZmax
        • -RegressZZv/tmnovXYZ_GPS/0.001_0_-2000/1_0/ZM/2_4/0_100/0_30/ALL
        • this regression is limited to 0<=BZ<=100
        • seatruth pixels with average computed bottom reflectance in excess of 100 are excluded
      • depth range : ZRmin_ZRmax: recorded depths >=ZRmin and <=ZRmax
        • -RegressZZv/tmnovXYZ_GPS/0.001_0_-2000/1_0/ZM/2_4/0_100/0_30/ALL
        • this regression is limited to sea truth depths from 0 to 12 meters
        • pixels with a sea truth depths in excess of 12 meters are excluded



Créer un site
Créer un site