audiblelight.micarrays.dynamically_define_micarray#
- audiblelight.micarrays.dynamically_define_micarray(**kwargs)#
Dynamically define a new MicArray class with given attributes.
This enables a MicArray class to be dynamically defined at runtime. May be helpful when (for instance) the name or channel layout type may not be known in advance (e.g., when these are passed from a SOFA file). The returned MicArray class should have all the properties and attributes of a ‘normal’ MicArray class.
- Parameters:
kwargs – passed to MicArray constructor
- Returns:
the dynamically defined MicArray class
- Return type:
Type[‘MicArray’]
Usage: >>> marray = dynamically_define_micarray( >>> name=”tester”, >>> channel_layout_type=”foa”, >>> coordinates_cartesian=[[0.0, 0.0, 1.0]] >>> ) >>> issubclass(type(marray), MicArray) True