snapred.backend.dao.calibration package
Submodules
snapred.backend.dao.calibration.Calibration module
- class snapred.backend.dao.calibration.Calibration.Calibration(*, version: int | ~snapred.backend.dao.indexing.Versioning.VersionState, indexEntry: ~snapred.backend.dao.indexing.IndexEntry.IndexEntry, instrumentState: ~snapred.backend.dao.state.InstrumentState.InstrumentState, seedRun: str, useLiteMode: bool | ~numpy.bool, creationDate: float = <factory>, name: str, calibrantSamplePath: str | None = None, peakIntensityThreshold: float | None = None, **extra_data: ~typing.Any)
Bases:
CalculationParametersThe Calibration class acts as a container for parameters primarily utilized in fitting processes within the context of scientific data analysis. It encompasses static details such as the instrumentState indicating the condition of the instrument at the time of calibration, seedRun for identifying the initial data set, creationDate marking when the calibration was created, along with a name and a default version number.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'allow', 'strict': True, 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
snapred.backend.dao.calibration.CalibrationMetric module
- class snapred.backend.dao.calibration.CalibrationMetric.CalibrationMetric(*, sigmaAverage: float, sigmaStandardDeviation: float, strainAverage: float, strainStandardDeviation: float, twoThetaAverage: float)
Bases:
BaseModelThe CalibrationMetric class, built with Pydantic, is designed to capture and quantify the quality of a calibration relative to established standards and prior calibrations. It includes metrics such as sigmaAverage and sigmaStandardDeviation for assessing calibration consistency, alongside strainAverage and strainStandardDeviation to evaluate calibration strain. Additionally, it tracks the twoThetaAverage, possibly measured in degrees
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
snapred.backend.dao.calibration.CalibrationRecord module
- class snapred.backend.dao.calibration.CalibrationRecord.CalibrationRecord(*, version: int | ~snapred.backend.dao.indexing.Versioning.VersionState, indexEntry: ~snapred.backend.dao.indexing.IndexEntry.IndexEntry, runNumber: str, useLiteMode: bool, calculationParameters: ~snapred.backend.dao.calibration.Calibration.Calibration, hooks: ~typing.Dict[str, ~typing.List[~snapred.backend.dao.Hook.Hook]] | None = None, snapredVersion: str = <factory>, snapwrapVersion: str | None = <factory>, workspaces: ~typing.Dict[~snapred.meta.mantid.WorkspaceNameGenerator.Annotated[~snapred.meta.mantid.WorkspaceNameGenerator.WorkspaceType, FieldInfo(annotation=NoneType, required=True, json_schema_extra={'use_enum_values': True})], ~typing.List[~snapred.meta.mantid.WorkspaceNameGenerator.WorkspaceName]], crystalInfo: ~snapred.backend.dao.CrystallographicInfo.CrystallographicInfo, pixelGroups: ~typing.List[~snapred.backend.dao.state.PixelGroup.PixelGroup] | None = None, focusGroupCalibrationMetrics: ~snapred.backend.dao.calibration.FocusGroupMetric.FocusGroupMetric)
Bases:
CalibrationDefaultRecordThe CalibrationRecord class, serves as a comprehensive log of the inputs and parameters employed to produce a specific version of a calibration. It systematically records the runNumber, detailed crystalInfo from CrystallographicInfo, and the calibration parameters from Calibration. Additionally, it may include pixelGroups, a list of PixelGroup objects (intended to be mandatory in future updates), and focusGroupCalibrationMetrics derived from FocusGroupMetric to evaluate calibration quality. The workspaces dictionary maps WorkspaceType to lists of WorkspaceName, organizing the associated Mantid workspace names by type. An optional version number allows for tracking the calibration evolution over time.
- crystalInfo: CrystallographicInfo
- focusGroupCalibrationMetrics: FocusGroupMetric
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'ignore', 'strict': False, 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- pixelGroups: List[PixelGroup] | None
snapred.backend.dao.calibration.FocusGroupMetric module
- class snapred.backend.dao.calibration.FocusGroupMetric.FocusGroupMetric(*, focusGroupName: str, calibrationMetric: List[CalibrationMetric])
Bases:
BaseModelThe FocusGroupMetric class, built with Pydantic, links a specific FocusGroup with a collection of CalibrationMetric instances, facilitating a structured association between focus groups and their corresponding calibration metrics. It features a focusGroupName to identify the focus group, along with calibrationMetric, a list that encapsulates multiple CalibrationMetric objects. This design efficiently organizes calibration metrics by focus group, enhancing the analysis and comparison of calibration quality within specific groupings or contexts in scientific data processing.
- calibrationMetric: List[CalibrationMetric]
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].