Functions

This section shows the different functions used in AERzip.

AERzip.functions.loadCompressedFile(file_path, verbose=False)

This function loads a compressed file and returns the addresses and time stamps stored in it.

Parameters:
  • file_path (string) – A string indicating the path of the compressed file to be loaded.

  • verbose (boolean) – A boolean indicating whether or not to print information about the process.

Returns:

A tuple containing two lists: the addresses and the time stamps stored in the compressed file.

Return type:

tuple

AERzip.functions.saveCompressedFile(addresses, timestamps, file_path, max_address=None, max_timestamp=None, min_timestamp=None, ask=False, overwrite=False, verbose=False)

This function compresses and saves a compressed file from the provided addresses and timestamps.

Parameters:
  • addresses (list) – A list containing the addresses of the spikes to be stored.

  • timestamps (list) – A list containing the timestamps of the spikes to be stored

  • file_path (string) – A string indicating where the file should be written.

  • max_address (int) – An integer indicating the maximum address of the addresses list. Not required, but can speed up the compression.

  • max_timestamp (int) – An integer indicating the maximum time stamp of the timestamps list. Not required, but can speed up the compression.

  • min_timestamp (int) – An integer indicating the minimum time stamp of the timestamps list. Not required, but can speed up the compression.

  • ask (boolean) – A boolean indicating whether or not to prompt the user to overwrite a file that has been found at the specified path.

  • overwrite (boolean) – A boolean indicating wheter or not a file that has been found at the specified path must be or not be overwritten (if the user is not asked).

  • verbose (boolean) – A boolean indicating whether or not to print information about the process.