TAtoXZ
Description
TAtoXZ projects Simrad/Kongsberg Mesotech SM2000 multibeam sonar water-column frames from raw polar Time-Angle coordinates (782 time samples à 120 beams in <prefix>.TA_inten and <prefix>.TA_phase) into Cartesian across-track vs. depth (XZ) fan coordinates (1024 à 512 pixels in <prefix>.XZ_inten and <prefix>.XZ_phase).
CLI Options & Usage
TAtoXZ -in <sm2kprefix>
-in <sm2kprefix>: Input/output prefix. Reads<sm2kprefix>.TA_intenand<sm2kprefix>.TA_phase(782 Ã 1208-bitOMG1files) and writes<sm2kprefix>.XZ_intenand<sm2kprefix>.XZ_phase(1024 Ã 5128-bitOMG1files).
Algorithm
- Reads the
782 Ã 120TA_intenandTA_phasearrays and initializes two1024 Ã 512output arrays (XZ_inten,XZ_phase) filled with255(background). - For each pixel
(i, j)in the1024 Ã 512Cartesian output fan (centered horizontally at column512at the transducer apex):- Computes polar slant range
range = hypot(i - 512, j) * 782.0 / 512.0. - Computes beam angle
angle = atan2(i - 512, j)within the¹60°(120°total) SM2000 sector (angle_index = (angle + 60°) / 120° * 120). - If
range < 782and0 <= angle_index < 120, copiesTA_inten[range, angle_index]andTA_phase[range, angle_index]into theXZfan arrays.
- Computes polar slant range
- Writes
<sm2kprefix>.XZ_intenand<sm2kprefix>.XZ_phasewith updatedOMG1headers (xmax = 1024,ymax = 512).