openlifu.xdc.transducerarray.TransducerArray

class openlifu.xdc.transducerarray.TransducerArray(id: 'str' = 'transducer_array', name: 'str' = 'Transducer Array', modules: 'list[TransformedTransducer]' = <factory>, attrs: 'dict' = <factory>)[source]

Bases: DictMixin

static from_dict(data: dict)[source]

Create an object from a dictionary

Parameters:

parameter_dict – dictionary of parameters to define the object

Returns: new object

to_dict()[source]

Convert the object to a dictionary

Returns: Dictionary of object parameters

to_file(file_path: str, compact: bool = False) None[source]

Serialize a TransducerArray to a json file

Parameters:
  • file_path – The path to the file where the json string will be written.

  • compact – if enabled then the string is compact (not pretty). Disable for pretty.

to_json(compact: bool = False) str[source]

Serialize a TransducerArray to a json string

Parameters:

compact – if enabled then the string is compact (not pretty). Disable for pretty.

Returns: A json string representing the complete TransducerArray object.