nwb-conversion
ما الذي تفعله
تحوّل هذه المهارة بيانات تجارب علم الأعصاب إلى صيغة قياسية تسمى NWB. وتضمن حفظ المعلومات المهمة، مثل التوقيت والقياسات، بشكل صحيح، خاصةً لصور المجهر وبيانات الحركة.
متى تستخدمها
- ✓عندما تملك صور مجهر (TIFF) وبيانات مواقع سلوكية (CSV) تريد تحويلها.
- ✓عندما تحتاج إلى التأكد من تزامن توقيت الصور والحركة.
- ✓عندما تريد تنظيم بيانات التجربة والتحقق منها قبل مشاركتها أو تحليلها لاحقًا.
رابط المهارة
https://github.com/K-Dense-AI/scientific-agent-skills/blob/main/skills/nwb-conversion/SKILL.mdانسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.
طريقة الاستخدام
أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.
رسالة جاهزة للصق
لـ Claude Code أو Codex أو Cursor: شغّله داخل مجلد مشروعك وستُثبَّت المهارة.
نزّل ملف SKILL.md وضعه في مجلد مهارات وكيلك.
مثال على ما تطلبه من الذكاء الاصطناعي
“حوّل صورة TIFF وبيانات مواقع CSV الخاصة بي إلى صيغة NWB.”
5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.
كيف تعمل
تستخدم المهارة برنامجين اسمهما 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
…
الأسئلة الشائعة
ما أنواع البيانات التي تدعمها؟
تدعم صور المجهر ثنائية الفوتون ذات التدرج الرمادي (ملف 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
- آخر تحديث
- 15/10/2026
التعليقات
- …
المزيد من المهارات من هذا المستودع
13c-metabolic-flux
51kيقدّر التدفقات الأيضية باستخدام بيانات تتبع نظير الكربون-13. وهو مفيد لتحليل الأيض الخلوي والمسارات الكيميائية الحيوية.
adaptyv
51kيصمم تجارب توصيف البروتينات باستخدام Adaptyv API. يساعد في تقدير التكاليف وإرسال التسلسلات ومتابعة نتائج المختبر.
aeon
51kينفذ مهام تعلم الآلة على بيانات السلاسل الزمنية. وهو مفيد للتصنيف والتنبؤ وكشف الشذوذ وإيجاد الأنماط في البيانات المتسلسلة.
alphagenome
51kيبحث عن التأثيرات الجينومية المحسوبة مسبقًا للمتغيرات الوراثية. يقدم درجات وشروحات لفهم تأثير هذه المتغيرات على الجينوم.
مهارات مشابهة
discrawl
394kيتيح لوكيلك البحث في أرشيف محلي محفوظ لرسائل Discord وتلخيصه، والتحقق من مدى حداثته، وقراءة الرسائل المباشرة.
clickhouse-io
280kيساعد وكيلك على تحسين الاستعلامات والمخططات في ClickHouse وتطبيق أفضل ممارسات التحليل عالي الأداء، ويفيد عندما تكون الاستعلامات التحليلية بطيئة.
scientific-db-pubmed-database
280kيساعد وكيلك على البحث عن المقالات العلمية في المجال الطبي الحيوي. مفيد للبحوث التي تحتاج إلى معلومات طبية محددة.