snapred.backend.dao.state package
Subpackages
- snapred.backend.dao.state.CalibrantSample package
- Submodules
- snapred.backend.dao.state.CalibrantSample.Atom module
- snapred.backend.dao.state.CalibrantSample.CalibrantSample module
CalibrantSampleCalibrantSample.crystallographyCalibrantSample.dateCalibrantSample.geometryCalibrantSample.materialCalibrantSample.model_configCalibrantSample.nameCalibrantSample.overridesCalibrantSample.peakIntensityFractionThresholdCalibrantSample.serialize_date()CalibrantSample.unique_idCalibrantSample.validate_date()CalibrantSample.validate_threshold()
- snapred.backend.dao.state.CalibrantSample.Crystallography module
CrystallographyCrystallography.atomsCrystallography.calibrationSampleHome()Crystallography.cifFileCrystallography.latticeParametersCrystallography.model_configCrystallography.scattererStringCrystallography.spaceGroupCrystallography.spaceGroupStringCrystallography.unitCellStringCrystallography.validate_cifFile()Crystallography.validate_spaceGroup()
- snapred.backend.dao.state.CalibrantSample.Geometry module
- snapred.backend.dao.state.CalibrantSample.Material module
- Module contents
Submodules
snapred.backend.dao.state.DetectorState module
- class snapred.backend.dao.state.DetectorState.DetectorState(*, PVs: dict[str, Any], stateId: ObjectSHA | None)
Bases:
BaseModel- LEGACY_SCHEMA: ClassVar[Dict[str, Any]] = {'derivedPVs': {'deltaTheta': {'items': [[[_LegacyGuideStatePos.IN], 0.0064], [[_LegacyGuideStatePos.OUT], 0.002]], 'keyPVs': ['BL3:Mot:OpticsPos:Pos']}}, 'length': 16, 'properties': {'BL3:Chop:Skf1:WavelengthUserReq': {'alias': 'WavelengthUserReq', 'resolution': 0.1, 'type': 'number'}, 'BL3:Det:TH:BL:Frequency': {'alias': 'Frequency', 'type': 'integer'}, 'BL3:Mot:OpticsPos:Pos': {'alias': 'Pos', 'type': 'integer'}, 'det_arc1': {'alias': 'vdet_arc1', 'resolution': 0.5, 'type': 'number'}, 'det_arc2': {'alias': 'vdet_arc2', 'resolution': 0.5, 'type': 'number'}, 'det_lin1': {'ignore': True, 'type': 'number'}, 'det_lin2': {'ignore': True, 'type': 'number'}}, 'required': ['det_arc1', 'det_arc2', 'BL3:Chop:Skf1:WavelengthUserReq', 'BL3:Det:TH:BL:Frequency', 'BL3:Mot:OpticsPos:Pos', 'det_lin1', 'det_lin2'], 'type': 'object', 'use_legacy_rounding': True}
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
snapred.backend.dao.state.DiffractionCalibrant module
- class snapred.backend.dao.state.DiffractionCalibrant.DiffractionCalibrant(*, runNumber: str, filename: str, diffCalPath: str, name: str | None = None, latticeParameters: str | None = None, reference: str | None = None, crystallographicInfo: CrystallographicInfo | None = None, fSquaredThreshold: float | None = None)
Bases:
BaseModel- crystallographicInfo: CrystallographicInfo | None
- model_config: ClassVar[ConfigDict] = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
snapred.backend.dao.state.FocusGroup module
snapred.backend.dao.state.GroupingMap module
- class snapred.backend.dao.state.GroupingMap.GroupingMap(*, stateId: ObjectSHA | str, nativeFocusGroups: List[FocusGroup] = None, liteFocusGroups: List[FocusGroup] = None)
Bases:
BaseModel- getMap(useLiteMode: bool) Dict[str, FocusGroup]
- property isDefault
- property lite: Dict[str, FocusGroup]
- liteFocusGroups: List[FocusGroup]
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_post_init(context: Any, /) None
This function is meant to behave like a BaseModel method to initialize private attributes.
It takes context as an argument since that’s what pydantic-core passes when calling it.
- Args:
self: The BaseModel instance. context: The context.
- property native: Dict[str, FocusGroup]
- nativeFocusGroups: List[FocusGroup]
- validate_GroupingMap()
snapred.backend.dao.state.InstrumentConfig module
- class snapred.backend.dao.state.InstrumentConfig.InstrumentConfig(*, version: int | ~snapred.backend.dao.indexing.Versioning.VersionState, indexEntry: ~snapred.backend.dao.indexing.IndexEntry.IndexEntry, facility: str, bandwidth: float, maxBandwidth: float, L1: float, L2: float, delTOverT: float, delLOverL: float, width: float, frequency: float, lowWavelengthCrop: float = <factory>, name: str | None = None, nexusFileExtension: str | None = None, nexusFilePrefix: str | None = None, calibrationFileExtension: str | None = None, calibrationFilePrefix: str | None = None, calibrationDirectory: str | None = None, pixelGroupingDirectory: str | None = None, sharedDirectory: str | None = None, nexusDirectory: str | None = None, reducedDataDirectory: str | None = None, reductionRecordDirectory: str | None = None, cycle: ~snapred.backend.dao.state.Cycle.Cycle | None = None, stateIdSchema: ~typing.Dict[str, ~typing.Any] = {'derivedPVs': {'deltaTheta': {'items': [[[_LegacyGuideStatePos.IN], 0.0064], [[_LegacyGuideStatePos.OUT], 0.002]], 'keyPVs': ['BL3:Mot:OpticsPos:Pos']}}, 'length': 16, 'properties': {'BL3:Chop:Skf1:WavelengthUserReq': {'alias': 'WavelengthUserReq', 'resolution': 0.1, 'type': 'number'}, 'BL3:Det:TH:BL:Frequency': {'alias': 'Frequency', 'type': 'integer'}, 'BL3:Mot:OpticsPos:Pos': {'alias': 'Pos', 'type': 'integer'}, 'det_arc1': {'alias': 'vdet_arc1', 'resolution': 0.5, 'type': 'number'}, 'det_arc2': {'alias': 'vdet_arc2', 'resolution': 0.5, 'type': 'number'}, 'det_lin1': {'ignore': True, 'type': 'number'}, 'det_lin2': {'ignore': True, 'type': 'number'}}, 'required': ['det_arc1', 'det_arc2', 'BL3:Chop:Skf1:WavelengthUserReq', 'BL3:Det:TH:BL:Frequency', 'BL3:Mot:OpticsPos:Pos', 'det_lin1', 'det_lin2'], 'type': 'object', 'use_legacy_rounding': True}, **extra_data: ~typing.Any)
Bases:
IndexedObjectClass to hold the instrument parameters.
- calibrationDirectory: str | None
Read-only data descriptor used to emit a runtime deprecation warning before accessing a deprecated field.
- Attributes:
msg: The deprecation message to be emitted. wrapped_property: The property instance if the deprecated field is a computed field, or None. field_name: The name of the field being deprecated.
- calibrationFileExtension: str | None
Read-only data descriptor used to emit a runtime deprecation warning before accessing a deprecated field.
- Attributes:
msg: The deprecation message to be emitted. wrapped_property: The property instance if the deprecated field is a computed field, or None. field_name: The name of the field being deprecated.
- calibrationFilePrefix: str | None
Read-only data descriptor used to emit a runtime deprecation warning before accessing a deprecated field.
- Attributes:
msg: The deprecation message to be emitted. wrapped_property: The property instance if the deprecated field is a computed field, or None. field_name: The name of the field being deprecated.
- derivedPV(name: str, detectorState: DetectorState) Any
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'strict': True, 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_post_init(context: Any, /) None
This function is meant to behave like a BaseModel method to initialize private attributes.
It takes context as an argument since that’s what pydantic-core passes when calling it.
- Args:
self: The BaseModel instance. context: The context.
- name: str | None
Read-only data descriptor used to emit a runtime deprecation warning before accessing a deprecated field.
- Attributes:
msg: The deprecation message to be emitted. wrapped_property: The property instance if the deprecated field is a computed field, or None. field_name: The name of the field being deprecated.
- nexusDirectory: str | None
Read-only data descriptor used to emit a runtime deprecation warning before accessing a deprecated field.
- Attributes:
msg: The deprecation message to be emitted. wrapped_property: The property instance if the deprecated field is a computed field, or None. field_name: The name of the field being deprecated.
- nexusFileExtension: str | None
Read-only data descriptor used to emit a runtime deprecation warning before accessing a deprecated field.
- Attributes:
msg: The deprecation message to be emitted. wrapped_property: The property instance if the deprecated field is a computed field, or None. field_name: The name of the field being deprecated.
- nexusFilePrefix: str | None
Read-only data descriptor used to emit a runtime deprecation warning before accessing a deprecated field.
- Attributes:
msg: The deprecation message to be emitted. wrapped_property: The property instance if the deprecated field is a computed field, or None. field_name: The name of the field being deprecated.
- pixelGroupingDirectory: str | None
Read-only data descriptor used to emit a runtime deprecation warning before accessing a deprecated field.
- Attributes:
msg: The deprecation message to be emitted. wrapped_property: The property instance if the deprecated field is a computed field, or None. field_name: The name of the field being deprecated.
- reducedDataDirectory: str | None
Read-only data descriptor used to emit a runtime deprecation warning before accessing a deprecated field.
- Attributes:
msg: The deprecation message to be emitted. wrapped_property: The property instance if the deprecated field is a computed field, or None. field_name: The name of the field being deprecated.
- reductionRecordDirectory: str | None
Read-only data descriptor used to emit a runtime deprecation warning before accessing a deprecated field.
- Attributes:
msg: The deprecation message to be emitted. wrapped_property: The property instance if the deprecated field is a computed field, or None. field_name: The name of the field being deprecated.
Read-only data descriptor used to emit a runtime deprecation warning before accessing a deprecated field.
- Attributes:
msg: The deprecation message to be emitted. wrapped_property: The property instance if the deprecated field is a computed field, or None. field_name: The name of the field being deprecated.
snapred.backend.dao.state.InstrumentState module
- class snapred.backend.dao.state.InstrumentState.InstrumentState(*, id: ObjectSHA, instrumentConfig: InstrumentConfig, detectorState: DetectorState, gsasParameters: GSASParameters, particleBounds: ParticleBounds, defaultGroupingSliceValue: float, fwhmMultipliers: Pair[float], peakTailCoefficient: float)
Bases:
BaseModel- detectorState: DetectorState
- gsasParameters: GSASParameters
- instrumentConfig: InstrumentConfig
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- particleBounds: ParticleBounds
snapred.backend.dao.state.NormalizationCalibrant module
- class snapred.backend.dao.state.NormalizationCalibrant.NormalizationCalibrant(*, numAnnuli: int, numSlices: int | None = None, attenuationCrossSection: float, attenuationHeight: float, geometry: str | None = None, FWHM: List[List[int]], mask: str, material: str | None = None, peaks: List[float], radius: float, sampleNumberDensity: float, scatteringCrossSection: float, smoothPoints: int, calibrationState: str | None = None)
Bases:
BaseModel- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
snapred.backend.dao.state.PixelGroup module
- class snapred.backend.dao.state.PixelGroup.PixelGroup(*, pixelGroupingParameters: ~typing.List[~snapred.backend.dao.state.PixelGroupingParameters.PixelGroupingParameters] | ~typing.Dict[int, ~snapred.backend.dao.state.PixelGroupingParameters.PixelGroupingParameters] = {}, nBinsAcrossPeakWidth: int = <factory>, focusGroup: ~snapred.backend.dao.state.FocusGroup.FocusGroup, timeOfFlight: ~snapred.backend.dao.Limit.BinnedValue[float], binningMode: ~snapred.backend.dao.state.PixelGroup.PixelGroup.BinningMode = BinningMode.LOG)
Bases:
BaseModel- binningMode: BinningMode
- focusGroup: FocusGroup
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- pixelGroupingParameters: List[PixelGroupingParameters] | Dict[int, PixelGroupingParameters]
- timeOfFlight: BinnedValue[float]
- classmethod validate_TOF(v)
- classmethod validate_pixelGroupingParameters(pgps: List[PixelGroupingParameters] | Dict[int, PixelGroupingParameters])
snapred.backend.dao.state.PixelGroupingParameters module
- class snapred.backend.dao.state.PixelGroupingParameters.PixelGroupingParameters(*, groupID: int, isMasked: bool = False, L2: float, twoTheta: Annotated[float, Ge(ge=0.0), Le(le=6.283185307179586)], azimuth: Annotated[float, Ge(ge=-3.141592653589793), Le(le=3.141592653589793)], dResolution: Limit[float], dRelativeResolution: Annotated[float, Gt(gt=0)])
Bases:
BaseModel- isMasked: bool
Read-only data descriptor used to emit a runtime deprecation warning before accessing a deprecated field.
- Attributes:
msg: The deprecation message to be emitted. wrapped_property: The property instance if the deprecated field is a computed field, or None. field_name: The name of the field being deprecated.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- classmethod validate_resolution_type(v)