snapred.backend.dao.request package
Submodules
snapred.backend.dao.request.CalibrationAssessmentRequest module
- class snapred.backend.dao.request.CalibrationAssessmentRequest.CalibrationAssessmentRequest(*, run: ~snapred.backend.dao.RunConfig.RunConfig, useLiteMode: bool, focusGroup: ~snapred.backend.dao.state.FocusGroup.FocusGroup, calibrantSamplePath: str, workspaces: ~typing.Dict[~snapred.meta.mantid.WorkspaceNameGenerator.WorkspaceType, ~typing.List[~snapred.meta.mantid.WorkspaceNameGenerator.WorkspaceName]], peakFunction: ~snapred.meta.mantid.AllowedPeakTypes.PeakFunctionEnum, crystalDMin: float, crystalDMax: float, nBinsAcrossPeakWidth: int, fwhmMultipliers: ~snapred.backend.dao.Limit.Pair[float] = <factory>, maxChiSq: float = <factory>, combinedPixelMask: ~snapred.meta.mantid.WorkspaceNameGenerator.WorkspaceName | None = None)
Bases:
BaseModelThe CalibrationAssessmentRequest class is crafted to streamline the process of initiating a calibration assessment for a specific run, set against standard crystal data typically provided through a cif file. It incorporates a run configuration, mapping various workspaces by their type to workspace names for analytical context, and specifies a focusGroup for targeted assessment. The calibrantSamplePath points to the sample data, while useLiteMode, nBinsAcrossPeakWidth, peakIntensityThreshold, and peakFunction define the assessment’s operational parameters, with defaults set according to system configurations.
- combinedPixelMask: WorkspaceName | None
- focusGroup: FocusGroup
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- peakFunction: PeakFunctionEnum
- workspaces: Dict[WorkspaceType, List[WorkspaceName]]
snapred.backend.dao.request.CalibrationExportRequest module
- class snapred.backend.dao.request.CalibrationExportRequest.CalibrationExportRequest(*, createRecordRequest: CreateCalibrationRecordRequest)
Bases:
BaseModelThe CalibrationExportRequest class facilitates the process of saving completed and satisfactorily assessed calibrations to disk. It acts as a conduit for passing the outcomes of the calibration assessment step back to the system, including both the calibrationRecord, which details the calibration process and parameters, and the calibrationIndexEntry, which indexes the calibration for reference.
- createRecordRequest: CreateCalibrationRecordRequest
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
snapred.backend.dao.request.CalibrationIndexRequest module
- class snapred.backend.dao.request.CalibrationIndexRequest.CalibrationIndexRequest(*, run: RunConfig)
Bases:
BaseModelThe CalibrationIndexRequest class is designed to facilitate the retrieval of calibration records that match the instrument state of a specific run. By including a run configuration, it allows users to query calibration data relevant to the conditions and settings of a particular experimental run.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
snapred.backend.dao.request.CalibrationLoadAssessmentRequest module
- class snapred.backend.dao.request.CalibrationLoadAssessmentRequest.CalibrationLoadAssessmentRequest(*, runId: str, version: int, useLiteMode: bool, checkExistent: bool)
Bases:
BaseModelThe CalibrationLoadAssessmentRequest class is crafted to initiate the generation and loading of an assessment for a specified calibration version linked to a run’s instrument state. It specifies a runId and version to identify the calibration of interest, along with a checkExistent flag that, when true, avoids regenerating the assessment if it already exists.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
snapred.backend.dao.request.ClearWorkspacesRequest module
snapred.backend.dao.request.ListWorkspacesRequest module
snapred.backend.dao.request.DiffractionCalibrationRequest module
- class snapred.backend.dao.request.DiffractionCalibrationRequest.DiffractionCalibrationRequest(*, runNumber: str, calibrantSamplePath: str, focusGroup: ~snapred.backend.dao.state.FocusGroup.FocusGroup, useLiteMode: bool, crystalDMin: float = <factory>, crystalDMax: float = <factory>, peakFunction: ~snapred.meta.mantid.AllowedPeakTypes.SymmetricPeakEnum = <factory>, convergenceThreshold: float = <factory>, nBinsAcrossPeakWidth: int = <factory>, maximumOffset: float = <factory>, fwhmMultipliers: ~snapred.backend.dao.Limit.Pair[float] = <factory>, maxChiSq: float = <factory>, removeBackground: bool = False, pixelMasks: ~typing.List[~snapred.meta.mantid.WorkspaceNameGenerator.WorkspaceName] = [], combinedPixelMask: ~snapred.meta.mantid.WorkspaceNameGenerator.WorkspaceName | None = None, continueFlags: ~snapred.backend.error.ContinueWarning.ContinueWarning.Type | None = <Type.UNSET: 0>, startingTableVersion: int | ~snapred.backend.dao.indexing.Versioning.VersionState = VersionState.DEFAULT)
Bases:
BaseModelThe DiffractionCalibrationRequest class is designed to kick-start the calibration process for a specific run by comparing it against known crystallographic data from a cif file. It includes the runNumber, calibrantSamplePath, and the focusGroup involved, alongside settings like useLiteMode for simplified processing and a series of calibration parameters such as crystalDMin, crystalDMax, peakFunction, and thresholds for convergence and peak intensity. These parameters are pre-configured with default values from the system’s configuration, ensuring a consistent and precise approach to diffraction calibration.
- combinedPixelMask: WorkspaceName | None
- focusGroup: FocusGroup
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- peakFunction: SymmetricPeakEnum
- pixelMasks: List[WorkspaceName]
snapred.backend.dao.request.FarmFreshIngredients module
- class snapred.backend.dao.request.FarmFreshIngredients.FarmFreshIngredients(*, runNumber: str, versions: ~snapred.backend.dao.request.FarmFreshIngredients.Versions = (VersionState.LATEST, VersionState.LATEST), useLiteMode: bool, timestamp: float | None = None, cifPath: str | None = None, calibrantSamplePath: str | None = None, keepUnfocused: bool | None = None, convertUnitsTo: str | None = None, convergenceThreshold: float = <factory>, nBinsAcrossPeakWidth: int = <factory>, peakIntensityThreshold: float | None = None, peakFunction: ~snapred.meta.mantid.AllowedPeakTypes.SymmetricPeakEnum = <factory>, maxOffset: float = <factory>, crystalDBounds: ~snapred.backend.dao.Limit.Limit[float] = <factory>, fwhmMultipliers: ~snapred.backend.dao.Limit.Pair[float] = <factory>, maxChiSq: float | None = <factory>, focusGroups: ~typing.List[~snapred.backend.dao.state.FocusGroup.FocusGroup] | None = None, state: str | None = None)
Bases:
BaseModelfrom these, the Sous Chef can make everything
- property focusGroup: FocusGroup
- focusGroups: List[FocusGroup] | None
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- peakFunction: SymmetricPeakEnum
snapred.backend.dao.request.FocusSpectraRequest module
- class snapred.backend.dao.request.FocusSpectraRequest.FocusSpectraRequest(*, runNumber: str, useLiteMode: bool, focusGroup: FocusGroup, preserveEvents: bool, inputWorkspace: str, groupingWorkspace: str, maskWorkspace: WorkspaceName | None = None, outputWorkspace: WorkspaceName | None = None)
Bases:
BaseModel- focusGroup: FocusGroup
- maskWorkspace: WorkspaceName | None
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- outputWorkspace: WorkspaceName | None
snapred.backend.dao.request.InitializeStateRequest module
- class snapred.backend.dao.request.InitializeStateRequest.InitializeStateRequest(*, runId: str, humanReadableName: str, useLiteMode: bool)
Bases:
BaseModel- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
snapred.backend.dao.request.NormalizationRequest module
- class snapred.backend.dao.request.NormalizationRequest.NormalizationRequest(*, runNumber: str, backgroundRunNumber: str, useLiteMode: bool, focusGroup: ~snapred.backend.dao.state.FocusGroup.FocusGroup, calibrantSamplePath: str, smoothingParameter: float = <factory>, crystalDBounds: ~snapred.backend.dao.Limit.Limit[float] = <factory>, nBinsAcrossPeakWidth: int = <factory>, fwhmMultipliers: ~snapred.backend.dao.Limit.Pair[float] = <factory>, continueFlags: ~snapred.backend.error.ContinueWarning.ContinueWarning.Type | None = <Type.UNSET: 0>, correctedVanadiumWs: ~snapred.meta.mantid.WorkspaceNameGenerator.WorkspaceName | None = None)
Bases:
BaseModelThis class encapsulates all the necessary parameters to request a normalization process, including default values from application.yml for ease of use and consistency across runs. It is designed to provide a comprehensive and customizable framework for requesting normalization calibrations, facilitating precise and tailored calibration processes.
- correctedVanadiumWs: WorkspaceName | None
- focusGroup: FocusGroup
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
snapred.backend.dao.request.NormalizationExportRequest module
- class snapred.backend.dao.request.NormalizationExportRequest.NormalizationExportRequest(*, createIndexEntryRequest: CreateIndexEntryRequest, createRecordRequest: CreateNormalizationRecordRequest)
Bases:
BaseModelThis class is utilized to encapsulate the necessary data for saving a completed normalization process to disk, following a satisfactory assessment by the user. It packages both the comprehensive details of the normalization process and its contextual metadata, ensuring that significant normalization efforts are archived in a structured and accessible manner. This approach facilitates not only the preservation of critical scientific data but also supports data governance, compliance, and reproducibility within the research workflow.
- createIndexEntryRequest: CreateIndexEntryRequest
- createRecordRequest: CreateNormalizationRecordRequest
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- same_version()
snapred.backend.dao.request.OverrideRequest module
snapred.backend.dao.request.RenameWorkspaceRequest module
snapred.backend.dao.request.RenameWorkspacesFromTemplateRequest module
- class snapred.backend.dao.request.RenameWorkspacesFromTemplateRequest.RenameWorkspacesFromTemplateRequest(*, workspaces: List[WorkspaceName], renameTemplate: str)
Bases:
BaseModelRename a list of workspaces according to a template. The template must be a formattable string with a placeholder labeled workspaceName. In the new workspace names, the old workspace name will appear at this label.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- workspaces: List[WorkspaceName]
snapred.backend.dao.request.SmoothDataExcludingPeaksRequest module
- class snapred.backend.dao.request.SmoothDataExcludingPeaksRequest.SmoothDataExcludingPeaksRequest(*, runNumber: str, useLiteMode: bool, focusGroup: ~snapred.backend.dao.state.FocusGroup.FocusGroup, calibrantSamplePath: str, inputWorkspace: str, outputWorkspace: str, smoothingParameter: float = <factory>, crystalDMin: float = <factory>, crystalDMax: float = <factory>)
Bases:
BaseModelThis class encapsulates all necessary parameters for a request to smooth data while excluding peaks, including default values from configuration for ease of use and consistency across runs. It offers a comprehensive framework for specifying the details of a data smoothing operation, ensuring that significant data features are preserved while reducing noise.
- focusGroup: FocusGroup
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
snapred.backend.dao.request.VanadiumCorrectionRequest module
- class snapred.backend.dao.request.VanadiumCorrectionRequest.VanadiumCorrectionRequest(*, runNumber: str, useLiteMode: bool, focusGroup: ~snapred.backend.dao.state.FocusGroup.FocusGroup, calibrantSamplePath: str, inputWorkspace: str, backgroundWorkspace: str, outputWorkspace: str, crystalDMin: float = <factory>, crystalDMax: float = <factory>)
Bases:
BaseModel- focusGroup: FocusGroup
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].