Skip to content

Commit

Permalink
pass other tests
Browse files Browse the repository at this point in the history
  • Loading branch information
h-mayorquin committed Dec 18, 2023
1 parent 6a119a1 commit 2795109
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/pynwb/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Check warning on line 300 in src/pynwb/base.py

View check run for this annotation

Codecov / codecov/patch

src/pynwb/base.py#L300

Added line #L300 was not covered by tests
else:
scale_factor = self.conversion
return np.asarray(self.data) * scale_factor + self.offset


@register_class('Image', CORE_NAMESPACE)
Expand Down

0 comments on commit 2795109

Please sign in to comment.