diff --git a/CHANGELOG.md b/CHANGELOG.md index 639abef..afc6372 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ Observes [Semantic Versioning](https://semver.org/spec/v2.0.0.html) standard and [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) convention. +## [0.3.0] - 2023-11-09 + ++ Add - `BehaviorTimeSeries` table + ## [0.2.3] - 2023-06-20 + Update - GitHub Actions workflows @@ -43,6 +47,7 @@ Observes [Semantic Versioning](https://semver.org/spec/v2.0.0.html) standard and + Add - AlignmentEvent design to capture windows relative to an event + Add - Black formatting into code base +[0.3.0]: https://github.com/datajoint/element-event/releases/tag/0.3.0 [0.2.3]: https://github.com/datajoint/element-event/releases/tag/0.2.3 [0.2.2]: https://github.com/datajoint/element-event/releases/tag/0.2.2 [0.2.1]: https://github.com/datajoint/element-event/releases/tag/0.2.1 diff --git a/element_event/event.py b/element_event/event.py index cca66eb..cb57dc4 100644 --- a/element_event/event.py +++ b/element_event/event.py @@ -146,14 +146,14 @@ class Event(dj.Imported): Attributes: BehaviorRecording (foreign key): Behavior recording primary key. EventType (foreign key): EventType primary key. - event_start_time (decimal(10, 4)): Time of event onset in seconds, WRT recording start. + event_start_time (decimal): Time of event onset in seconds, WRT recording start. event_end_time (float): Optional. Seconds WRT recording start. """ definition = """ -> BehaviorRecording -> EventType - event_start_time : decimal(10, 4) # (second) relative to recording start + event_start_time : decimal(10, 6) # (second) relative to recording start --- event_end_time=null : float # (second) relative to recording start """ @@ -193,3 +193,20 @@ class AlignmentEvent(dj.Manual): -> EventType.proj(end_event_type='event_type') # event after alignment_event_type end_time_shift: float # (s) WRT end_event_type """ + + +@schema +class BehaviorTimeSeries(dj.Imported): + definition = """ + -> BehaviorRecording + timeseries_name : varchar(32) # e.g. joystick, lick_port + --- + sample_rate=null : float # (Hz) # sampling rate of the acquired data + behavior_timeseries : longblob # array of device's acquired data + behavior_timestamps=null : longblob # array of timestamps (in second) relative to the start of the BehaviorRecording + timeseries_description='' : varchar(1000) # detailed description about the timeseries + """ + + def make(self, key): + """Populate based on unique entries in BehaviorRecording.""" + # Write a make function to automatically ingest your timeseries data. diff --git a/element_event/version.py b/element_event/version.py index fd93127..6669fd8 100644 --- a/element_event/version.py +++ b/element_event/version.py @@ -1,2 +1,2 @@ """Package metadata.""" -__version__ = "0.2.3" +__version__ = "0.3.0" diff --git a/setup.py b/setup.py index d59fb37..5cb0266 100644 --- a/setup.py +++ b/setup.py @@ -4,27 +4,27 @@ pkg_name = "element_event" here = path.abspath(path.dirname(__file__)) -with open(path.join(here, 'README.md'), 'r') as f: +with open(path.join(here, "README.md"), "r") as f: long_description = f.read() -with open(path.join(here, 'requirements.txt')) as f: +with open(path.join(here, "requirements.txt")) as f: requirements = f.read().splitlines() -with open(path.join(here, pkg_name, 'version.py')) as f: +with open(path.join(here, pkg_name, "version.py")) as f: exec(f.read()) setup( - name=pkg_name.replace('_', '-'), + name=pkg_name.replace("_", "-"), version=__version__, description="DataJoint Elements for Trialized Experiments", long_description=long_description, - long_description_content_type='text/markdown', - author='DataJoint', - author_email='info@datajoint.com', - license='MIT', + long_description_content_type="text/markdown", + author="DataJoint", + author_email="info@datajoint.com", + license="MIT", url=f'https://github.com/datajoint/{pkg_name.replace("_", "-")}', - keywords='neuroscience behavior bpod trials datajoint', - packages=find_packages(exclude=['contrib', 'docs', 'tests*']), + keywords="neuroscience behavior bpod trials datajoint", + packages=find_packages(exclude=["contrib", "docs", "tests*"]), scripts=[], install_requires=requirements, )