{"id":19721963,"url":"https://github.com/datajoint/element-event","last_synced_at":"2025-04-29T22:30:31.193Z","repository":{"id":38050746,"uuid":"425099810","full_name":"datajoint/element-event","owner":"datajoint","description":"DataJoint Element for event-based behavior experiments","archived":false,"fork":false,"pushed_at":"2025-02-19T05:30:40.000Z","size":1055,"stargazers_count":1,"open_issues_count":3,"forks_count":18,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-04-27T16:20:05.399Z","etag":null,"topics":["behavior","neuroscience"],"latest_commit_sha":null,"homepage":"https://datajoint.com/docs","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/datajoint.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-11-05T22:28:10.000Z","updated_at":"2025-02-19T05:30:44.000Z","dependencies_parsed_at":"2024-08-23T16:10:34.653Z","dependency_job_id":null,"html_url":"https://github.com/datajoint/element-event","commit_stats":{"total_commits":95,"total_committers":11,"mean_commits":8.636363636363637,"dds":0.5894736842105264,"last_synced_commit":"9c0a85e07299cfc953ec3dd7af63d29dd2250766"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datajoint%2Felement-event","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datajoint%2Felement-event/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datajoint%2Felement-event/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datajoint%2Felement-event/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/datajoint","download_url":"https://codeload.github.com/datajoint/element-event/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251592896,"owners_count":21614440,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["behavior","neuroscience"],"created_at":"2024-11-11T23:16:04.209Z","updated_at":"2025-04-29T22:30:30.910Z","avatar_url":"https://github.com/datajoint.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![PyPI version](https://badge.fury.io/py/element-event.svg)](http://badge.fury.io/py/element-event)\n\n# DataJoint Element - Experimental trials\n\n+ `element-event` features a DataJoint pipeline design for event, trial, and block management. \n\n+ `element-event` is not a complete workflow by itself, but rather a modular design of tables and dependencies. \n\n+ `element-event` can be flexibly attached to any DataJoint workflow.\n\n+ See the [Element Event documentation](https://elements.datajoint.org/description/event/) for the background information and development timeline.\n\n+ For more information on the DataJoint Elements project, please visit https://elements.datajoint.org.  This work is supported by the National Institutes of Health.\n\n## Element architecture\n\nIn diagram below, ***BehaviorRecording*** table starts immediately downstream from\n***Session***. Recordings can be segmented into both trials, which are assumed to have \nduration, and events, which may be instantaneous. Researchers may find one or both  appropriate for their particular paradigm. A set of trials can be further organized into\nblocks, representing a larger span of time. We provide an\n[example workflow](https://github.com/datajoint/workflow-trial/) with a\n[pipeline script](https://github.com/datajoint/workflow-trial/blob/main/workflow_trial/pipeline.py)\nthat models combining this Element with the corresponding \n[Element-Session](https://github.com/datajoint/element-session).\n\n### Trial \u0026 Event Schemas\n\n![trial and event schemas](./images/trial_event_diagram.svg)\n\n## Installation\n\n+ Install `element-event`\n    ```\n    pip install element-event\n    ```\n\n+ Upgrade `element-event` previously installed with `pip`\n    ```\n    pip install --upgrade element-event\n    ```\n\n\u003c!---\n+ Install `element-interface`\n\n    + `element-interface` is a dependency of `element-event`, however it is not \n      contained within `requirements.txt`.\n\n    ```\n    pip install \"element-interface @ git+https://github.com/datajoint/element-interface\"\n    ```\n--\u003e\n\n## Usage\n\n### Element activation\n\nTo activate the `element-event`, one need to provide:\n\n1. Schema names for the event or trial module\n2. Upstream Session table: A set of keys identifying a recording session (see [\nElement-Session](https://github.com/datajoint/element-session)).\n3. Utility functions. See \n[example definitions here](https://github.com/datajoint/workflow-trial/blob/main/workflow_trial/paths.py)\n\nFor more detail, check the docstring of the `element-event`:\n\n```python\nfrom element_event import event, trial\n\nhelp(event.activate)\nhelp(trial.activate)\n```\n\n### Element usage\n\n+ See the \n[workflow-calcium-imaging](https://github.com/datajoint/workflow-calcium-imaging), \n[workflow-array-ephys](https://github.com/datajoint/workflow-array-ephys), and \n[workflow-miniscope](https://github.com/datajoint/workflow-miniscope) \nrepositories for example usages of `element-event`.\n\n## Citation\n\n+ If your work uses DataJoint and DataJoint Elements, please cite the respective Research Resource Identifiers (RRIDs) and manuscripts.\n\n+ DataJoint for Python or MATLAB\n    + Yatsenko D, Reimer J, Ecker AS, Walker EY, Sinz F, Berens P, Hoenselaar A, Cotton RJ, Siapas AS, Tolias AS. DataJoint: managing big scientific data using MATLAB or Python. bioRxiv. 2015 Jan 1:031658. doi: https://doi.org/10.1101/031658\n\n    + DataJoint ([RRID:SCR_014543](https://scicrunch.org/resolver/SCR_014543)) - DataJoint for `\u003cSelect Python or MATLAB\u003e` (version `\u003cEnter version number\u003e`)\n\n+ DataJoint Elements\n    + Yatsenko D, Nguyen T, Shen S, Gunalan K, Turner CA, Guzman R, Sasaki M, Sitonic D, Reimer J, Walker EY, Tolias AS. DataJoint Elements: Data Workflows for Neurophysiology. bioRxiv. 2021 Jan 1. doi: https://doi.org/10.1101/2021.03.30.437358\n\n    + DataJoint Elements ([RRID:SCR_021894](https://scicrunch.org/resolver/SCR_021894)) - Element Event (version `\u003cEnter version number\u003e`)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatajoint%2Felement-event","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdatajoint%2Felement-event","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatajoint%2Felement-event/lists"}