OM# Documentation

Writing SDIF files

General

write-sdif-file allows writing a list of time-tagged SDIFFRAME objects into a new file.

The SIDF types of every frame, and of every matrix in the frames must be either in the SDIF standard types, or declared with the types input with a list of SDIFTYPE objects.

Name-value tables containing meta-data can also be included to the file with SDIFNVT objects connected to the nvts input.

Incrementally, using a file-stream

Similar to open-file-stream, open-SDIF-stream opens and returns a “stream” to a file (designated using a pathname), which can be used to incrementally write SDIF data.

Before anything, it is necessary to write the SDIF file header with sdif-write-header. Optional inputs options allow declaring SDIF types, name-value tables, or stream descriptors:

Once the SDIF header is written, frames (SDIFFRAME objects) can be added in the files one by one with sdif-write-frame.

The “file stream” opened and returned by open-SDIF-stream can be closed with close-SDIF-stream when no more read or write operations need to be done to the file.

→ See also how to do this in a loop in the See also the sdif-write-loop help-patch.

Saving specific objects and data as SDIF

As a complement to dedicated file-reading tools, a number of dedicated functions help writing SDIF files from OM# objects:

The scope parameter of bpf->sdif determines whether the x-dimension of the BPF should be considered as time (default) or as the elements in a single matrix.

→ See also the sdif-write-objects help-patch.