diff --git a/src/pynwb/base.py b/src/pynwb/base.py index 2ad38edd5..6f051befa 100644 --- a/src/pynwb/base.py +++ b/src/pynwb/base.py @@ -296,7 +296,11 @@ def get_timestamps(self): return np.arange(len(self.data)) / self.rate + self.starting_time def get_data_in_units(self): - return np.asarray(self.data) * self.conversion * self.channel_conversion[:, np.newaxis] + self.offset + if "channel_conversion" in self.fields: + scale_factor = self.conversion * self.channel_conversion[:, np.newaxis] + else: + scale_factor = self.conversion + return np.asarray(self.data) * scale_factor + self.offset @register_class('Image', CORE_NAMESPACE)