nwb-conversion
하는 일
이 도구는 신경과학 실험 데이터를 NWB라는 표준 형식으로 변환합니다. 특히 현미경 이미지와 움직임 데이터에 대해 시간 정보와 측정값이 올바르게 저장되도록 합니다.
사용하는 경우
- ✓변환할 현미경 이미지(TIFF)와 행동 위치 데이터(CSV)가 있을 때.
- ✓이미지와 움직임의 시간이 동기화되도록 해야 할 때.
- ✓공유나 향후 분석을 위해 실험 데이터를 정리하고 검증할 때.
스킬 링크
https://github.com/K-Dense-AI/scientific-agent-skills/blob/main/skills/nwb-conversion/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“TIFF 이미지와 CSV 위치 데이터를 NWB 형식으로 변환해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
도구는 NeuroConv와 PyNWB라는 프로그램을 사용해 이미지와 행동 파일을 읽습니다. 두 데이터의 시간을 맞추고, NWB 형식으로 저장하기 전에 모든 것이 올바른지 확인합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Validated NWB conversion
Supported streams
The executable workflow covers two explicit input streams in one session:
| Input | NWB representation | Tested constraints |
|---|---|---|
| Two-photon grayscale multi-page TIFF + frame timestamps CSV | Acquisition TwoPhotonSeries named Imaging through NeuroConv |
One channel, one plane, one 2D image per page, fixed shape and dtype |
Calibrated position CSV (time_s,x,y) |
Behavior Position / SpatialSeries through PyNWB |
Coordinates in m, cm or mm; converted to meters without temporal resampling |
Other acquisition readers require their own format-specific tests. In particular, this helper does not decode SpikeGLX, Open Ephys, multichannel TIFF, volumetric TIFF, compressed video, or pixel-to-world calibration. Do not rename an arbitrary numeric table to a supported stream.
Install the tested environment
uv venv --python 3.12 nwb-env
uv pip install --python nwb-env/bin/python 'neuroconv[tiff]==0.10.2' pynwb==4.2.0 \
nwbinspector==0.7.2 roiextractors==0.10.0 tifffile==2026.9.20 \
zarr==2.18.7 hdmf-zarr==0.11.3
Keep both Zarr pins even for an HDF5-only conversion: NeuroConv 0.10.2 imports its backend
configuration modules at startup, and the tested unconstrained Zarr 3.4.0 installation failed on
zarr.codec_registry. The pinned environment ran the real conversion, PyNWB validation and
Inspector successfully on macOS ARM64. The dependency resolver supplies NumPy and HDF5 support.
These are compatibility pins, not claims that Zarr 2 and hdmf-zarr 0.11.3 are the latest releases.
Current interface checks and the tested dependency exception are recorded in
references/upstream-review.md.
Workflow
- Inventory the actual inputs and acquisition metadata. Identify image plane/channel, optical settings, subject/session identifiers, timezone, behavior coordinate system, units and the timestamp clock for every stream. Preserve originals. Do not replace missing metadata with plausible defaults from a sample config.
- Copy assets/session-template.json beside the raw data and replace the explicitly synthetic values. Paths resolve from that JSON file. Read references/input-contract.md for the exact CSV and metadata contract and the pulse-pair variant. TIFF pixels are retained as acquired; a raw arbitrary-unit intensity does not become a photon count merely by changing its unit label.
- Establish the common timebase from acquisition evidence. Frame timestamps must already be reference-clock seconds since the timezone-aware session start. For position, provide either a documented shared clock or matched synchronization pulses. The helper fits one affine clock transform, checks its residual against a specified tolerance, and refuses extrapolation beyond the pulse range. It never estimates synchronization from coincident-looking neural/behavioral signals. Clock resets or nonlinear drift require an explicitly validated piecewise mapping.
- Execute the converter. Inputs must have finite, strictly increasing timestamps and matching image/timestamp counts. Explicitly declare one channel and one plane; known TIFF channel/plane metadata must agree. Grayscale pages alone cannot exclude undocumented interleaving. The acquisition samples stay intact; only coordinate units and, when evidenced, behavior timestamps are transformed.
- Read the
.validation.jsonalongside the NWB file. Schema compliance, Inspector findings and data equality answer different questions. The script exits with an error for schema failures and flags critical Inspector findings for review in the report. Review all findings in context; successful validation cannot establish that anatomical labels, pulse pairing or calibration supplied by the user are correct. - Deliver the NWB, validation JSON, original conversion config and an explanation of remaining metadata gaps or Inspector findings. No upload or archive submission is part of this workflow.
Execute
Run the following from the skill directory, with paths to the actual analysis files:
nwb-env/bin/python scripts/convert_session.py /path/to/session.json --output /path/to/session.nwb
nwb-env must point to the environment created above; the absolute example input paths are
…
자주 묻는 질문
어떤 데이터 유형을 지원하나요?
회색조 2광자 현미경 이미지(단일 페이지 TIFF)와 그 프레임 타임스탬프, 그리고 타임스탬프가 있는 CSV 행동 위치 데이터를 지원합니다.
다른 파일 형식도 변환할 수 있나요?
아닙니다. 이 도구는 언급된 TIFF와 CSV 형식에만 해당합니다. SpikeGLX, Open Ephys, 동영상 같은 형식은 지원하지 않습니다.
시간이 맞지 않으면 어떻게 되나요?
도구는 시간을 맞추려고 시도하고 차이가 허용 범위 안에 있는지 확인합니다. 큰 문제가 있거나 정보가 없으면 실패하거나, 수동 수정이 필요하다고 알릴 수 있습니다.
상세 정보
작성자의 원본 설명
Converts neuroscience acquisition data to Neurodata Without Borders files with NeuroConv and PyNWB, preserves metadata and timebases, checks evidence-based clock alignment, and produces schema validation, NWB Inspector findings and round-trip checks. Use for NWB conversion and synchronization of planar single-channel two-photon TIFF imaging plus timestamped behavioral position CSV; this skill does
인기도
- GitHub 스타
- 51k
- 순위
- #3508
- 라이선스
- MIT
- 업데이트
- 2026. 10. 15.
댓글
- …
이 저장소의 다른 스킬
13c-metabolic-flux
51k탄소-13 동위원소 추적 데이터를 사용해 대사 흐름(플럭스)을 추정합니다. 세포 대사와 생화학 경로를 분석할 때 유용합니다.
adaptyv
51kAdaptyv API를 사용해 단백질 특성 분석 실험을 설계합니다. 비용을 추정하고, 서열을 제출하며, 실험실 결과를 확인하는 데 도움이 됩니다.
aeon
51k시계열 데이터에 대해 머신러닝 작업을 수행합니다. 순차 데이터를 분류하고, 예측하고, 이상을 탐지하고, 패턴을 찾을 때 유용합니다.
alphagenome
51k유전 변이에 대해 미리 계산된 게놈 영향을 조회합니다. 변이가 게놈에 주는 영향을 이해하도록 점수와 설명을 제공합니다.
비슷한 스킬
discrawl
394k에이전트가 저장된 로컬 Discord 메시지 보관본을 검색하고 요약하며, 최신 상태를 확인하고 다이렉트 메시지를 읽도록 돕습니다.
clickhouse-io
280k에이전트가 ClickHouse 데이터베이스의 쿼리와 스키마를 최적화하도록 돕습니다. 고성능 분석 작업의 모범 사례를 적용합니다. 분석 쿼리가 느릴 때 씁니다.
scientific-db-pubmed-database
280k생의학 분야의 과학 논문을 에이전트가 검색하도록 돕습니다. 특정 의학 정보가 필요한 연구에 유용합니다.