ts_ids_components.xrd.method module#

Method components (scan and optics parameters) for XRD IDSs.

The XrdScan component holds the scan and optics parameters common to an XRD measurement, including the 2-theta scan range, step size, detector, and X-ray source settings. See the “Vendor value normalization” note on XrdGeometryMode for vendor-specific translation rules required before raw values can be assigned to the fields below.

class XrdGeometryMode(value)[source]#

Bases: str, Enum

Standardized scan mode for an XRD measurement – a bare Reflection/Transmission/Capillary split isn’t specific enough, since e.g. COUPLED_REFLECTION and DETECTOR_SCAN are both reflection-geometry measurements but are different scan modes with different physics (and different absorption-correction requirements).

Vendor value normalization#

Each vendor reports scan mode using a different raw value, which must be translated to one of these values in the task script (not passed through verbatim):

  • COUPLED_REFLECTION:

    • Bruker: the DataRoute/ScanInformation element’s ScanName/ VisibleName attributes, e.g. ScanName="LockedCoupled", VisibleName="Coupled TwoTheta/Theta".

    • Rigaku: the raw AttachmentHead element’s SelectedUnit attribute, e.g. "ASC10_Reflection".

    • Malvern Panalytical: the <scan> element’s scanAxis attribute, e.g. scanAxis="Gonio".

  • TRANSMISSION_CAPILLARY:

    • Rigaku: the same AttachmentHead element’s SelectedUnit attribute as above, e.g. "Capillary".

    • Malvern Panalytical: the <scan> element’s scanAxis attribute, e.g. scanAxis="2Theta".

  • TRANSMISSION_FLAT_SHEET:

    • Malvern Panalytical: the <scan> element’s scanAxis attribute, e.g. scanAxis="2Theta-Omega".

The remaining modes (DETECTOR_SCAN, GRAZING_INCIDENCE, X_RAY_REFLECTIVITY, ROCKING_CURVE, PHI_SCAN, PSI_SCAN, RECIPROCAL_SPACE_MAPPING, GISAXS) have no raw-field mapping documented here yet.

Only COUPLED_REFLECTION, DETECTOR_SCAN, GRAZING_INCIDENCE, X_RAY_REFLECTIVITY, TRANSMISSION_CAPILLARY, and TRANSMISSION_FLAT_SHEET vary 2-theta and are supported by TwoThetaScanDatacube; the remaining modes vary a different primary axis (omega, phi, psi, or a reciprocal-space grid) and have no datacube component defined here – see ts_ids_components.xrd.datacube for why.

Model XrdGeometry[source]#

Bases: _RawAndStandardizedValue

Scan mode/geometry for an XRD measurement. See XrdGeometryMode for the per-vendor raw-file lookup and translation rules used to populate value from raw_value.

Show JSON schema
{
   "description": "Scan mode/geometry for an XRD measurement. See :py:class:`XrdGeometryMode`\nfor the per-vendor raw-file lookup and translation rules used to\npopulate `value` from `raw_value`.",
   "type": "object",
   "properties": {
      "value": {
         "description": "Standardized scan mode, translated from `raw_value`.",
         "example_values": [
            "Coupled Reflection (Bragg-Brentano)",
            "Detector Scan (Uncoupled)",
            "Grazing Incidence (GIXRD)",
            "X-ray Reflectivity (XRR)",
            "Transmission (Capillary / Debye-Scherrer)",
            "Transmission (Flat-Sheet Coupled)",
            "Rocking Curve (\u03c9-Scan)",
            "Phi Scan (\u03d5-Scan)",
            "Psi Scan (\u03c8-Scan)",
            "Reciprocal Space Mapping (RSM)",
            "Grazing-Incidence Small-Angle X-ray Scattering (GISAXS)"
         ],
         "type": [
            "string",
            "null"
         ]
      },
      "raw_value": {
         "description": "The raw, untransformed scan mode/geometry value from the primary data.",
         "type": [
            "string",
            "null"
         ]
      }
   },
   "additionalProperties": false,
   "required": [
      "value",
      "raw_value"
   ]
}

Validators:

field raw_value: str | None#

The raw, untransformed scan mode/geometry value from the primary data.

field value: str | None#

Standardized scan mode, translated from raw_value.

class XrdMeasurementStatusMode(value)[source]#

Bases: str, Enum

Standardized measurement lifecycle state, matching Malvern Panalytical XRDML’s own statusType enumeration (confirmed against XRDMeasurement21.xsd): "Completed" (“the data has been measured as indicated in the measurement program”), "Aborted" (“the operator aborted the measurement”), and "Not finished" (“the measurement was not completed”; also covers files left in an intermediate state by e.g. a power failure).

Model XrdMeasurementStatus[source]#

Bases: _RawAndStandardizedValue

Measurement lifecycle state for an XRD scan. Bruker’s raw <MeasurementStatus> value "Measured" (from RawData0.xml) normalizes to XrdMeasurementStatusMode.COMPLETED; Panalytical XRDML’s own status attribute values pass straight through (lowercased) to the matching XrdMeasurementStatusMode member.

