traveler.core.omx.optimize_omx_file#

traveler.core.omx.optimize_omx_file(input_path, output_path, complevel=5)[source]#

Read an existing OMX file and create an optimized version.

The optimizations include:

  1. float64 -> float32 conversion

  2. Integer data optimized to smallest bitwidth without loss

  3. blosc2 compression applied to all data

The optimizations applied here are designed to reduce file sizes and speed up data read throughput. This is done without materially impacting data quality, although there is some theoretical loss via down-casting of float64 to float32.

Parameters:
  • input_path (str) – Path to the input OMX file

  • output_path (str) – Path for the output optimized OMX file

  • complevel (int, default 5) – Compression level for blosc2 (1-9, higher = better compression)

Returns:

Summary of optimizations performed

Return type:

dict