Repository navigation
Element: decided device kinds for every probe type; batch-4 carries - #304
Merged
Merged
Conversation
… per batch 4 [element types batch 1] .. [element types batch 4] (Jess Haley, 2026-10-30, did-schema V_eta_go_forward_class_audit.md): - elementDeviceKind holds all 22 device types: patch* -> EMPTY:0000411, sharp* -> EMPTY:0000412, the four imaging types -> OBI:0400169, lick-spout -> EMPTY:0000414, reward-well -> EMPTY:0000415, electrode-$ -> NCIT:C49936, beside the kinds already built. - wide-field-imaging and brightfield-imaging are devices (microscope), no longer carried under carry-121. - stimulator, event, electrode-<spec>, <prefix>_electrode-<spec>, neuron and cell are carried whole as v1, needs_mapping (carry-063). - The "element type" assertion is replaced by the device kind where the kind alone rebuilds the v1 word (did2.convert.elementTypeOfKind); it is kept for a kind several types share (patch, sharp, microscope: their modes go on the recording observation, not all decided) and for sorted units and ensembles. - The element round trip, the probe-map round trip and resolveEpochProbemap read the type from the kind when the assertion is absent. Tests: testEveryDeviceHasItsDecidedKind and testTheElementTypeAssertionIsKeptOnlyWhereTheKindDoesNotRebuildIt replace testADecidedDeviceKindIsAnEquipmentTypeAssertion; the converted and carried round-trip lists follow the batches; the stimulator test is inverted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FxKLA8Tbf9cpvDe7fuVeKf
Merges origin/V2 (through #311), including #299 [element name and reference stored apart]: carry-055 is gone, a reference neither one number nor one text is carry-120, a non-empty base.name is carry-149, a unit whose probe is not in the batch is carry-151. Conflicts, both sides kept: - +migrators_j/element.m header: V2's element.name / local_identifier rows (carry-048 / carry-120) with this branch's element.type rows (device kind, element type assertion only where the kind does not rebuild the word). - +roundtrip/element.m header: V2's name/reference rows and pre-2026-10-29 fallback with this branch's element.type-from-kind row. - testRawV1RoundTripElement: V2's header row and tests; this branch's testEveryDeviceHasItsDecidedKind and testTheElementTypeAssertionIsKeptOnlyWhereTheKindDoesNotRebuildIt; the carried list is this branch's (stimulator, event, electrode spellings, neuron, cell, lfp, patch on a non-probe class) plus V2's carry-120, carry-048 and carry-151 rows, without the carry-055 rows (V2 converts them) and without the carry-121 rows (batch 2 makes them microscopes). testGroupIsWrittenAsTheRegistryNamesIt and testAUnitThatDisagreesWithItsProbeIsCarried, which #299 removed with no replacement while its header still cites carry-120 for the unit case, are kept. Added on the merge: - resolveEpochProbemap writes the decided recording / imaging mode as the recording observation's method term ([element type is a device kind term], [imaging mode is a method term], [element types batch 1], [element types batch 2], [cell-attached is OBI]): patch-attached OBI:0002179, brightfield-imaging EMPTY:0000300; counter mode_methods_written, rendered by census_digest.py. Test: testMigratorsJRecordingObservation/testTheDecidedModeIsTheObservationsMethodTerm. - testRawV1RoundTripBath/testTheSwitchChangesNoBath compares the carried stimulator element by id only: a carried document is its v1 source as each path spells it (it failed on #304's head, CI run of 41ab1d6). No file cites carry-055 or carry-121. MATLAB has not run on this merge. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FxKLA8Tbf9cpvDe7fuVeKf
Collaborator
Author
|
Merged Conflicts and how they were resolvedThree files conflicted. Both sides were kept in each.
Added on the merge
Superseded items in the PR body
Python checks on 963c578 (all exit 0)
Left for did-schemacarry-121 is cited by no DID-matlab site: no 🤖 Generated with Claude Code https://claude.ai/code/session_01FxKLA8Tbf9cpvDe7fuVeKf Generated by Claude Code |
Builds the DID-matlab part of [stimulator is SNOMED CT Stimulator] (Decided by Jess Haley, 2026-10-30, did-schema V_eta_go_forward_class_audit.md), which replaces item (4) of [element types batch 4]: a v1 `stimulator` element is a device of kind SNOMEDCT:36645008 "Stimulator" instead of being carried (carry-063). - elementDeviceKind: the stimulator row; it leaves the NOT HERE list. - element.m: stimulator moves from the carried list to the device list; its kind is the only one with that node, so the kind alone rebuilds the v1 word and the `element type` assertion is dropped, as for n-trode. - Tests: testRawV1RoundTripElement converts and round-trips a stimulator probe, pins its kind and the dropped assertion, and no longer lists it as carried; testMigratorsJRecordingObservation inverts the carried stimulator test (a device, Equipment Type SNOMEDCT:36645008, no observation, `observes` kept); testRawV1RoundTripBath's comment no longer says the stimulator is carried. The term registry row and the Equipment Type value are on did-schema #246, not yet on main. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FxKLA8Tbf9cpvDe7fuVeKf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Builds the DID-matlab part of these decisions, all in did-schema
V_eta_go_forward_class_audit.md: [element type is a device kind term] (2026-10-27), [element types batch 1] .. [element types batch 4] (2026-10-30), [n-trode is a multielectrode array]. No MATLAB in the authoring container: CI is the first run.Built
+convert/elementDeviceKind.mnow covers all 22 device types on anndi.probe.*class:electrode-$-> NCIT:C49936NCIT:C49936's registry row is on did-schema doc2sql: cell arrays are stored as a size/class summary, because iscell(matlabType) is always false #241, which is not merged.
did2.convertturns TermRegistry off while it migrates, and no test here validates anelectrode-$device.New
+convert/elementTypeOfKind.m: returns the one v1 type that a kind maps back to. It returns '' when no type, or several types, share the kind.+migrators_j/element.m:electrode-<spec>and<prefix>_electrode-<spec>, neuron and cell. Already carried before: position/distance, derived copies, '', lfp, field, sharp-I, display, stim-n-trode, n-LED and any other string.unitQualityLabels. A unit with no label is carried under carry-062. ensemble -> Group.element typeassertion is dropped where the device kind alone rebuilds the v1 word: n-trode, electrode-$, lick-spout, reward-well, intraoral-cannula, optogenetic-fiber, ecg, eeg, accelerometer, thermometer, ppg.resolveEpochProbemapmints, not this migrator.resolveEpochProbemapkeys their epochs on the assertion.Readers of the type:
+roundtrip/element.m,+roundtrip/private/manifestProbemap.m(probe-map row type) andresolveEpochProbemap.m(element_epoch tallies) now fall back to the kind when there is noelement typeassertion.Tests:
testRawV1RoundTripElement:testEveryDeviceHasItsDecidedKindchecks all 22 types plus a table-equality check againstelementDeviceKind.testTheElementTypeAssertionIsKeptOnlyWhereTheKindDoesNotRebuildItcovers when the assertion is dropped or kept.testADecidedDeviceKindIsAnEquipmentTypeAssertionis removed (it is inverted by the two above).testMigratorsJRecordingObservation: the stimulator test is inverted (the element is carried). Comments are updated for the electrode spelling and imaging.Python checks pass:
check_carry_citations --did-schema,check_migrator_roster, and every python step oftest-migrators-quick.yml.Must wait before merge
element typeassertion first. On NDI-matlab V2 3e0a2ca the readers are+vintage/elementFields.m(f.type),+migrate/+internal/pathSPromotion.m(idx.elements) and+vintage/elementLabel.m. Dropping the assertion for n-trode and the other single-type kinds leavesf.typeempty in NDI's object layer for those devices. Per did-schema CLAUDE.md section 3 ("the writers and readers ... change first"), NDI-matlab must read the device kind (withelementTypeOfKind's map) before this merges.TestElementLabelMatchesMigratorstill passes: both labels are still written, and'ndi element class'is written at exactly one site.Left open
resolveEpochProbemapmints from the probe-map row. Voltage, current, 1p, 2p and wide-field modes are not decided. Until they are written, theelement typeassertion is kept for patch*, sharp* and imaging.resolveEpochProbemap(it already parses the devicestring channels). It also needs:ndi element classis still written: [ndi element class not kept] waits on NDI readers.whentext ("not on the element type list") covers the batch-4 carries, but itsdecisioncites [element types have no default], not [element types batch 4].% carry-register: none.Doubts
stimulatortriggers [dependents of a carried document carry] (carry-064), which carries its element_epochs and other converted documents that point at it. The probe-map stimulator manipulation then has noinstrument_id. A deferred bath (resolved after pass 1) still names the carried v1 stimulator asinstrument_id. This affects Dab baths and vhlab stimulus data broadly.testRawV1RoundTripElement.m. Store a migrated element's name apart from its reference #299 moves the device-kind test block and edits the carried list next to the rows this PR changes.group; [migrator writes the registry spelling] givesGroup(NCIT:C43359).Generated by Claude Code