Show JSON schema
{
   "description": "Measurement lifecycle state for an XRD scan. Bruker's raw\n``<MeasurementStatus>`` value ``\"Measured\"`` (from ``RawData0.xml``)\nnormalizes to :py:attr:`XrdMeasurementStatusMode.COMPLETED`; Panalytical\nXRDML's own ``status`` attribute values pass straight through\n(lowercased) to the matching `XrdMeasurementStatusMode` member.",
   "type": "object",
   "properties": {
      "value": {
         "description": "Standardized measurement lifecycle state, translated from `raw_value`.",
         "example_values": [
            "completed",
            "aborted",
            "not finished"
         ],
         "type": [
            "string",
            "null"
         ]
      },
      "raw_value": {
         "description": "The raw, untransformed measurement lifecycle state from the primary data.",
         "type": [
            "string",
            "null"
         ]
      }
   },
   "additionalProperties": false,
   "required": [
      "value",
      "raw_value"
   ]
}

Validators:

field raw_value: str | None#

The raw, untransformed measurement lifecycle state from the primary data.

field value: str | None#

Standardized measurement lifecycle state, translated from raw_value.

Model RawValueRawUnit[source]#

Bases: RawValueUnit

A RawValueUnit that also preserves the unit exactly as reported before normalization (e.g. Bruker/Empyrean’s own Unit/unit attributes, Rigaku’s sibling <XUnit> elements), independent of whether the parser’s normalization to unit was correct – the same rationale that already justifies raw_value on RawValueUnit applies equally to units: a genuinely different raw string (e.g. Bruker’s “Å” vs. Empyrean’s “Angstrom” for the same physical unit) can be mis-normalized or unexpected just as easily as a value can.

unit is deliberately left as a plain nullable string, not a Literal – the platform convention is that the task script, not the IDS schema, decides what unit string gets written, so a future instrument or configuration reporting a different unit for the same physical quantity doesn’t require an IDS schema change. Do not subclass this to fix unit to a Literal – that would reintroduce exactly the constraint this design avoids.

Show JSON schema
{
   "description": "A `RawValueUnit` that also preserves the unit exactly as reported\nbefore normalization (e.g. Bruker/Empyrean's own `Unit`/`unit`\nattributes, Rigaku's sibling `<XUnit>` elements), independent of\nwhether the parser's normalization to `unit` was correct -- the same\nrationale that already justifies `raw_value` on `RawValueUnit` applies\nequally to units: a genuinely different raw string (e.g. Bruker's `\"\u00c5\"`\nvs. Empyrean's `\"Angstrom\"` for the same physical unit) can be\nmis-normalized or unexpected just as easily as a value can.\n\n`unit` is deliberately left as a plain nullable string, not a `Literal` --\nthe platform convention is that the task script, not the IDS schema,\ndecides what unit string gets written, so a future instrument or\nconfiguration reporting a different unit for the same physical quantity\ndoesn't require an IDS schema change. Do not subclass this to fix `unit`\nto a `Literal` -- that would reintroduce exactly the constraint this\ndesign avoids.",
   "type": "object",
   "properties": {
      "value": {
         "description": "A numerical value.",
         "type": [
            "number",
            "null"
         ]
      },
      "unit": {
         "description": "Unit for the numerical value.",
         "type": [
            "string",
            "null"
         ]
      },
      "raw_value": {
         "description": "The raw, untransformed value from the primary data.",
         "type": [
            "string",
            "null"
         ]
      },
      "raw_unit": {
         "description": "The raw, untransformed unit string from the primary data.",
         "type": [
            "string",
            "null"
         ]
      }
   },
   "additionalProperties": false,
   "required": [
      "value",
      "unit",
      "raw_value"
   ]
}

Validators:

field raw_unit: str | None#

The raw, untransformed unit string from the primary data.

field raw_value: Required[Nullable[str]]#

The raw, untransformed value from the primary data.

field unit: Required[Nullable[str]]#

Unit for the numerical value.

field value: Required[Nullable[float]]#

A numerical value.

Model Anode[source]#

Bases: IdsElement

X-ray tube anode (target) material and its characteristic emission wavelengths. The anode material fixes which wavelengths the tube radiates (e.g. a copper anode always radiates Cu K-alpha1/K-alpha2/K-beta), so these are grouped on one class rather than split across sibling fields on XraySource. Every vendor reports k_alpha1/k_alpha2/k_beta as explicit values (Bruker’s WaveLengthAlpha1/WaveLengthAlpha2/WaveLengthBeta, Rigaku’s WavelengthKalpha1/WavelengthKalpha2/WavelengthKbeta, and Empyrean’s usedWavelength/kAlpha1/kAlpha2/kBeta). Each uses RawValueRawUnit rather than a plain float so the parser always has somewhere to put the raw value/unit strings it read.

k_alpha2_over_k_alpha1_ratio is reported less consistently: Bruker and Empyrean report it (WaveLengthRatio, ratioKAlpha2KAlpha1), but Rigaku doesn’t report an equivalent value.

Show JSON schema
{
   "description": "X-ray tube anode (target) material and its characteristic emission\nwavelengths. The anode material fixes which wavelengths the tube radiates\n(e.g. a copper anode always radiates Cu K-alpha1/K-alpha2/K-beta), so\nthese are grouped on one class rather than split across sibling fields on\n`XraySource`. Every vendor reports `k_alpha1`/`k_alpha2`/`k_beta` as\nexplicit values (Bruker's\n``WaveLengthAlpha1``/``WaveLengthAlpha2``/``WaveLengthBeta``, Rigaku's\n``WavelengthKalpha1``/``WavelengthKalpha2``/``WavelengthKbeta``, and\nEmpyrean's ``usedWavelength/kAlpha1``/``kAlpha2``/``kBeta``). Each uses\n`RawValueRawUnit` rather than a plain float so the parser always has\nsomewhere to put the raw value/unit strings it read.\n\n`k_alpha2_over_k_alpha1_ratio` is reported less consistently: Bruker and\nEmpyrean report it (``WaveLengthRatio``, ``ratioKAlpha2KAlpha1``), but\nRigaku doesn't report an equivalent value.",
   "type": "object",
   "properties": {
      "material": {
         "description": "Anode (target) material of the X-ray tube, e.g. 'Cu' for copper.",
         "type": [
            "string",
            "null"
         ]
      },
      "k_alpha1": {
         "$ref": "#/definitions/RawValueRawUnit",
         "description": "Wavelength of the K-alpha1 emission line -- the stronger of the two K-alpha lines emitted by this anode material."
      },
      "k_alpha2": {
         "$ref": "#/definitions/RawValueRawUnit",
         "description": "Wavelength of the K-alpha2 emission line -- the weaker of the two K-alpha lines emitted by this anode material."
      },
      "k_alpha2_over_k_alpha1_ratio": {
         "$ref": "#/definitions/RawValueRawUnit",
         "description": "Relative intensity of the K-alpha2 line to the K-alpha1 line."
      },
      "k_beta": {
         "$ref": "#/definitions/RawValueRawUnit",
         "description": "Wavelength of the K-beta emission line, less intense than K-alpha and used less often as the primary analysis line."
      }
   },
   "additionalProperties": false,
   "definitions": {
      "RawValueRawUnit": {
         "additionalProperties": false,
         "description": "A `RawValueUnit` that also preserves the unit exactly as reported\nbefore normalization (e.g. Bruker/Empyrean's own `Unit`/`unit`\nattributes, Rigaku's sibling `<XUnit>` elements), independent of\nwhether the parser's normalization to `unit` was correct -- the same\nrationale that already justifies `raw_value` on `RawValueUnit` applies\nequally to units: a genuinely different raw string (e.g. Bruker's `\"\u00c5\"`\nvs. Empyrean's `\"Angstrom\"` for the same physical unit) can be\nmis-normalized or unexpected just as easily as a value can.\n\n`unit` is deliberately left as a plain nullable string, not a `Literal` --\nthe platform convention is that the task script, not the IDS schema,\ndecides what unit string gets written, so a future instrument or\nconfiguration reporting a different unit for the same physical quantity\ndoesn't require an IDS schema change. Do not subclass this to fix `unit`\nto a `Literal` -- that would reintroduce exactly the constraint this\ndesign avoids.",
         "properties": {
            "value": {
               "description": "A numerical value.",
               "type": [
                  "number",
                  "null"
               ]
            },
            "unit": {
               "description": "Unit for the numerical value.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "raw_value": {
               "description": "The raw, untransformed value from the primary data.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "raw_unit": {
               "description": "The raw, untransformed unit string from the primary data.",
               "type": [
                  "string",
                  "null"
               ]
            }
         },
         "required": [
            "value",
            "unit",
            "raw_value"
         ],
         "type": "object"
      }
   }
}

Validators:

field k_alpha1: RawValueRawUnit#

Wavelength of the K-alpha1 emission line – the stronger of the two K-alpha lines emitted by this anode material.

field k_alpha2: RawValueRawUnit#

Wavelength of the K-alpha2 emission line – the weaker of the two K-alpha lines emitted by this anode material.

field k_alpha2_over_k_alpha1_ratio: RawValueRawUnit#

Relative intensity of the K-alpha2 line to the K-alpha1 line.

field k_beta: RawValueRawUnit#

Wavelength of the K-beta emission line, less intense than K-alpha and used less often as the primary analysis line.

field material: str | None#

Anode (target) material of the X-ray tube, e.g. ‘Cu’ for copper.

class XrdEmissionLine(value)[source]#

Bases: str, Enum

Which of an anode’s characteristic emission lines (see Anode) a scan’s 2-theta axis is reduced against for angle-to-d-spacing conversion (Bragg’s law). K_ALPHA_WEIGHTED is the intensity-weighted average of the K-alpha1/K-alpha2 doublet, used when the two lines aren’t resolved separately (e.g. no monochromator isolating K-alpha1 alone).

Model UsedWavelength[source]#

Bases: _RawAndStandardizedValue

Which emission line a scan’s 2-theta axis is reduced against, and the corresponding numeric wavelength. Malvern Panalytical Empyrean reports this explicitly and specifically (usedWavelength’s intended attribute, e.g. "K-Alpha 1" or "K-Alpha" for the weighted average); Rigaku also reports it explicitly but more coarsely (WaveType, e.g. "Ka", which doesn’t distinguish K-alpha1 from the weighted average). Bruker’s raw files carry no equivalent field at all – only the anode’s physical emission-line constants (Anode), with nothing indicating which one a given scan’s reduction actually used; a Bruker task script should leave this unset rather than guess.

wavelength is carried alongside value/raw_value rather than looked up on Anode, since the K-alpha-weighted case is not any single line stored there.

Show JSON schema
{
   "description": "Which emission line a scan's 2-theta axis is reduced against, and the\ncorresponding numeric wavelength. Malvern Panalytical Empyrean reports\nthis explicitly and specifically (``usedWavelength``'s ``intended``\nattribute, e.g. ``\"K-Alpha 1\"`` or ``\"K-Alpha\"`` for the weighted\naverage); Rigaku also reports it explicitly but more coarsely\n(``WaveType``, e.g. ``\"Ka\"``, which doesn't distinguish K-alpha1 from the\nweighted average). Bruker's raw files carry no equivalent field at\nall -- only the anode's physical emission-line constants (`Anode`), with\nnothing indicating which one a given scan's reduction actually used; a\nBruker task script should leave this unset rather than guess.\n\n`wavelength` is carried alongside `value`/`raw_value` rather than looked\nup on `Anode`, since the K-alpha-weighted case is not any single line\nstored there.",
   "type": "object",
   "properties": {
      "value": {
         "description": "Standardized emission line, translated from `raw_value`.",
         "example_values": [
            "k_alpha1",
            "k_alpha_weighted",
            "k_alpha2",
            "k_beta"
         ],
         "type": [
            "string",
            "null"
         ]
      },
      "raw_value": {
         "description": "The raw, untransformed used-wavelength indicator from the primary data.",
         "type": [
            "string",
            "null"
         ]
      },
      "wavelength": {
         "$ref": "#/definitions/RawValueRawUnit",
         "description": "Numeric wavelength corresponding to `value`, used for 2-theta-to-d-spacing conversion."
      }
   },
   "additionalProperties": false,
   "required": [
      "value",
      "raw_value"
   ],
   "definitions": {
      "RawValueRawUnit": {
         "additionalProperties": false,
         "description": "A `RawValueUnit` that also preserves the unit exactly as reported\nbefore normalization (e.g. Bruker/Empyrean's own `Unit`/`unit`\nattributes, Rigaku's sibling `<XUnit>` elements), independent of\nwhether the parser's normalization to `unit` was correct -- the same\nrationale that already justifies `raw_value` on `RawValueUnit` applies\nequally to units: a genuinely different raw string (e.g. Bruker's `\"\u00c5\"`\nvs. Empyrean's `\"Angstrom\"` for the same physical unit) can be\nmis-normalized or unexpected just as easily as a value can.\n\n`unit` is deliberately left as a plain nullable string, not a `Literal` --\nthe platform convention is that the task script, not the IDS schema,\ndecides what unit string gets written, so a future instrument or\nconfiguration reporting a different unit for the same physical quantity\ndoesn't require an IDS schema change. Do not subclass this to fix `unit`\nto a `Literal` -- that would reintroduce exactly the constraint this\ndesign avoids.",
         "properties": {
            "value": {
               "description": "A numerical value.",
               "type": [
                  "number",
                  "null"
               ]
            },
            "unit": {
               "description": "Unit for the numerical value.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "raw_value": {
               "description": "The raw, untransformed value from the primary data.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "raw_unit": {
               "description": "The raw, untransformed unit string from the primary data.",
               "type": [
                  "string",
                  "null"
               ]
            }
         },
         "required": [
            "value",
            "unit",
            "raw_value"
         ],
         "type": "object"
      }
   }
}

Validators:

field raw_value: str | None#

The raw, untransformed used-wavelength indicator from the primary data.

field value: str | None#

Standardized emission line, translated from raw_value.

field wavelength: RawValueRawUnit#

Numeric wavelength corresponding to value, used for 2-theta-to-d-spacing conversion.

Model XraySource[source]#

Bases: IdsElement

X-ray tube settings common across XRD vendors.

