Use clean fiber photometry terms; add photometry table and device types - #1
Conversation
Use "fiber photometry approach" and "fiber photometry technique" for the photometry types. Semicolon-joined strings like "fiber photometry technique; optical technique" would become a single unfacetable term, and "calcium imaging" is inaccurate for the many photometry datasets using dLight or GRAB sensors to measure neurotransmitters rather than calcium. Add the metadata table types from the deprecated ndx-photometry and the container, table, and device types from ndx-fiber-photometry so files carrying only those are still marked. Drop the unused dandi/metadata/neurodata_typemap.py for now; the expanded map can be reintroduced when it is wired into the code. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Wuywpnnb3Q57q6oeMZ4God
68a0ce1 to
88adc13
Compare
|
dandi-cli does not disambiguate based on namespace, but it should. That's a larger change, though, outside the scope of these PRs. Since matching is done by exact string match and subtypes do not inherit, we can also add Re: the semicolon issue, this is a pre-existing pattern. For example, I agree that "calcium imaging" is inappropriate for many photometry data. Whether calcium was imaged can be detected using OK to delete Since I know you're out of office, I'll make the above changes to your PR and merge it so that we keep the momentum going. |
|
Thanks for bringing this back and suggesting dropping the |
|
Looks like I can't modify this PR directly even though |
This implements the changes I proposed in dandi#1665, targeting your
add_ndtypesbranch so they land there rather than as a competing PR.The photometry types now use "fiber photometry approach" and "fiber photometry technique" as plain single terms. The semicolon-joined strings would each have become a single unfacetable
MeasurementTechniqueTypename, and "calcium imaging" is inaccurate for the many photometry dandisets that use dLight or GRAB sensors to measure neurotransmitters rather than calcium (000251, 000351, and 001434 are examples). With single terms per type, the existingstr | Nonefields are sufficient, so the map's structure is unchanged. If we later want a type to emit multiple terms,BareAsset.measurementTechniqueand.approachare already lists in dandischema, so that would be a CLI-only change.I also added the metadata table types from the deprecated ndx-photometry (FibersTable, ExcitationSourcesTable, PhotodetectorsTable, FluorophoresTable) and the container, table, and device types from ndx-fiber-photometry (FiberPhotometry, FiberPhotometryTable, OpticalFiber, ExcitationSource, Photodetector, Indicator), so files carrying only those still get marked. For reference, the smaller sessions in 001632 contain no photometry types at all, only the events tables, so they will remain unmarked regardless.
I dropped
dandi/metadata/neurodata_typemap.pyfor now since nothing imports it and it would drift from the map inutil.py. I think the expanded map is valuable and worth reintroducing once it is wired in as the single source of truth, ideally together with theorganize.pychange that would make themodulefield drive filename suffixes.Tests updated accordingly, including a new case checking that the ndx-photometry tables alone produce the photometry approach.
test_metadata.pypasses locally.🤖 Generated with Claude Code
https://claude.ai/code/session_01Wuywpnnb3Q57q6oeMZ4God