synthetic
Description
synthetic is a utility designed to generate synthetic sidescan images. It creates these images based on an input grazing angle mosaic and a user-specified backscatter model, which can be either Lambertian or linear. Additionally, it has the capability to apply a βrealβ angular response function (derived empirically) to a grazing angle image to produce a synthetic backscatter image that mimics observed data. This tool is a key component in sidescan modeling and analysis pipelines.
Usage
synthetic [-strip] [-real <response_file>] [-lamb <nadir_intercept>] [-linear <nadir_intercept> <slope>] -infile <grazing_mosaic> -outfile <synthetic_mosaic>
Arguments
| Option | Description |
|---|---|
-strip | If specified, the tool will apply a real angular response function (from -real) to the input grazing mosaic. |
-real <response_file> | When used with -strip, specifies an ASCII file containing a βrealβ angular response function (e.g., from build_backβs .resp output). This function is used to convert grazing angles to synthetic backscatter. |
-lamb <nadir_intercept> | Activates the Lambertian backscatter model. Specifies the nadir intercept (in dB) of the Lambertian curve. |
-linear <nadir_intercept> <slope> | Activates the linear backscatter model. Specifies the nadir intercept (in dB) and the slope (dB/degree) of the linear relationship. |
-infile <grazing_mosaic> | Required. The input grazing angle mosaic file (JHC image format or GLORIA format). |
-outfile <synthetic_mosaic> | Required. The output synthetic backscatter mosaic file. |
How It Works
The tool operates in two main modes: applying a real angular response (-strip with -real) or generating synthetic data based on a theoretical model (-lamb or -linear).
Mode 1: Applying a Real Angular Response (-strip and -real)
- Load Real Response: The tool reads an ASCII file (
<response_file>) containing a βrealβ angular response function into therealresponsearray. This array likely maps grazing angle digital numbers to corresponding backscatter digital numbers. - Process GLORIA File: It reads the input GLORIA file (
grazfile) record by record. - Apply Response: For each pixel in the port and starboard data that is valid (not 15 or 255):
- It uses the grazing angle value (
graz_Rec.stbd_data[i]) as an index into therealresponsearray to get the synthetic backscatter value. - The
graz_Rec.stbd_data[i] - 15is used to adjust the index to the 0-239 range. - The resulting synthetic backscatter value is written back into the
graz_Rec.stbd_data[i](andport_data).
- It uses the grazing angle value (
- Write Output: The modified
graz_Recis written to the output file (synfile).
Mode 2: Generating from Theoretical Models (-lamb or -linear)
- Input Grazing Mosaic: The tool reads the input grazing angle mosaic (
grazfile). This file is expected to be a JHC image format with aJHC_header. - Backscatter Model Selection:
- Lambertian (
-lamb): The backscatter strengthS_b(in dB) is calculated using the formula:S_b = lamb_intercept + 10 * log10(pow(sin(graz_ang), 2.0)), wheregraz_angis the grazing angle in radians. - Linear (
-linear): The backscatter strengthS_b(in dB) is calculated using the formula:S_b = linear_intercept + linear_slope * theta, wherethetais the grazing angle in degrees (scaled from DN).
- Lambertian (
- Pixel-by-Pixel Generation: For each pixel in the input grazing angle mosaic:
- It converts the 8-bit grazing angle value (
graz_rec[i]) to a grazing angle in degrees (theta) and then radians (graz_ang). - It applies the chosen backscatter model (
-lambor-linear) to calculateS_b. S_bis then scaled and converted to an 8-bit digital number (DN_value) based on themin_dBandmax_dBrange.- The resulting
DN_valueis written to thesyn_recarray.
- It converts the 8-bit grazing angle value (
- Write Output: The
syn_rec(synthetic backscatter image data) is written to the output file (synfile), preceded by theJHC_header.