Show JSON schema
{
   "description": "X-ray tube settings common across XRD vendors.",
   "type": "object",
   "properties": {
      "anode": {
         "$ref": "#/definitions/Anode",
         "description": "Anode (target) material and its characteristic emission wavelengths."
      },
      "voltage": {
         "$ref": "#/definitions/RawValueRawUnit",
         "description": "Generator voltage applied to the X-ray tube."
      },
      "current": {
         "$ref": "#/definitions/RawValueRawUnit",
         "description": "Generator current applied to the X-ray tube."
      },
      "used_wavelength": {
         "$ref": "#/definitions/UsedWavelength",
         "description": "Which anode emission line this scan's 2-theta axis is reduced against. Not reported by every vendor -- see `UsedWavelength`."
      }
   },
   "additionalProperties": false,
   "definitions": {
      "Anode": {
         "additionalProperties": false,
         "description": "X-ray tube anode (target) material and its characteristic emission\nwavelengths. The anode material fixes which wavelengths the tube radiates\n(e.g. a copper anode always radiates Cu K-alpha1/K-alpha2/K-beta), so\nthese are grouped on one class rather than split across sibling fields on\n`XraySource`. Every vendor reports `k_alpha1`/`k_alpha2`/`k_beta` as\nexplicit values (Bruker's\n``WaveLengthAlpha1``/``WaveLengthAlpha2``/``WaveLengthBeta``, Rigaku's\n``WavelengthKalpha1``/``WavelengthKalpha2``/``WavelengthKbeta``, and\nEmpyrean's ``usedWavelength/kAlpha1``/``kAlpha2``/``kBeta``). Each uses\n`RawValueRawUnit` rather than a plain float so the parser always has\nsomewhere to put the raw value/unit strings it read.\n\n`k_alpha2_over_k_alpha1_ratio` is reported less consistently: Bruker and\nEmpyrean report it (``WaveLengthRatio``, ``ratioKAlpha2KAlpha1``), but\nRigaku doesn't report an equivalent value.",
         "properties": {
            "material": {
               "description": "Anode (target) material of the X-ray tube, e.g. 'Cu' for copper.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "k_alpha1": {
               "$ref": "#/definitions/RawValueRawUnit",
               "description": "Wavelength of the K-alpha1 emission line -- the stronger of the two K-alpha lines emitted by this anode material."
            },
            "k_alpha2": {
               "$ref": "#/definitions/RawValueRawUnit",
               "description": "Wavelength of the K-alpha2 emission line -- the weaker of the two K-alpha lines emitted by this anode material."
            },
            "k_alpha2_over_k_alpha1_ratio": {
               "$ref": "#/definitions/RawValueRawUnit",
               "description": "Relative intensity of the K-alpha2 line to the K-alpha1 line."
            },
            "k_beta": {
               "$ref": "#/definitions/RawValueRawUnit",
               "description": "Wavelength of the K-beta emission line, less intense than K-alpha and used less often as the primary analysis line."
            }
         },
         "type": "object"
      },
      "RawValueRawUnit": {
         "additionalProperties": false,
         "description": "A `RawValueUnit` that also preserves the unit exactly as reported\nbefore normalization (e.g. Bruker/Empyrean's own `Unit`/`unit`\nattributes, Rigaku's sibling `<XUnit>` elements), independent of\nwhether the parser's normalization to `unit` was correct -- the same\nrationale that already justifies `raw_value` on `RawValueUnit` applies\nequally to units: a genuinely different raw string (e.g. Bruker's `\"\u00c5\"`\nvs. Empyrean's `\"Angstrom\"` for the same physical unit) can be\nmis-normalized or unexpected just as easily as a value can.\n\n`unit` is deliberately left as a plain nullable string, not a `Literal` --\nthe platform convention is that the task script, not the IDS schema,\ndecides what unit string gets written, so a future instrument or\nconfiguration reporting a different unit for the same physical quantity\ndoesn't require an IDS schema change. Do not subclass this to fix `unit`\nto a `Literal` -- that would reintroduce exactly the constraint this\ndesign avoids.",
         "properties": {
            "value": {
               "description": "A numerical value.",
               "type": [
                  "number",
                  "null"
               ]
            },
            "unit": {
               "description": "Unit for the numerical value.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "raw_value": {
               "description": "The raw, untransformed value from the primary data.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "raw_unit": {
               "description": "The raw, untransformed unit string from the primary data.",
               "type": [
                  "string",
                  "null"
               ]
            }
         },
         "required": [
            "value",
            "unit",
            "raw_value"
         ],
         "type": "object"
      },
      "UsedWavelength": {
         "additionalProperties": false,
         "description": "Which emission line a scan's 2-theta axis is reduced against, and the\ncorresponding numeric wavelength. Malvern Panalytical Empyrean reports\nthis explicitly and specifically (``usedWavelength``'s ``intended``\nattribute, e.g. ``\"K-Alpha 1\"`` or ``\"K-Alpha\"`` for the weighted\naverage); Rigaku also reports it explicitly but more coarsely\n(``WaveType``, e.g. ``\"Ka\"``, which doesn't distinguish K-alpha1 from the\nweighted average). Bruker's raw files carry no equivalent field at\nall -- only the anode's physical emission-line constants (`Anode`), with\nnothing indicating which one a given scan's reduction actually used; a\nBruker task script should leave this unset rather than guess.\n\n`wavelength` is carried alongside `value`/`raw_value` rather than looked\nup on `Anode`, since the K-alpha-weighted case is not any single line\nstored there.",
         "properties": {
            "value": {
               "description": "Standardized emission line, translated from `raw_value`.",
               "example_values": [
                  "k_alpha1",
                  "k_alpha_weighted",
                  "k_alpha2",
                  "k_beta"
               ],
               "type": [
                  "string",
                  "null"
               ]
            },
            "raw_value": {
               "description": "The raw, untransformed used-wavelength indicator from the primary data.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "wavelength": {
               "$ref": "#/definitions/RawValueRawUnit",
               "description": "Numeric wavelength corresponding to `value`, used for 2-theta-to-d-spacing conversion."
            }
         },
         "required": [
            "value",
            "raw_value"
         ],
         "type": "object"
      }
   }
}

Validators:

field anode: Anode#

Anode (target) material and its characteristic emission wavelengths.

field current: RawValueRawUnit#

Generator current applied to the X-ray tube.

field used_wavelength: UsedWavelength#

Which anode emission line this scan’s 2-theta axis is reduced against. Not reported by every vendor – see UsedWavelength.

field voltage: RawValueRawUnit#

Generator voltage applied to the X-ray tube.

Model Detector[source]#

Bases: IdsElement

X-ray detector used to measure diffracted intensity.

Show JSON schema
{
   "description": "X-ray detector used to measure diffracted intensity.",
   "type": "object",
   "properties": {
      "name": {
         "description": "Name or model of the detector.",
         "type": [
            "string",
            "null"
         ]
      }
   },
   "additionalProperties": false
}

Validators:

field name: str | None#

Name or model of the detector.

Model XrdScan[source]#

Bases: IdsElement

Scan and optics parameters common to an XRD measurement, shared across vendors.

Show JSON schema
{
   "description": "Scan and optics parameters common to an XRD measurement, shared across\nvendors.",
   "type": "object",
   "properties": {
      "pk": {
         "@primary_key": true,
         "description": "Primary key for this scan, referenced by datacubes produced by it.",
         "type": "string"
      },
      "geometry": {
         "$ref": "#/definitions/XrdGeometry",
         "description": "Sample measurement geometry used for this scan."
      },
      "measurement_status": {
         "$ref": "#/definitions/XrdMeasurementStatus",
         "description": "Lifecycle state of this scan's measurement."
      },
      "two_theta_start": {
         "$ref": "#/definitions/RawValueRawUnit",
         "description": "Start of the 2-theta scan range."
      },
      "two_theta_stop": {
         "$ref": "#/definitions/RawValueRawUnit",
         "description": "End of the 2-theta scan range."
      },
      "step_size": {
         "$ref": "#/definitions/RawValueRawUnit",
         "description": "Angular increment between consecutive 2-theta scan points."
      },
      "time_per_step": {
         "$ref": "#/definitions/RawValueRawUnit",
         "description": "Integration (counting) time at each scan step."
      },
      "speed": {
         "$ref": "#/definitions/RawValueRawUnit",
         "description": "Scan speed, typically in degrees per minute. Only reported by some vendors; for others this is derivable from step_size and time_per_step. No QUDT unit for degrees-per-minute has been confirmed."
      },
      "duration": {
         "$ref": "#/definitions/RawValueRawUnit",
         "description": "Total duration of the scan."
      },
      "measurement_program": {
         "description": "Name or path of the instrument method/program file used to run this scan (e.g. Bruker's BsmlFileName, Rigaku's PackageName). Not reported as a discrete field by every vendor -- e.g. Empyrean only carries an equivalent value embedded in a free-text comment field -- so this should be left unset where no discrete field exists in the raw data.",
         "type": [
            "string",
            "null"
         ]
      },
      "detector": {
         "$ref": "#/definitions/Detector",
         "description": "Detector used for this scan."
      },
      "x_ray_source": {
         "$ref": "#/definitions/XraySource",
         "description": "X-ray tube settings used for this scan."
      }
   },
   "additionalProperties": false,
   "required": [
      "pk"
   ],
   "definitions": {
      "Anode": {
         "additionalProperties": false,
         "description": "X-ray tube anode (target) material and its characteristic emission\nwavelengths. The anode material fixes which wavelengths the tube radiates\n(e.g. a copper anode always radiates Cu K-alpha1/K-alpha2/K-beta), so\nthese are grouped on one class rather than split across sibling fields on\n`XraySource`. Every vendor reports `k_alpha1`/`k_alpha2`/`k_beta` as\nexplicit values (Bruker's\n``WaveLengthAlpha1``/``WaveLengthAlpha2``/``WaveLengthBeta``, Rigaku's\n``WavelengthKalpha1``/``WavelengthKalpha2``/``WavelengthKbeta``, and\nEmpyrean's ``usedWavelength/kAlpha1``/``kAlpha2``/``kBeta``). Each uses\n`RawValueRawUnit` rather than a plain float so the parser always has\nsomewhere to put the raw value/unit strings it read.\n\n`k_alpha2_over_k_alpha1_ratio` is reported less consistently: Bruker and\nEmpyrean report it (``WaveLengthRatio``, ``ratioKAlpha2KAlpha1``), but\nRigaku doesn't report an equivalent value.",
         "properties": {
            "material": {
               "description": "Anode (target) material of the X-ray tube, e.g. 'Cu' for copper.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "k_alpha1": {
               "$ref": "#/definitions/RawValueRawUnit",
               "description": "Wavelength of the K-alpha1 emission line -- the stronger of the two K-alpha lines emitted by this anode material."
            },
            "k_alpha2": {
               "$ref": "#/definitions/RawValueRawUnit",
               "description": "Wavelength of the K-alpha2 emission line -- the weaker of the two K-alpha lines emitted by this anode material."
            },
            "k_alpha2_over_k_alpha1_ratio": {
               "$ref": "#/definitions/RawValueRawUnit",
               "description": "Relative intensity of the K-alpha2 line to the K-alpha1 line."
            },
            "k_beta": {
               "$ref": "#/definitions/RawValueRawUnit",
               "description": "Wavelength of the K-beta emission line, less intense than K-alpha and used less often as the primary analysis line."
            }
         },
         "type": "object"
      },
      "Detector": {
         "additionalProperties": false,
         "description": "X-ray detector used to measure diffracted intensity.",
         "properties": {
            "name": {
               "description": "Name or model of the detector.",
               "type": [
                  "string",
                  "null"
               ]
            }
         },
         "type": "object"
      },
      "RawValueRawUnit": {
         "additionalProperties": false,
         "description": "A `RawValueUnit` that also preserves the unit exactly as reported\nbefore normalization (e.g. Bruker/Empyrean's own `Unit`/`unit`\nattributes, Rigaku's sibling `<XUnit>` elements), independent of\nwhether the parser's normalization to `unit` was correct -- the same\nrationale that already justifies `raw_value` on `RawValueUnit` applies\nequally to units: a genuinely different raw string (e.g. Bruker's `\"\u00c5\"`\nvs. Empyrean's `\"Angstrom\"` for the same physical unit) can be\nmis-normalized or unexpected just as easily as a value can.\n\n`unit` is deliberately left as a plain nullable string, not a `Literal` --\nthe platform convention is that the task script, not the IDS schema,\ndecides what unit string gets written, so a future instrument or\nconfiguration reporting a different unit for the same physical quantity\ndoesn't require an IDS schema change. Do not subclass this to fix `unit`\nto a `Literal` -- that would reintroduce exactly the constraint this\ndesign avoids.",
         "properties": {
            "value": {
               "description": "A numerical value.",
               "type": [
                  "number",
                  "null"
               ]
            },
            "unit": {
               "description": "Unit for the numerical value.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "raw_value": {
               "description": "The raw, untransformed value from the primary data.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "raw_unit": {
               "description": "The raw, untransformed unit string from the primary data.",
               "type": [
                  "string",
                  "null"
               ]
            }
         },
         "required": [
            "value",
            "unit",
            "raw_value"
         ],
         "type": "object"
      },
      "UsedWavelength": {
         "additionalProperties": false,
         "description": "Which emission line a scan's 2-theta axis is reduced against, and the\ncorresponding numeric wavelength. Malvern Panalytical Empyrean reports\nthis explicitly and specifically (``usedWavelength``'s ``intended``\nattribute, e.g. ``\"K-Alpha 1\"`` or ``\"K-Alpha\"`` for the weighted\naverage); Rigaku also reports it explicitly but more coarsely\n(``WaveType``, e.g. ``\"Ka\"``, which doesn't distinguish K-alpha1 from the\nweighted average). Bruker's raw files carry no equivalent field at\nall -- only the anode's physical emission-line constants (`Anode`), with\nnothing indicating which one a given scan's reduction actually used; a\nBruker task script should leave this unset rather than guess.\n\n`wavelength` is carried alongside `value`/`raw_value` rather than looked\nup on `Anode`, since the K-alpha-weighted case is not any single line\nstored there.",
         "properties": {
            "value": {
               "description": "Standardized emission line, translated from `raw_value`.",
               "example_values": [
                  "k_alpha1",
                  "k_alpha_weighted",
                  "k_alpha2",
                  "k_beta"
               ],
               "type": [
                  "string",
                  "null"
               ]
            },
            "raw_value": {
               "description": "The raw, untransformed used-wavelength indicator from the primary data.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "wavelength": {
               "$ref": "#/definitions/RawValueRawUnit",
               "description": "Numeric wavelength corresponding to `value`, used for 2-theta-to-d-spacing conversion."
            }
         },
         "required": [
            "value",
            "raw_value"
         ],
         "type": "object"
      },
      "XraySource": {
         "additionalProperties": false,
         "description": "X-ray tube settings common across XRD vendors.",
         "properties": {
            "anode": {
               "$ref": "#/definitions/Anode",
               "description": "Anode (target) material and its characteristic emission wavelengths."
            },
            "voltage": {
               "$ref": "#/definitions/RawValueRawUnit",
               "description": "Generator voltage applied to the X-ray tube."
            },
            "current": {
               "$ref": "#/definitions/RawValueRawUnit",
               "description": "Generator current applied to the X-ray tube."
            },
            "used_wavelength": {
               "$ref": "#/definitions/UsedWavelength",
               "description": "Which anode emission line this scan's 2-theta axis is reduced against. Not reported by every vendor -- see `UsedWavelength`."
            }
         },
         "type": "object"
      },
      "XrdGeometry": {
         "additionalProperties": false,
         "description": "Scan mode/geometry for an XRD measurement. See :py:class:`XrdGeometryMode`\nfor the per-vendor raw-file lookup and translation rules used to\npopulate `value` from `raw_value`.",
         "properties": {
            "value": {
               "description": "Standardized scan mode, translated from `raw_value`.",
               "example_values": [
                  "Coupled Reflection (Bragg-Brentano)",
                  "Detector Scan (Uncoupled)",
                  "Grazing Incidence (GIXRD)",
                  "X-ray Reflectivity (XRR)",
                  "Transmission (Capillary / Debye-Scherrer)",
                  "Transmission (Flat-Sheet Coupled)",
                  "Rocking Curve (\u03c9-Scan)",
                  "Phi Scan (\u03d5-Scan)",
                  "Psi Scan (\u03c8-Scan)",
                  "Reciprocal Space Mapping (RSM)",
                  "Grazing-Incidence Small-Angle X-ray Scattering (GISAXS)"
               ],
               "type": [
                  "string",
                  "null"
               ]
            },
            "raw_value": {
               "description": "The raw, untransformed scan mode/geometry value from the primary data.",
               "type": [
                  "string",
                  "null"
               ]
            }
         },
         "required": [
            "value",
            "raw_value"
         ],
         "type": "object"
      },
      "XrdMeasurementStatus": {
         "additionalProperties": false,
         "description": "Measurement lifecycle state for an XRD scan. Bruker's raw\n``<MeasurementStatus>`` value ``\"Measured\"`` (from ``RawData0.xml``)\nnormalizes to :py:attr:`XrdMeasurementStatusMode.COMPLETED`; Panalytical\nXRDML's own ``status`` attribute values pass straight through\n(lowercased) to the matching `XrdMeasurementStatusMode` member.",
         "properties": {
            "value": {
               "description": "Standardized measurement lifecycle state, translated from `raw_value`.",
               "example_values": [
                  "completed",
                  "aborted",
                  "not finished"
               ],
               "type": [
                  "string",
                  "null"
               ]
            },
            "raw_value": {
               "description": "The raw, untransformed measurement lifecycle state from the primary data.",
               "type": [
                  "string",
                  "null"
               ]
            }
         },
         "required": [
            "value",
            "raw_value"
         ],
         "type": "object"
      }
   }
}

