Default channel name format #66
joannadiong
started this conversation in
General
Replies: 1 comment 1 reply
-
The line you highlight is now where the channel names are given. def _parse_trial_data(self):
trial_data = self._import_trial_data()
channel_names = list()
for key, value in trial_data.items():
channel_names.append((key.title(), value["ch_type"]))
value["path_save_figures"] = self.info.path_save_figures
value["trial_name"] = self.info.name
value["subject_id"] = self.info.subject_id
setattr(
self,
key.title(),
CHANNEL_GENERATOR[value["ch_type"]](key, value),
)
self.channels = channel_names Near the end, we set the class attribute that will be associated to the channel ( I don't recall why I decided this convention, but it is the default behaviour. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Quick question, I supplied a channel name in lowercase and by default, Trial generated an object that capitalised the first letter of the channel name by default. E.g, this was the setup:
and this was the call to plot the values:
The line that generates the channel name doesn't seem to indicate this as default behaviour:
spike2py/spike2py/trial.py
Line 34 in c878743
Just curious if this behaviour was intended, as I thought the general preference was to keep variable names lower case?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions