load_json

pyaer.utils.load_json(file_path)

Load JSON string.

Arguments

  • file_path: str
    the absolute path to the JSON string.

Returns

  • json_obj: dict
    A JSON object

write_json

pyaer.utils.write_json(file_path, json_obj)

Write JSON string.

Arguments

  • file_path: str
    the absolute path to the JSON string.
  • json_obj: dict
    a dictionary

Returns

flag : bool True if saved successfully False otherwise


load_dvs_bias

pyaer.utils.load_dvs_bias(file_path, verbose=False)

Load bias for DVS128.

Arguments

file_path : str
` the absolute path to the JSON string.

Returns

  • bias_obj: dict
    A dictionary that contains valid DVS128 bias.

load_davis_bias

pyaer.utils.load_davis_bias(file_path, verbose=False)

Load DAVIS bias.

TODO: to investigate bias differences between 240C and 346.

Arguments

file_path : str
` the absolute path to the JSON string.

Returns

  • bias_obj: dict
    A dictionary that contains valid DAVIS bias.

load_dynapse_bias

pyaer.utils.load_dynapse_bias(file_path, verbose=False)

Load DYNAPSE bias.

Arguments

  • file_path: str
    ` the absolute path to the JSON string.

Returns

  • bias_obj: dict
    A dictionary that contains valid DYNAPSE bias.

discover_devices

pyaer.utils.discover_devices(device_type, max_devices=100)

Automatic discover devices.

Arguments

  • device_type: int
    • -1 - CAER_DEVICE_DISCOVER_ALL
    • 0 - CAER_DEVICE_DVS128
    • 1 - CAER_DEVICE_DAVIS_FX2
    • 2 - CAER_DEVICE_DAVIS_FX3
    • 3 - CAER_DEVICE_DYNAPSE
    • 4 - CAER_DEVICE_DAVIS
    • 5 - CAER_DEVICE_EDVS
    • 6 - CAER_DEVICE_DAVIS_RPI

Returns

  • discovered_devices: numpy.ndarray
    a (num_devices, 3) array
    the first column is device type
    the second column is device USB bus number or serial port name for EDVS (cannot detect string, set to 0)
    the third column is device USB device address or serial Baud rate (if EDVS)
    discovered devices type with the order Note that the array has the data type uint64, please reformat the number if necessary.
  • num_devices: int
    number of available devices