본문으로 건너뛰기
Skillpedia
데이터베이스51k · #3508

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가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/K-Dense-AI/scientific-agent-skills/blob/main/skills/nwb-conversion/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

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

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. Read the .validation.json alongside 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.
  6. 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

repo: K-Dense-AI/scientific-agent-skills

인기도

GitHub 스타
51k
순위
#3508
라이선스
MIT
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