Skip to content

Commit 92b8741

Browse files
docs: improve docstring (#1748)
* docs: improve docstring * docs: update specimen ID * docs: clarify suffix * docs: better writing * update docs * fix: bad merge * update docs --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 5af27b9 commit 92b8741

8 files changed

Lines changed: 17 additions & 9 deletions

File tree

docs/source/acquisition.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ while the StimulusEpoch represents all stimuli being presented.
7878
| Field | Type | Title (Description) |
7979
|-------|------|-------------|
8080
| `subject_id` | `str` | Subject ID (Unique identifier for the subject) |
81-
| `specimen_id` | `str or List[str] or NoneType` | Specimen ID (Specimen ID(s) used in this acquisition. Required for in vitro imaging modalities.) |
81+
| `specimen_id` | `str or List[str] or NoneType` | Specimen ID (Required for in vitro modalities. Standard format is {subject_id} with a _### suffix, as needed) |
8282
| `acquisition_start_time` | `datetime (timezone-aware)` | Acquisition start time (During validation, timezone information will be moved into the acquisition_start_tz field.) |
8383
| `acquisition_start_tz` | `int or pydantic_extra_types.timezone_name.TimeZoneName or NoneType` | Acquisition start timezone (Automatically populated by a validator based on acquisition_start_time. Will be a TimeZoneName (IANA name) when the datetime uses a ZoneInfo timezone, or an integer UTC offset in hours for fixed-offset timezones. Use ZoneInfo (from the zoneinfo standard library) to preserve the named timezone.) |
8484
| `acquisition_end_time` | `datetime (timezone-aware)` | Acquisition end time |

docs/source/aind_data_schema_models/harp_types.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,12 @@ Harp device types
1010
|------|------|------|
1111
| `ANALOGINPUT` | `AnalogInput` | `1236` |
1212
| `ARCHIMEDES` | `Archimedes` | `1136` |
13+
| `AUDIOSWITCH` | `AudioSwitch` | `1248` |
1314
| `BEHAVIOR` | `Behavior` | `1216` |
1415
| `CAMERACONTROLLER` | `CameraController` | `1168` |
1516
| `CAMERACONTROLLERGEN2` | `CameraControllerGen2` | `1170` |
1617
| `CLOCKSYNCHRONIZER` | `ClockSynchronizer` | `1152` |
18+
| `CURRENTDRIVER` | `CurrentDriver` | `1282` |
1719
| `CUTTLEFISH` | `cuTTLefish` | `1403` |
1820
| `CUTTLEFISHFIP` | `cuTTLefishFip` | `1407` |
1921
| `DRIVER12VOLTS` | `Driver12Volts` | `1072` |
@@ -22,6 +24,7 @@ Harp device types
2224
| `HOBGOBLIN` | `Hobgoblin` | `123` |
2325
| `IBL_BEHAVIOR_CONTROL` | `Ibl_behavior_control` | `2080` |
2426
| `INPUTEXPANDER` | `InputExpander` | `1106` |
27+
| `LASERDRIVERCONTROLLER` | `LaserDriverController` | `1298` |
2528
| `LEDCONTROLLER` | `LedController` | `1088` |
2629
| `LICKETYSPLIT` | `LicketySplit` | `1400` |
2730
| `LOADCELLS` | `LoadCells` | `1232` |
@@ -33,7 +36,7 @@ Harp device types
3336
| `POKE` | `Poke` | `1024` |
3437
| `PYCONTROLADAPTER` | `PyControlAdapter` | `1184` |
3538
| `RFIDREADER` | `RfidReader` | `2094` |
36-
| `RGBARRAY` | `RgbArray` | `1248` |
39+
| `RGBARRAY` | `RgbArray` | `1264` |
3740
| `SIMPLEANALOGGENERATOR` | `SimpleAnalogGenerator` | `1121` |
3841
| `SNIFFDETECTOR` | `SniffDetector` | `1401` |
3942
| `SOUNDCARD` | `SoundCard` | `1280` |

docs/source/components/specimen_procedures.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Description of a single planar section of brain tissue
4141
| `thickness` | `Optional[float]` | Slice thickness |
4242
| `thickness_unit` | Optional[[SizeUnit](../aind_data_schema_models/units.md#sizeunit)] | Slice thickness unit |
4343
| `partial_slice` | Optional[List[[AnatomicalRelative](../aind_data_schema_models/coordinates.md#anatomicalrelative)]] | Partial slice (If sectioning does not include the entire slice, indicate which part of the slice is retained.) |
44-
| `output_specimen_id` | `str` | Specimen ID |
44+
| `output_specimen_id` | `str` | Specimen ID (Output IDs should generally follow the format {input_specimen_id}_###) |
4545
| `targeted_structure` | Optional[[BrainAtlas](../aind_data_schema_models/brain_atlas.md#ccfv3)] | Targeted structure |
4646
| `includes_surrounding_tissue` | `Optional[bool]` | Includes surrounding tissue (Whether the section includes additional tissue surrounding the targeted structure.) |
4747

@@ -63,7 +63,7 @@ Description of a single section of brain tissue. Slices should use PlanarSection
6363

6464
| Field | Type | Title (Description) |
6565
|-------|------|-------------|
66-
| `output_specimen_id` | `str` | Specimen ID |
66+
| `output_specimen_id` | `str` | Specimen ID (Output IDs should generally follow the format {input_specimen_id}_###) |
6767
| `targeted_structure` | Optional[[BrainAtlas](../aind_data_schema_models/brain_atlas.md#ccfv3)] | Targeted structure |
6868
| `includes_surrounding_tissue` | `Optional[bool]` | Includes surrounding tissue (Whether the section includes additional tissue surrounding the targeted structure.) |
6969
| <del>`coordinate_system_name`</del> | `Optional[str]` | **[DEPRECATED]** Use PlanarSection instead. Coordinate system name |

docs/source/components/surgery_procedures.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ Description of a perfusion procedure that creates a specimen
147147
| Field | Type | Title (Description) |
148148
|-------|------|-------------|
149149
| `protocol_id` | `Optional[str]` | Protocol ID (DOI for protocols.io) |
150-
| `output_specimen_ids` | `List[str]` | Specimen ID (IDs of specimens resulting from this procedure.) |
150+
| `output_specimen_ids` | `List[str]` | Specimen ID (IDs of specimens resulting from this procedure. Whole brains can use the {subject_id}, partial sections should always include a suffix {subject_id}_###) |
151151

152152

153153
### ProbeImplant

examples/processing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
""" example processing """
1+
"""example processing"""
22

33
import argparse
44
from datetime import datetime, timezone

src/aind_data_schema/components/specimen_procedures.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ class SectionOrientation(str, Enum):
2828
class Section(DataModel):
2929
"""Description of a single section of brain tissue. Slices should use PlanarSection."""
3030

31-
output_specimen_id: str = Field(..., title="Specimen ID")
31+
output_specimen_id: str = Field(
32+
..., title="Specimen ID", description="Output IDs should generally follow the format {input_specimen_id}_###"
33+
)
3234
targeted_structure: Optional[BrainStructureModel] = Field(default=None, title="Targeted structure")
3335
includes_surrounding_tissue: Optional[bool] = Field(
3436
default=None,

src/aind_data_schema/components/surgery_procedures.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,10 @@ class Perfusion(DataModel):
221221
output_specimen_ids: List[str] = Field(
222222
...,
223223
title="Specimen ID",
224-
description="IDs of specimens resulting from this procedure.",
224+
description=(
225+
"IDs of specimens resulting from this procedure."
226+
" Whole brains can use the {subject_id}, partial sections should always include a suffix {subject_id}_###"
227+
),
225228
)
226229

227230
@field_validator("output_specimen_ids", mode="before")

src/aind_data_schema/core/acquisition.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ class Acquisition(DataCoreModel):
362362
specimen_id: Optional[Union[str, List[str]]] = Field(
363363
default=None,
364364
title="Specimen ID",
365-
description="Specimen ID(s) used in this acquisition. Required for in vitro imaging modalities.",
365+
description="Required for in vitro modalities. Standard format is {subject_id} with a _### suffix, as needed",
366366
)
367367

368368
# Acquisition metadata

0 commit comments

Comments
 (0)