convnwb.objects.electrodes.Electrodes¶
- class convnwb.objects.electrodes.Electrodes(subject=None, fs=None)[source]¶
Object for collecting / managing electrode information.
- Attributes:
- subjectstr
Subject label.
- fsint
Sampling rate.
- bundleslist of Bundle
Names of the bundles.
Methods
__init__
([subject, fs])Initialize Electrodes object.
add_bundle
(probe[, hemisphere, lobe, ...])Add a bundle to the object.
add_bundles
(bundles)Add multiple bundles to the object.
copy
()Return a deepcopy of this object.
get
(field)Get the values for a specified field from across all bundles.
to_csv
(file_name[, folder])Save out the electrode information as a CSV file.
Return object data as a dataframe.
to_dict
([drop_empty])Convert object data to a dictionary.
Attributes
Access bundle property labels.
The number of bundles stored in the object.
n_electrodes_per_bundle
- add_bundle(probe, hemisphere=None, lobe=None, region=None, subregion=None, channels=None)[source]¶
Add a bundle to the object.
- Parameters:
- probeBundle or str
Name of the bundle, if string, or pre-initialized Bundle object.
- hemisphere{‘left’, ‘right’}, optional
The hemisphere the probe is implanted in.
- lobe{‘frontal’, ‘parietal’, ‘temporal’, ‘occipital’}, optional
Which lobe the probe is in.
- regionstr, optional
Location of the bundle.
- subregionstr, optional
The subregion specifier of the probe.
- channelslist of int, optional
A set of channel indices for the bundle.
- add_bundles(bundles)[source]¶
Add multiple bundles to the object.
- Parameters:
- namesBundle or list of dict
Names of the bundles.
- property bundle_properties¶
Access bundle property labels.
- get(field)[source]¶
Get the values for a specified field from across all bundles.
- Parameters:
- field{‘probe’, ‘hemisphere’, ‘lobe’, ‘region’, ‘subregion’, ‘channels’}
Which field to get the values for.
- Returns:
- list
Values for the specified field from across all defined bundles.
- property n_bundles¶
The number of bundles stored in the object.