From 26ea6cb55b259570f222eae7749140f56764d154 Mon Sep 17 00:00:00 2001 From: weiglszonja Date: Wed, 11 Nov 2020 19:13:59 +0100 Subject: [PATCH] Fix #1315 --- src/pynwb/behavior.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/pynwb/behavior.py b/src/pynwb/behavior.py index 20ed5ca54..a0ae98b9d 100644 --- a/src/pynwb/behavior.py +++ b/src/pynwb/behavior.py @@ -26,14 +26,16 @@ class SpatialSeries(TimeSeries): 'dimension represents different features, e.g., x, y position')}, {'name': 'reference_frame', 'type': str, # required 'doc': 'description defining what the zero-position is'}, + {'name': 'unit', 'type': str, 'doc': 'The base unit of measurement (should be SI unit)', + 'default': 'meters'}, *get_docval(TimeSeries.__init__, 'conversion', 'resolution', 'timestamps', 'starting_time', 'rate', 'comments', 'description', 'control', 'control_description')) def __init__(self, **kwargs): """ Create a SpatialSeries TimeSeries dataset """ - name, data, reference_frame = popargs('name', 'data', 'reference_frame', kwargs) - super(SpatialSeries, self).__init__(name, data, 'meters', **kwargs) + name, data, reference_frame, unit = popargs('name', 'data', 'reference_frame', 'unit', kwargs) + super(SpatialSeries, self).__init__(name, data, unit, **kwargs) self.reference_frame = reference_frame