You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
raiseValueError('Specifying rate and timestamps is not supported.')
ifself.starting_timeisnotNone:
raiseValueError('Specifying starting_time and timestamps is not supported.')
self.fields['timestamps'] =timestamps
self.timestamps_unit=self.__time_unit
self.interval=1
ifisinstance(timestamps, TimeSeries):
timestamps.__add_link('timestamp_link', self)
elifself.rateisnotNone:
ifself.starting_timeisNone: # override default if rate is provided but not starting time
self.starting_time=0.0
self.starting_time_unit=self.__time_unit
else:
raiseTypeError("either 'timestamps' or 'rate' must be specified")
This makes sense when creating a new file to ensure that we don't create invalid files. However, on read it would be useful to warn instead and continue to attempt to read the file to try and give access to the data if at all possible.
* change timeseries rate errors to warn on read (#1786, #1721)
* add test for starting time and update CHANGELOG
---------
Co-authored-by: Steph Prince <[email protected]>
What would you like to see added to PyNWB?
In
TimeSeries
(and likely a few other places) additional error checks are performed on__init__
to ensure the data is valid. E.g,.:pynwb/src/pynwb/base.py
Lines 175 to 191 in eb58506
This makes sense when creating a new file to ensure that we don't create invalid files. However, on read it would be useful to warn instead and continue to attempt to read the file to try and give access to the data if at all possible.
Is your feature request related to a problem?
Related to NeurodataWithoutBorders/helpdesk#62
What solution would you like?
Use the
self._error_on_new_warn_on_construct
method instead ofValueError
in theTimeSeries
constructor.Do you have any interest in helping implement the feature?
Yes.
Code of Conduct
The text was updated successfully, but these errors were encountered: