sdynpy.core.sdynpy_data.from_imat_struct

from_imat_struct(imat_fn_struct, squeeze=True)[source]

Constructs a NDDataArray from an imat_fn class saved to a Matlab structure

In IMAT, a structure can be created from an imat_fn by using the get() function. This can then be saved to a .mat file and loaded using scipy.io.loadmat. The output from loadmat can be passed into this function

Parameters
  • imat_fn_struct (np.ndarray) – structure from loadmat containing data from an imat_fn

  • squeeze (bool, optional) – If True, return a single NDDataArray object or subclass if only one function type exists in the data. Otherwise, it will return a list of length one. If more than one function type exists, a list of NDDataArray objects will be returned regardless of the value of squeeze. Default is True.

Returns

return_functions – Returns a list of NDDataArray objects if squeeze is false, or a single NDDataArray object if squeeze is True, unless there are multiple function types stored in the structure.

Return type

NDDataArray or list of NDDataArray