utils

module of dascore.io.sr4731 source

Utilities for reading SR-4731 OTDR SOR files.

SR-4731 is the Telcordia OTDR Data Format. This implementation currently supports the OFL100/FIBERCLOUD subset seen in DASCore’s ofl100_*.sor test files and makes these specific assumptions:

  • The file starts with a Map block and contains GenParams, SupParams, FxdParams, DataPts, and Cksum blocks.
  • The map block version is 200.
  • SupParams stores manufacturer, model, and serial number in the first three null-separated fields.
  • FxdParams exposes the timestamp, distance unit, wavelength, sample spacing, index of refraction, and display range fields documented in _parse_fixed_params.
  • DataPts is a single unsegmented trace with unsigned little-endian 16-bit samples and the display scale documented in _parse_data_points.
  • Trace samples follow pyotdr’s SR-4731 display convention: (max_raw - raw) * scale / 1_000_000.
  • Distance spacing is derived from sample spacing and index of refraction.
  • Key events, proprietary blocks, and checksums are not parsed or validated.

Classes

Name Description
Block A SOR block map entry.
SR4731PatchAttrs Patch attributes for supported SR-4731 SOR files.