Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature]: Issue warning if adding starting_time_rate w/o starting_time for TimeSeries #584

Open
2 of 4 tasks
ehennestad opened this issue Sep 1, 2024 · 0 comments · May be fixed by #596
Open
2 of 4 tasks

[Feature]: Issue warning if adding starting_time_rate w/o starting_time for TimeSeries #584

ehennestad opened this issue Sep 1, 2024 · 0 comments · May be fixed by #596
Assignees

Comments

@ehennestad
Copy link
Collaborator

What would you like to see added to MatNWB?

If the starting_time_rate property of a types.core.TimeSeries object is set while the starting_time is unset, the starting_time_rate is not actually written to file, but there is no indication from matnwb that this is not happening.

There should be a warning if the value of starting_time_rate is set and the value of starting_time is empty for a TimeSeries object.

This also needs to be fixed in the Behavior tutorial.
That tutorial creates multiple TimeSeries or TimeSeries derived objects and sets the starting_time_rate, but not the starting_time. The result is a file without starting_time/starting_time_rate which can not be opened in pynwb.

Is your feature request related to a problem?

Yes, See above

What solution would you like?

  • Add warning in set method for starting_time_rate if value of starting_time is empty
  • Add value for starting_time when creating TimeSeries objects in the Behavior tutorial

Do you have any interest in helping implement the feature?

Yes.

Code of Conduct

ehennestad added a commit that referenced this issue Sep 3, 2024
Also, use misc.getTutorialNwbFilePath to create a filepath for saving tutorial nwb file
bendichter added a commit that referenced this issue Sep 10, 2024
* Remove tutorialTest (function-based)

* Create TutorialTest (class-based unit test)

* Add test classes (issue #583 )

* Update description for PynwbTutorialTest

* Create getTutorialNwbFilePath.m

Add function to create a filepath for saving tutorial nwb files in a fixed folder

* Fix: Add starting_time when creating TimeSeries objects (#584)

Also, use misc.getTutorialNwbFilePath to create a filepath for saving tutorial nwb file

* Update several tutorials: Specify timezone or NWBFile's session_start_time property

* Update PynwbTutorialTest.m

Add "extensions" tutorial to skipped tutorials as it has an unresolved issue

* Fix dynamic_tables tutorial

Specify timezone for session start time when creating nwb object
Fix maxSize of DataPipe in random_exp_index (VectorIndex object)

* Added context and details to the dimension mapping tutorials

* Fix dimensionMapWithDataPipes tutorial, ignore outfile in test

* Add matplotlib as dependency for PynwbTutorialTest

* Add dandi as dependency for PynwbTutorialTest

* Add pyenv as dependency for PynwbTutorialTest

* Add pynwb dependency for testing MATNWB tutorials

* Try getting pynwb on MATLAB's pyenv path

* Add fallback option for pynwb reading in MATNWB TutorialTest

---------

Co-authored-by: Ben Dichter <[email protected]>
bendichter added a commit that referenced this issue Sep 12, 2024
* Improve coverage for nwbRead/nwbExport

* Remove tutorialTest (function-based)

* Create TutorialTest (class-based unit test)

* Add test classes (issue #583 )

* Update description for PynwbTutorialTest

* Add specific tests for io.timestamp2datetime

* Update unit tests

* Create getTutorialNwbFilePath.m

Add function to create a filepath for saving tutorial nwb files in a fixed folder

* Fix: Add starting_time when creating TimeSeries objects (#584)

Also, use misc.getTutorialNwbFilePath to create a filepath for saving tutorial nwb file

* Update several tutorials: Specify timezone or NWBFile's session_start_time property

* Fix bug in io.timestamp2datetime (Issue #585)

Some dates are assigned wrongly when Day, Month and Year are set individually, as the datetime object internally/silently adjusts month if day is not valid

* Update timestamp2datetime.m

Fix: Should not preallocate datetimeArray as it is not known beforehand whether the timestamp has a timezone or not (datetime.empty contrains to datetime w/o timezone)

* Update GenerationTest.m

Ensure test can be run from any current working directory, not just the matnwb repo folder

* Update getMatnwbDir.m

Simplyfy function by using mfilename instead of dbstack

* Delete file which was introduced with issue #585

* Change nwbtest: Add selector options as input; Add cleanup routine

* Add test for constructing Anon with name, value input

* Add specific testing of types.untyped.Set

When writing test, also discovered a but in types.untyped.Set which is fixed

* Remove function call used for debugging

---------

Co-authored-by: Ben Dichter <[email protected]>
@ehennestad ehennestad self-assigned this Sep 17, 2024
ehennestad added a commit that referenced this issue Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant