Skip to content

[BEP032] Moved coord system related entities to correct yaml #2058

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: bep032
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions src/schema/rules/json/microephys.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#
# Groups of related metadata fields
#
# Assumptions: never need disjunction of selectors
# Assumptions: top-to-bottom overrides is sufficient logic

---

microephysCoordsystemGeneral:
selectors:
- datatype == ["ecephys", "icephys"]
- suffix == ["coordsystem"]
fields:
IntendedFor:
level: optional
description_addendum: |
# TODO


# Fields relating to the microephys electrode positions
microephysCoordsystemPositions:
selectors:
- datatype == ["ecephys", "icephys"]
- suffix == ["coordsystem"]
fields:
MicroEphysCoordinateSystem: required
MicroEphysCoordinateUnits: required
MicroEphysCoordinateSystemDescription:
level: recommended
level_addendum: required if `MicroEphysCoordinateSystem` is `"Other"`
MicroEphysCoordinateSystemPhoto:
level: optional
level_addendum: required if `MicroEphysCoordinateUnits` is `"pixels"`

microephysCoordsystemOther:
selectors:
- datatype == ["ecephys", "icephys"]
- suffix == ["coordsystem"]
- '"MicroEphysCoordinateSystem" in json'
- json.MicroEphysCoordinateSystem == "Other"
fields:
MicroEphysCoordinateSystemDescription: required
12 changes: 0 additions & 12 deletions src/schema/rules/sidecars/microephys.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,18 +65,6 @@ microephysPharmaceuticals:
PharmaceuticalDoseRegimen: recommended
PharmaceuticalDoseTime: recommended

# TODO: Check how to conditionally change level to required for photo if
# MicroephysCoordinateSystem is Pixels
microephysCoordsystemGeneral:
selectors:
- datatype == ["ecephys", "icephys"]
- suffix == "coordsystem"
fields:
MicroephysCoordinateSystem: required
MicroephysCoordinateSystemDescription: recommended
MicroephysCoordinateUnits: required
MicroephysCoordinateSystemPhoto: optional

microephysSupplementary:
selectors:
- datatype == ["ecephys", "icephys"]
Expand Down
Loading