profile
Description
profile is a utility designed to build a depth profile from JCU GLORIA images, specifically focusing on the first returns in the nadir region. It processes the sidescan data, remaps pixel values (optionally), and marks the calculated nadir point on a generated output profile image. This tool can be useful for visualizing the seafloor depth across the swath.
Usage
profile [-pingint <seconds>] [-first <record>] [-last <record>] [-noremap] <inname>
Arguments
| Option | Description | Default |
|---|---|---|
-pingint <seconds> | Specifies the ping interval in seconds. Used in calculating the time per pixel. | 30.0 |
-first <record> | Specifies the first record number to begin processing. | 0 |
-last <record> | Specifies the last record number to end processing. | -1 (end of file) |
-noremap | If specified, pixel values will not be remapped (e.g., values 1-15 to 16). | Remap is true |
<inname> | Required. The input JCU GLORIA merged file. | Â |
How It Works
- Input File Reading: The tool opens the specified input JCU GLORIA file (
inname). - Output File Creation: It creates an output file with a
.proextension (e.g.,input.glo.pro) for the generated profile data. - Colormap (Remapping): An internal
colormaparray is initialized. By default, values 1-15 are remapped to 16. If-noremapis used, this remapping is skipped. - Record Processing Loop: The tool reads each GLORIA record (
glrec) from the input file:- Data Extraction and Remapping: It extracts the port and starboard sidescan data from
glrec.port_dataandglrec.stbd_data. These values are then passed through thecolormap(if remapping is enabled) and stored inoutbuf. - Nadir Point Calculation:
- It retrieves the
depthfromglrec.header.altitude. - It calculates the expected pixel position (
pix) corresponding to this depth based onSOUND_SPEEDandsec_per_pix(seconds per pixel). - This calculated
pixposition on theoutbuf(which represents the across-track profile) is marked with a specific color (5, typically yellow).
- It retrieves the
- Output: The
outbuf(representing the processed profile for the current record) is written to the output file.
- Data Extraction and Remapping: It extracts the port and starboard sidescan data from
- Loop: This process continues until all specified records have been processed.