Establish full Bpod ingestion
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
- issue の種類
- 機能追加
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- python
調査の方向性
element_trial/readers/Bpod.py から始め、SciPy の loadmat アプローチを使用してフィールドを調査し、現在の reader を issue に記載された 6 つの Bpod .mat の例と比較します。どのデータを一貫して取り込めるか、また trials の再構築に RawEvents が必要かどうかを判断します。利用可能なすべての例に対して element_interface に組み込める、完全に開発された reader の準備が整えば完了です。
索引モデルが issue の本文から書いたものです。
説明
MATLAB is the only environment officially supported by Bpod developers. SciPy has a lot of support for loading mat files. In the current draft, SciPy is used to import Bpod .mat files as embedded dictionaries. Micheal Wulf shared the Bpod files that are currently available via djarchive as workflow-trial, revision 0.0.0b1. They were shared as a diverse set of examples. Under element_trial/readers/, there is a reader draft in need of further development, Bpod.py, and eventual inclusion in element_interface. It handles general ingestion for fields that are consistent across examples, but there are many differences across files. A fully realized loader may need to pull directly from Bpod 'raw' fields to reconstruct the experiment, as many other fields are organized differently across trials.
Ecosystem: The SanWorks team (git repositories here) offers no offical python support, suggesting instead that users export to JSON. The PyBpod project (github, docs) offers a python-based GUI alternative for running Bpod hardware. So far as I could tell, they do not offer any useful ingestion functions we would want to incorporate.
from workflow_trial.pipeline import subject, session, trial
from workflow_trial.ingest import ingest_subjects, ingest_sessions
ingest_subjects(); _ = ingest_sessions()
# Download from djarchive, set root trial directory in workflow
from djarchive_client import client; c = client()
c.download('workflow-trial', '0.0.0b1', '<local-path>', create_target=True)
def get_trial_root_dir(): # also defined in workflow_trial.paths
return '<local-path>'
# List of files
bpods_filepath=[
"Bpod_Behavior_Data/BalbC_Ph_W1_LH_Randdelay_changeover_Aug08_2021_Session1.mat",
"Bpod_Behavior_Data/1119A_3_LoomingThreat_Dec26_2019_Session1.mat",
"Bpod_Behavior_Data_and_TrialEvents/NeuroPixels/TQ03_Dual2AFC_Jun18_2021_Session1.mat",
"Bpod_Behavior_Data_and_TrialEvents/NeuroPixels/TrialEvents.mat",
"Bpod_Behavior_Data_and_TrialEvents/Neuralynx/TP24_Dual2AFC_Feb12_2019_Session1.mat",
"Bpod_Behavior_Data_and_TrialEvents/Neuralynx/TrialEvents.mat"]
import scipy.io as spio
def load_bpod_matfile(matlab_filepath):
"""Loading routine for behavioral file, bpod .mat """
SessionData = spio.loadmat(matlab_filepath.as_posix(),
squeeze_me=True,simplify_cells=True,
struct_as_record=False)['SessionData']
return SessionData # functionally a dictionary
# See how files differ
for f in bpods_filepath:
filepath = find_full_path(get_trial_root_dir(),f)
print(str(filepath).split("/")[-1])
data = load_bpod_matfile(filepath)
try: print(data['RawEvents']['Trial'][0]) # replace with other fields
except KeyError: pass
- 主要言語
- Python
- スター
- 2
- フォーク
- 18
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
datajoint/element-event のほかの issue
-
longblob silently stores str(array) under DataJoint 2.x — 3 affected attributes, no error raisedオープン
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
datajoint/element-event#48 · コメント 2 件 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 48/100
datajoint/element-event#23 ·
-
NWB export functionオープンenhancement NWB
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
datajoint/element-event の issue をすべて見る
似ている issue
-
[Resource]: Loreオープンresource-submission validation-passed
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
hesreallyhim/awesome-claude-code#3234 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
openminion/openminion#376 ·
メンテナーはふだん 1 日以内に返信
-
Type: ☹︎ Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
posit-dev/great-tables#1028 ·
メンテナーはふだん 1 日以内に返信
-
integration: apple_tv
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
home-assistant/core#188282 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
A "since" range is worded as a career: "the past two seasons" says "regular season career (2025 on)"オープンP4: low
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
jeffknupp/association#538 ·