Aller au contenu
Skillpedia
Bases de données51k · #3508

nwb-conversion

Ce qu’il fait

Cet outil convertit les données d'expériences en neurosciences dans un format standard appelé NWB. Il garantit que les informations importantes, comme le temps et les mesures, sont correctement enregistrées, en particulier pour les images de microscopie et les données de mouvement.

Quand l’utiliser

  • ✓Lorsque vous avez des images de microscopie (TIFF) et des données de position comportementale (CSV) à convertir.
  • ✓Lorsque vous devez vous assurer de la synchronisation temporelle des images et des mouvements.
  • ✓Pour organiser et valider les données d'expérience en vue de les partager ou de les analyser ultérieurement.

Lien du skill

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

Copiez-le et collez-le dans votre IA (Claude, ChatGPT ou Cursor) en lui demandant de suivre les instructions.

Comment l’utiliser

Le plus simple : copiez le message et collez-le dans votre IA. Elle lit le skill et suit les instructions.

Message prêt à coller

Utilise ce skill pour m’aider : https://github.com/K-Dense-AI/scientific-agent-skills/blob/main/skills/nwb-conversion/SKILL.md Lis le fichier SKILL.md de ce lien et suis ses instructions pour ma tâche.
Envie que votre IA trouve seule des skills comme celui-ci ?Installez le MCP gratuit de Skillpedia : une ligne, et elle cherche parmi 15 000+ skills avant chaque tâche.Installer en 1 minute →

Exemple de demande à votre IA

“Pouvez-vous convertir mes images TIFF et mes données de position CSV au format NWB ?”

5 nouveaux skills par semaine. 1 minute de lecture.

Comment ça marche

L'outil utilise les programmes NeuroConv et PyNWB pour lire vos fichiers d'images et de comportement. Il aligne le timing des deux types de données, vérifie que tout est correct, puis enregistre le résultat au format NWB.

Contenu technique (SKILL.md original)

Texte original de l’auteur, en anglais, directement depuis 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

…

Questions fréquentes

Quels types de données sont pris en charge ?

Il prend en charge les images de microscopie biphotonique en niveaux de gris (TIFF une seule page) avec leurs horodatages de trames, ainsi que les données de position comportementale au format CSV avec horodatages.

Peut-il convertir d'autres formats de fichiers ?

Non, cet outil est spécifique aux formats TIFF et CSV mentionnés. Il ne prend pas en charge des formats comme SpikeGLX, Open Ephys ou les vidéos.

Que se passe-t-il si les horodatages ne correspondent pas ?

L'outil tente d'aligner les horodatages et vérifie si l'écart reste dans une limite acceptable. En cas de problèmes majeurs ou d'informations manquantes, il peut échouer ou vous signaler la nécessité d'une correction manuelle.

Détails

Description originale de l’auteur

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

Popularité

Étoiles GitHub
51k
Position au classement
#3508
Licence
MIT
Mis à jour
15/10/2026

Ce skill vous est-il utile ?

0

Connectez-vous pour voter.

Commentaires

  • …

Autres skills de ce dépôt

Skills similaires