diff --git a/src/pynwb/base.py b/src/pynwb/base.py index bec8903d5..7db67cbbd 100644 --- a/src/pynwb/base.py +++ b/src/pynwb/base.py @@ -167,7 +167,7 @@ def __init__(self, **kwargs): setattr(self, key, val) data = args_to_process['data'] - self.fields['data'] = data + self.data = data if isinstance(data, TimeSeries): data.__add_link('data_link', self) @@ -177,7 +177,7 @@ def __init__(self, **kwargs): raise ValueError('Specifying rate and timestamps is not supported.') if self.starting_time is not None: raise ValueError('Specifying starting_time and timestamps is not supported.') - self.fields['timestamps'] = timestamps + self.timestamps = timestamps self.timestamps_unit = self.__time_unit self.interval = 1 if isinstance(timestamps, TimeSeries): @@ -252,6 +252,10 @@ def data(self): else: return self.fields['data'] + @data.setter + def data(self, val): + self.fields['data'] = val + @property def data_link(self): return self.__get_links('data_link') @@ -265,6 +269,10 @@ def timestamps(self): else: return self.fields['timestamps'] + @timestamps.setter + def timestamps(self, val): + self.fields['timestamps'] = val + @property def timestamp_link(self): return self.__get_links('timestamp_link')