Validators:

field detector: Detector#

Detector used for this scan.

field duration: RawValueRawUnit#

Total duration of the scan.

field geometry: XrdGeometry#

Sample measurement geometry used for this scan.

field measurement_program: str | None#

Name or path of the instrument method/program file used to run this scan (e.g. Bruker’s BsmlFileName, Rigaku’s PackageName). Not reported as a discrete field by every vendor – e.g. Empyrean only carries an equivalent value embedded in a free-text comment field – so this should be left unset where no discrete field exists in the raw data.

field measurement_status: XrdMeasurementStatus#

Lifecycle state of this scan’s measurement.

field pk: str#

Primary key for this scan, referenced by datacubes produced by it.

Constraints:
  • func = <function validate_uuid at 0x7f1493ac61f0>

  • json_schema_input_type = PydanticUndefined

field speed: RawValueRawUnit#

Scan speed, typically in degrees per minute. Only reported by some vendors; for others this is derivable from step_size and time_per_step. No QUDT unit for degrees-per-minute has been confirmed.

field step_size: RawValueRawUnit#

Angular increment between consecutive 2-theta scan points.

field time_per_step: RawValueRawUnit#

Integration (counting) time at each scan step.

field two_theta_start: RawValueRawUnit#

Start of the 2-theta scan range.

field two_theta_stop: RawValueRawUnit#

End of the 2-theta scan range.

field x_ray_source: XraySource#

X-ray tube settings used for this scan.