Skip to content

Commit

Permalink
reverting changes to AnalysisSettings model.
Browse files Browse the repository at this point in the history
  • Loading branch information
edyoshikun committed Dec 12, 2023
1 parent 4540956 commit 0e2f8c4
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions mantis/analysis/AnalysisSettings.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@

import numpy as np

from pydantic import BaseModel, Extra, NonNegativeInt, PositiveFloat, PositiveInt, validator
from pydantic import ConfigDict, NonNegativeInt, PositiveFloat, PositiveInt, validator
from pydantic.dataclasses import dataclass

config = ConfigDict(extra="forbid")

# All settings classes inherit from MyBaseModel, which forbids extra parameters to guard against typos
class MyBaseModel(BaseModel, extra=Extra.forbid):
pass


class DeskewSettings(MyBaseModel):
@dataclass(config=config)
class DeskewSettings:
pixel_size_um: PositiveFloat
ls_angle_deg: PositiveFloat
px_to_scan_ratio: Optional[PositiveFloat] = None
Expand All @@ -37,7 +36,8 @@ def __post_init__(self):
raise TypeError("px_to_scan_ratio is not valid")


class RegistrationSettings(MyBaseModel):
@dataclass(config=config)
class RegistrationSettings:
source_channel_index: NonNegativeInt
target_channel_index: NonNegativeInt
affine_transform_zyx: list
Expand Down

0 comments on commit 0e2f8c4

Please sign in to comment.