Skip to main content

bids_events

Tool to export events from presentation log files.

Installation

pip install bids_events

Example of use

Simple example

from bids_events.Events import EventHandler

events_h = EventHandler('example_events.tsv')
events_h.trials = [
    ['onset', 'duration', 'condition'],
    [0,   20, 'STOP'],
    [20,  20, 'GO'],
    [40,  20, 'STOP'],
    [60,  20, 'GO'],
    [80,  20, 'STOP'],
    [100, 20, 'GO'],
    [120, 20, 'STOP'],
    [140, 20, 'GO'],
    [160, 20, 'STOP'],
    [180, 20, 'GO'],
]
events_h.export_bids()

Extraction using Presentation LOGS

from bids_events.presentation import LogHandler as Log

cols = [
    ['trial_type', Log.COL_CODE, r'cue.*'],
    ['fix_after_cue', Log.COL_CODE, r'fixAfterCue', Log.COL_TIME],
    ['reward', Log.COL_CODE, r'rew.*', Log.COL_CODE],
    ['response', Log.COL_CODE, r'press', Log.COL_TTIME],
    ['fix2', Log.COL_CODE, r'fix2', Log.COL_TTIME]
]

log = Log('S001-Run1.log')
log.extract_trials( cols )
log.export_bids('sub-S001_task-emotion_run-1')

Check the ./tests folder to see more detailed examples.

Release files for bids-events 0.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bids-events 0.0.5
File Size Uploaded
bids_events-0.0.5.tar.gz 3.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for bids-events 0.0.5
File Interpreter ABI Platform
bids_events-0.0.5-py3-none-any.whl Python 3 none any Details

Total release size: 7.3 kB

Release files / bids_events-0.0.5.tar.gz

Download URL bids_events-0.0.5.tar.gz
Size 3.3 kB
Tags Source
SHA-256 checksum
How to use checksums
9c2b6c3e37556a17ecef321f2ad29b7e8cc2d51e118f13b308bd8f54db1731ef
BLAKE2b-256 checksum
How to use checksums
e9f19a008614e6ab97952f0911ea7321aa95668e415b06e913b2ace25a4ec409
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.4

Release files / bids_events-0.0.5-py3-none-any.whl

Download URL bids_events-0.0.5-py3-none-any.whl
Size 4.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3164180b5579b4843af6933846df3c983dc1a73fa02570b4ef62b00647384910
BLAKE2b-256 checksum
How to use checksums
6bf522b44bad20e67dec64fdf0648ff06a9135774c61337cf2d6736b4c131180
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.4

Release history Release notifications | RSS feed

This release

0.0.5 This release

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page