Zum Inhalt springen
Skillpedia
Datenbanken51k · #3508

nwb-conversion

Was er macht

Dieses Tool konvertiert Daten aus Neurowissenschafts-Experimenten in das Standardformat NWB. Es sorgt dafür, dass wichtige Informationen wie Zeitangaben und Messwerte korrekt gespeichert werden, besonders bei Mikroskopie-Bildern und Bewegungsdaten.

Wann du ihn nutzt

  • ✓Wenn du Mikroskopie-Bilder (TIFF) und Positionsdaten zum Verhalten (CSV) konvertieren willst.
  • ✓Wenn du sicherstellen musst, dass die Zeitpunkte von Bildern und Bewegung synchron sind.
  • ✓Um Experimentdaten für die Weitergabe oder spätere Analysen zu organisieren und zu prüfen.

Link zum Skill

https://github.com/K-Dense-AI/scientific-agent-skills/blob/main/skills/nwb-conversion/SKILL.md

Kopiere ihn und füge ihn in deine KI ein (Claude, ChatGPT oder Cursor) mit der Bitte, den Anweisungen zu folgen.

So nutzt du ihn

Am einfachsten: Kopiere die Nachricht und füge sie in deine KI ein. Sie liest den Skill und folgt den Anweisungen.

Fertige Nachricht zum Einfügen

Nutze diesen Skill, um mir zu helfen: https://github.com/K-Dense-AI/scientific-agent-skills/blob/main/skills/nwb-conversion/SKILL.md Lies die SKILL.md unter diesem Link und folge ihren Anweisungen für meine Aufgabe.
Soll deine KI Skills wie diesen selbst finden?Installiere den kostenlosen Skillpedia-MCP: eine Zeile, und sie durchsucht vor jeder Aufgabe 15.000+ Skills.In 1 Minute installieren →

Beispielanfrage an deine KI

“Konvertiere meine TIFF-Bilddatei und meine CSV-Positionsdaten in das NWB-Format.”

5 neue Skills pro Woche. 1 Minute Lesezeit.

So funktioniert es

Das Tool nutzt die Programme NeuroConv und PyNWB, um deine Bild- und Verhaltensdateien zu lesen. Es gleicht die Zeitangaben der beiden Datentypen ab und prüft, ob alles stimmt, bevor es im NWB-Format speichert.

Technischer Inhalt (originale SKILL.md)

Originaltext des Autors, auf Englisch, direkt von 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

…

Häufige Fragen

Welche Datentypen werden unterstützt?

Unterstützt werden Graustufen-Bilder aus der Zwei-Photonen-Mikroskopie (einseitige TIFF-Dateien) mit ihren Frame-Zeitstempeln sowie CSV-Positionsdaten zum Verhalten mit Zeitstempeln.

Kann es auch andere Dateiformate konvertieren?

Nein, dieses Tool ist auf die genannten TIFF- und CSV-Formate beschränkt. Formate wie SpikeGLX, Open Ephys oder Videos werden nicht unterstützt.

Was passiert, wenn die Zeitangaben nicht zusammenpassen?

Das Tool versucht, die Zeitangaben anzugleichen, und prüft, ob die Abweichung in einem akzeptablen Bereich liegt. Bei größeren Problemen oder fehlenden Informationen kann die Konvertierung scheitern, oder das Tool weist auf eine manuelle Korrektur hin.

Details

Originalbeschreibung des Autors

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

Beliebtheit

GitHub-Sterne
51k
Platz im Ranking
#3508
Lizenz
MIT
Aktualisiert
15.10.2026

Ist dieser Skill nützlich?

0

Anmelden um abzustimmen.

Kommentare

  • …

Weitere Skills aus diesem Repository

Ähnliche Skills