Reference
Classes
Functions
predefined_frametypes
predefined_frametypes()
Returns a dict of predefined sdif frame types
Returns
(dict[str: list[str]]
) A dict (framesig: components)
predefined_matrixtypes
predefined_matrixtypes()
Returns a list of predefined sdif matrix types
Returns
(dict[str, list[str]
) A dict (matrisig: column_names)
sdif_init
sdif_init(sdiftypes_path=None)
Initialize the sdif library
This function is called automatically whenever an instance of
SdifFile is created. Calling this function explicitely only has an
effect if done previous to any usage of the pysdif
library, to
point the library to a SdifTypes.STYP
file. This file is used
by the underlying code as a library for known SDIF frames and matrix
definitions.
If called without arguments, the default paths will be searched. If an empty
string is given, no SdifTypes.STYP
will be used
Args
- sdiftypes_path (
str
): The path toSdifTypes.STYP
, or None to search in default paths (default:None
)
Returns
(bool
) True if the library was initialized, False if it was already initialized. In such a case, the path passed will not have any effect
signature2str
signature2str(int sig)
Converts a numeric signature into a string signature
Args
- sig (
int
): Numeric signature
Returns
(str
) The string signature corresponding to the numeric signature
str2signature
str2signature(s)
Converts a 4-byte string signature into a numeric signature
Args
- s (
str
): a string of 4 characters
Returns
(int
) The numeric signature corresponding to the string signature