Repository navigation
Fix conversion errors found by the nwb-convert benchmark (0.2.0) #43
Copy link
Copy link
Closed
Description
Over the past few weeks I have been building an NWB conversion benchmark that has AI agents convert the Seiler et al. 2022 data from the raw files and then scores their output against the published conversion in DANDI:000971. Tracing the discrepancies between the agents and the reference back to the source data showed that a number of them were errors in this repository's conversion, not in the agents. This issue tracks fixing them for a 0.2.0 release and re-uploading the corrected files to 000971.
Each fix gets its own issue and PR, linked below as they are opened.
- Bump the version to 0.2.0 (Bump version to 0.2.0 #44)
- Session start times use pytz
US/Centralwithdatetime.replace, which attaches the zone's local mean time (-05:51). Every file is off by 9 or 51 minutes depending on the date. UseZoneInfo("America/Chicago"). (Session start times carry a -05:51 offset from pytz #45, Fix session start time zone #46) - 135 DLS Excitatory sessions are converted twice: once from the per-subject folders and once from the by-date MED-PC files with treatment "Unknown". (DLS Excitatory runs are converted twice, once with treatment Unknown #47, Skip duplicated DLS Excitatory sessions #48)
- When two runs share a start time in a mouse's MED-PC file and the one whose
Subject:field names a different mouse is listed first, the conversion reads that run. This happened for 346.394 on 2020-07-31 and 344.400 on 2020-07-30, whose runs matching the file name were never converted. (Runs sharing a start time in a mouse's MED-PC file: the wrong one is converted #51, Read the file's own mouse's run when runs share a start time #52) - The CSV behavior reader never reads the shock column
H, so 13 footshock-probe sessions converted from CSV have nofootshock_times. (Footshock times are dropped from sessions converted from CSV #53, Read footshock times from CSV exports #54) - An
OptogeneticSeriesis added at reward times for every opto session that is not a probe, including 166 sessions on programs that never drive the laser (mostly DMS Inhibitory Group 2 FR1 days), and 8 scrambled sessions without stimulation get a zero-power placeholder series. (Optogenetic stimulation is added to sessions on programs that never drive the LED #55, Add optogenetic stimulation only for LED programs #56) - In the sessions recorded across two TDT blocks, the second block's reward onsets are shifted in place, so its rewarded nose pokes are shifted twice: 6 duplicated right nose pokes in 139.298 (2019-09-12) and 16 misplaced left nose pokes in 92.246 (2019-02-27). (Rewarded nose pokes in split TDT sessions are shifted twice #57, Stop shifting the second TDT block's reward TTLs twice #58)
- The three sessions recorded across two TDT blocks (139.298 on 2019-09-12, 332.393 on 2020-07-28, 92.246 on 2019-02-27) place the second block right after the first, dropping the gap between them, and 332.393 keeps its rewards and left nose pokes on the MED-PC clock. (Sessions recorded in two TDT blocks lose the time between blocks #65, Place each TDT block of a split session at its own start time #66)
- The institution is spelled "Northwestern Unitersity" in every file. (Institution is misspelled in every file #67, Fix the institution name #68)
- 262.259's 2021-10-29 run is labeled NpHRScrambled although its program and the demographics sheet both say NpHR. That run is the only published session of mouse 262.478, whose other 21 sessions were skipped after its ID was changed to 262.259 in our copy of the sheet. (Mouse 262.478 is skipped and its one published session is mislabeled #61, Convert mouse 262.478 #62)
- 290.407 and 291.407's runs on 2020-09-23 and 2020-09-24 are filed as DLS Excitatory, while the demographics sheet and all of their later sessions put them in DMS Excitatory (290.407 random-nosepoke stimulation, 291.407 control). (290.407 and 291.407's first two days are filed under DLS Excitatory #59, File 290.407 and 291.407's first days under DMS Excitatory #60)
- The port entry duration check falls back to
Uonly onTypeError, so converting without a cachedsessions_without_port_entry_durations.yamlfails on every probe test. (Port entry duration check fails on probe test sessions without a cached yaml #49, Fix port entry duration fallback for single-line E #50) - Six runs saved in another mouse's MED-PC file are converted as that mouse; their
Subject:field, box and program match the mouse they belong to. (Single MED-PC runs whose Subject field disagrees with the file name #64, Assign six misfiled runs to the mouse they belong to #69) - Eight runs that share a start time with another run in the same MED-PC file are never converted. (Runs sharing a start time with another run in the same file are never converted #70, Convert eight runs that share a start time with another run in the same file #71)
- Re-convert the full dataset, compare it with the published files, run NWB Inspector, and upload to 000971. Moved to Re-convert and upload DANDI:000971 for 0.2.0 #72.
🤖 Generated with Claude Code
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity