snapred.backend.dao.ingredients package
Submodules
snapred.backend.dao.ingredients.CalibrationMetricsWorkspaceIngredients module
- class snapred.backend.dao.ingredients.CalibrationMetricsWorkspaceIngredients.CalibrationMetricsWorkspaceIngredients(*, runNumber: int, version: int | VersionState, focusGroupCalibrationMetrics: FocusGroupMetric, timestamp: float | None = None)
Bases:
BaseModelThe CalibrationMetricsWorkspaceIngredients class is designed to encapsulate the essential components required for generating workspaces dedicated to calibration metrics. It includes a calibrationRecord to reference the specific calibration data being analyzed and an optional timestamp to mark the time of workspace generation.
- focusGroupCalibrationMetrics: FocusGroupMetric
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
snapred.backend.dao.ingredients.DiffractionCalibrationIngredients module
- class snapred.backend.dao.ingredients.DiffractionCalibrationIngredients.DiffractionCalibrationIngredients(*, runConfig: ~snapred.backend.dao.RunConfig.RunConfig, pixelGroup: ~snapred.backend.dao.state.PixelGroup.PixelGroup, groupedPeakLists: ~typing.List[~snapred.backend.dao.GroupPeakList.GroupPeakList], convergenceThreshold: float = <factory>, peakFunction: ~snapred.meta.mantid.AllowedPeakTypes.SymmetricPeakEnum = <factory>, maxOffset: float = <factory>, maxChiSq: float = <factory>, removeBackground: bool = False)
Bases:
BaseModelThe DiffractionCalibrationIngredients class encapsulates all the necessary components for conducting diffraction calibration. It contains a runConfig for the calibration run settings, a pixelGroup specifying the group of pixels under consideration, and a list of groupedPeakLists detailing the peaks identified in each group. Additionally, it defines a convergenceThreshold for calibration accuracy, a peakFunction selected based on system configuration for modeling the peaks, and a maxOffset limit for calibration adjustments.
- groupedPeakLists: List[GroupPeakList]
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- peakFunction: SymmetricPeakEnum
- pixelGroup: PixelGroup
snapred.backend.dao.ingredients.GroceryListItem module
- class snapred.backend.dao.ingredients.GroceryListItem.GroceryListItem(*, workspaceType: Literal['neutron', 'grouping', 'diffcal', 'diffcal_output', 'diffcal_diagnostic', 'diffcal_table', 'diffcal_mask', 'normalization', 'reduction_pixel_mask'], useLiteMode: bool, loader: Literal['', 'LoadCalibrationWorkspaces', 'LoadNexusMonitors', 'LoadEventNexus', 'LoadGroupingDefinition', 'LoadLiveDataInterval', 'LoadNexus', 'LoadNexusProcessed'] = '', numberTag: int | None = None, runNumber: str | None = None, normCalVersion: int | None = None, diffCalVersion: int | None = None, diffCalFilePath: Path | None = None, timestamp: float | None = None, groupingScheme: str | None = None, unit: Literal['TOF', 'DSP', 'diagnostic'] | None = None, instrumentPropertySource: Literal['InstrumentName', 'InstrumentFilename', 'InstrumentDonor'] | None = None, instrumentSource: str | None = None, liveDataArgs: LiveDataArgs | None = None, keepItClean: bool = True, hidden: bool = False, propertyName: str | None = None, state: str | None = None)
Bases:
BaseModelHolds necessary information for a single item in grocery list
- builder()
- instrumentPropertySource: Literal['InstrumentName', 'InstrumentFilename', 'InstrumentDonor'] | None
- liveDataArgs: LiveDataArgs | None
- loader: Literal['', 'LoadCalibrationWorkspaces', 'LoadNexusMonitors', 'LoadEventNexus', 'LoadGroupingDefinition', 'LoadLiveDataInterval', 'LoadNexus', 'LoadNexusProcessed']
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
snapred.backend.dao.ingredients.NormalizationIngredients module
- class snapred.backend.dao.ingredients.NormalizationIngredients.NormalizationIngredients(*, pixelGroup: PixelGroup, calibrantSample: CalibrantSample, detectorPeaks: List[GroupPeakList])
Bases:
BaseModelClass to hold the ingredients necessary for normalization calibration workflow
- calibrantSample: CalibrantSample
- detectorPeaks: List[GroupPeakList]
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- pixelGroup: PixelGroup
snapred.backend.dao.ingredients.PeakIngredients module
- class snapred.backend.dao.ingredients.PeakIngredients.PeakIngredients(*, instrumentState: InstrumentState, crystalInfo: CrystallographicInfo, pixelGroup: PixelGroup, peakIntensityThreshold: float)
Bases:
BaseModelClass to hold the ingredients for various peak manipulation algorithms
- crystalInfo: CrystallographicInfo
- instrumentState: InstrumentState
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- pixelGroup: PixelGroup
snapred.backend.dao.ingredients.PixelGroupingIngredients module
- class snapred.backend.dao.ingredients.PixelGroupingIngredients.PixelGroupingIngredients(*, instrumentState: ~snapred.backend.dao.state.InstrumentState.InstrumentState, groupingScheme: str | None = None, nBinsAcrossPeakWidth: int = <factory>)
Bases:
BaseModelClass to hold the ingredients necessary for pixel grouping parameter calculation.
- instrumentState: InstrumentState
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
snapred.backend.dao.ingredients.ReductionIngredients module
- class snapred.backend.dao.ingredients.ReductionIngredients.ReductionIngredients(*, runNumber: str, useLiteMode: bool, timestamp: float, pixelGroups: List[PixelGroup], unmaskedPixelGroups: List[PixelGroup], detectorPeaksMany: List[List[GroupPeakList]] | None = None, smoothingParameter: float | None, calibrantSamplePath: str | None, peakIntensityThreshold: float | None, keepUnfocused: bool, isDiagnostic: bool = True, convertUnitsTo: str, artificialNormalizationIngredients: ArtificialNormalizationIngredients | None = None)
Bases:
BaseModelData class to hold the ingredients for each subrecipe of reduction and itself
- detectorPeaksMany: List[List[GroupPeakList]] | None
- getDetectorPeaks(groupingIndex: int) List[GroupPeakList]
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- pixelGroups: List[PixelGroup]
- preprocess() PreprocessReductionIngredients
- unmaskedPixelGroups: List[PixelGroup]