pyNAVIS.loaders¶
SpikesFile¶
-
class
pyNAVIS.loaders.
SpikesFile
(addresses=[], timestamps=[])[source]¶ Class that contains all the addresses and timestamps of a file.
- Variables
timestamps (int[]) – Timestamps of the file.
addresses (int[]) – Addresses of the file.
Note
Timestamps and addresses are matched, which means that timestamps[0] is the timestamp for the spike with address addresses[0].
Loaders¶
-
class
pyNAVIS.loaders.
Loaders
[source]¶ Functionalities for loading spiking information from different formats.
Methods:
loadAEDAT
(path, settings)Loads an AEDAT (.aedat) file.
loadAEDATLocalization
(path, settings, …)Loads an AEDAT (.aedat) file which contains events from both the NAS model and the SOC model (sound source localization).
loadCSV
(path[, delimiter])Loads a Comma-Separated Values (.csv) file.
loadCSVLocalization
(path[, delimiter])Loads a Comma-Separated Values (.csv) file which contains events from both the NAS model and the SOC model (sound source localization).
loadZynqGrabberData
(path, settings, …)Loads a text (.txt) file with EAR events collected by the zynqGrabber.
-
static
loadAEDAT
(path, settings)[source]¶ Loads an AEDAT (.aedat) file.
- Parameters
path (string) – Full path of the AEDAT file to be loaded, including name and extension.
settings (MainSettings) – Configuration parameters for the file to load.
- Returns
SpikesFile – SpikesFile containing all the addresses and timestamps of the file.
- Raises
SettingsError – If settings.address_size is different than 2 and 4.
-
static
loadAEDATLocalization
(path, settings, localization_settings)[source]¶ Loads an AEDAT (.aedat) file which contains events from both the NAS model and the SOC model (sound source localization).
- Parameters
path (string) – Full path of the AEDAT file to be loaded, including name and extension.
settings (MainSettings) – Configuration parameters for the file to load.
localization_settings (LocalizationSettings) – Configuration parameters of the localization module for the file to load.
- Returns
SpikesFile – SpikesFile containing all the addresses and timestamps of the file. LocalizationFile: LocalizationFile containing all the events from both the MSO and LSO models of the file.
- Raises
SettingsError – If settings.address_size is different than 2 and 4.
-
static
loadCSV
(path, delimiter=',')[source]¶ Loads a Comma-Separated Values (.csv) file.
- Parameters
path (string) – Full path of the CSV file to be loaded, including name and extension.
delimiter (char) – Delimiter to use in the CSV file.
- Returns
SpikesFile – SpikesFile containing all the addresses and timestamps of the file.
Note
The CSV file should contain one line per event, and the information in each line should be: address, timestamp
-
static
loadCSVLocalization
(path, delimiter=',')[source]¶ Loads a Comma-Separated Values (.csv) file which contains events from both the NAS model and the SOC model (sound source localization).
- Parameters
path (string) – Full path of the CSV file to be loaded, including name and extension.
delimiter (char) – Delimiter to use in the CSV file.
- Returns
SpikesFile – SpikesFile containing all the addresses and timestamps of the file. LocalizationFile: LocalizationFile containing all the events from both the MSO and LSO models of the file.
Note
The CSV file should contain one line per event, and the information in each line should be: address, timestamp
The CSV format should be: address, timestamp, auditory_model, xso_type, neuron_id.
-
static
loadZynqGrabberData
(path, settings, localization_settings)[source]¶ Loads a text (.txt) file with EAR events collected by the zynqGrabber.
- Parameters
path (string) – Full path of the CSV file to be loaded, including name and extension.
settings (MainSettings) – Configuration parameters for the file to load.
localization_settings (LocalizationSettings) – Configuration parameters of the localization module for the file to load.
- Returns
spikes_file – SpikesFile containing all the addresses and timestamps of the file. localization_file: LocalizationFile containing all the events from both the MSO and LSO models of the file.
-
static