Skip to content

Commit 0f5fcef

Browse files
committed
making MriScan.voxel_sizes optional
1 parent dccf1bd commit 0f5fcef

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/aind_data_schema/core/mri_session.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class MRIScan(AindModel):
5656
vc_position: Optional[Translation3dTransform] = Field(None, title="Scan position")
5757
subject_position: SubjectPosition = Field(..., title="Subject position")
5858
# other fields
59-
voxel_sizes: Scale3dTransform = Field(..., title="Voxel sizes", description="Resolution")
59+
voxel_sizes: Optional[Scale3dTransform] = Field(None, title="Voxel sizes", description="Resolution")
6060
processing_steps: List[
6161
Literal[
6262
ProcessName.FIDUCIAL_SEGMENTATION,
@@ -83,8 +83,8 @@ def validate_primary_scan(self):
8383
"""Validate that primary scan has vc_orientation and vc_position fields"""
8484

8585
if self.primary_scan:
86-
if not self.vc_orientation or not self.vc_position:
87-
raise ValueError("Primary scan must have vc_orientation and vc_position")
86+
if not self.vc_orientation or not self.vc_position or not self.voxel_sizes:
87+
raise ValueError("Primary scan must have vc_orientation, vc_position, and vozels_sizes fields")
8888

8989

9090
class MriSession(AindCoreModel):

0 commit comments

Comments
 (0)