Skip to content
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

refactor: move ground wire information into its own procedures #1243

Open
wants to merge 5 commits into
base: release-v2.0.0
Choose a base branch
from
Open
Changes from 2 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
22 changes: 16 additions & 6 deletions src/aind_data_schema/core/procedures.py
dbirman marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -361,18 +361,26 @@ class Headframe(DataModel):
well_type: Optional[str] = Field(default=None, title="Well type")


class GroundWireImplant(DataModel):
"""Ground wire implant procedure"""

procedure_type: Literal["Ground wire implant"] = "Ground wire implant"
ground_electrode_location: MouseAnatomicalStructure.ONE_OF = Field(..., title="Location of ground electrode")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be valuable to have a sublist of structures that we anticipate using for the ground electrode. We currently use BODY_PARTS for the EMG ground wire position, could we make a list called something ~ GROUND_WIRE_PARTS or GROUND_WIRE_LOCATIONS that has all of those plus brain? The full list of anatomical structures is super long and for people using the GUI it will be impossible to navigate


ground_wire_hole: Optional[int] = Field(default=None, title="Ground wire hole")
ground_wire_material: Optional[GroundWireMaterial] = Field(default=None, title="Ground wire material")
ground_wire_diameter: Optional[Decimal] = Field(default=None, title="Ground wire diameter")
ground_wire_diameter_unit: Optional[SizeUnit] = Field(default=None, title="Ground wire diameter unit")


class ProtectiveMaterialReplacement(DataModel):
"""Description of a protective material replacement procedure in preparation for ephys recording"""

procedure_type: Literal["Ground wire"] = "Ground wire"
procedure_type: Literal["Protective material"] = "Protective material"
protocol_id: str = Field(..., title="Protocol ID", description="DOI for protocols.io")
protective_material: ProtectiveMaterial = Field(
..., title="Protective material", description="New material being applied"
)
ground_wire_hole: Optional[int] = Field(default=None, title="Ground wire hole")
ground_wire_material: Optional[GroundWireMaterial] = Field(default=None, title="Ground wire material")
ground_wire_diameter: Optional[Decimal] = Field(default=None, title="Ground wire diameter")
ground_wire_diameter_unit: Optional[SizeUnit] = Field(default=None, title="Ground wire diameter unit")
well_part_number: Optional[str] = Field(default=None, title="Well part number")
well_type: Optional[str] = Field(default=None, title="Well type")

Expand Down Expand Up @@ -623,7 +631,9 @@ class MyomatrixContact(DataModel):
class MyomatrixThread(DataModel):
"""Description of a thread of a myomatrix array"""

ground_electrode_location: MouseAnatomicalStructure.BODY_PARTS = Field(..., title="Location of ground electrode")
ground_electrode: bool = Field(
..., title="Connected to a ground electrode", description="Ground electrode implant is in a separate procedure"
)
contacts: List[MyomatrixContact] = Field(..., title="Contacts")


Expand Down
Loading