ts_ids_components.xrd.sample module#

Sample component for XRD IDSs.

XrdSample extends the generic Sample common component with a pk (UUIDPrimaryKey) so a consuming IDS can declare it as a top-level array (samples: List[XrdSample], following the platform-wide samples top-level naming convention) and datacubes (see ts_ids_components.xrd.datacube and ts_ids_components.xrd.datacube_raw) can reference the specific sample a scan was measured on via fk_sample.

Model XrdSample[source]#

Bases: Sample

A sample measured by an XRD instrument.

Show JSON schema
{
   "description": "A sample measured by an XRD instrument.",
   "type": "object",
   "properties": {
      "id": {
         "description": "Unique identifier assigned to a sample.",
         "type": [
            "string",
            "null"
         ]
      },
      "name": {
         "description": "Sample name.",
         "type": [
            "string",
            "null"
         ]
      },
      "barcode": {
         "description": "Barcode assigned to a sample.",
         "type": [
            "string",
            "null"
         ]
      },
      "batch": {
         "$ref": "#/definitions/Batch"
      },
      "set": {
         "$ref": "#/definitions/Set",
         "description": "Sample set."
      },
      "location": {
         "$ref": "#/definitions/Location",
         "description": "Sample location information."
      },
      "compound": {
         "$ref": "#/definitions/Compound",
         "description": "Sample compound information."
      },
      "properties": {
         "type": "array",
         "items": {
            "$ref": "#/definitions/Property"
         },
         "description": "Sample properties."
      },
      "labels": {
         "description": "Sample labels.",
         "items": {
            "$ref": "#/definitions/Label"
         },
         "type": "array"
      },
      "pk": {
         "@primary_key": true,
         "description": "Primary key for this sample, referenced by datacubes measured on it.",
         "type": "string"
      }
   },
   "additionalProperties": false,
   "required": [
      "pk"
   ],
   "definitions": {
      "Batch": {
         "additionalProperties": false,
         "description": "A Batch is the result of a single manufacturing run for a drug product that is made as specified groups or amounts,  within a specific time frame from the same raw materials that is intended to have uniform character and quality, within specified limits.",
         "properties": {
            "id": {
               "description": "Unique identifier assigned to a batch.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "name": {
               "description": "Batch name",
               "type": [
                  "string",
                  "null"
               ]
            },
            "barcode": {
               "description": "Barcode assigned to a batch",
               "type": [
                  "string",
                  "null"
               ]
            }
         },
         "type": "object"
      },
      "Compound": {
         "additionalProperties": false,
         "description": "A Compound is a specific chemical or biochemical structure or substance that is being investigated. A Compound may be any drug substance, drug product intermediate, or drug product across small molecules, and cell and gene therapy (CGT).",
         "properties": {
            "id": {
               "description": "Unique identifier assigned to a compound.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "name": {
               "description": "Compound name.",
               "type": [
                  "string",
                  "null"
               ]
            }
         },
         "type": "object"
      },
      "Holder": {
         "additionalProperties": false,
         "description": "A sample container such as a microplate or a vial.",
         "properties": {
            "name": {
               "description": "Holder name.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "type": {
               "description": "Holder type.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "barcode": {
               "description": "Barcode assigned to a holder.",
               "type": [
                  "string",
                  "null"
               ]
            }
         },
         "type": "object"
      },
      "Label": {
         "additionalProperties": false,
         "description": "A Label associated with a sample, along with metadata about the label including\nthe source of the label and times associated with the label such as when it was\ncreated or looked up.",
         "properties": {
            "source": {
               "$ref": "#/definitions/Source",
               "description": "Sample label data source information."
            },
            "name": {
               "description": "Sample label name.",
               "type": "string"
            },
            "value": {
               "description": "Sample label value.",
               "type": "string"
            },
            "time": {
               "$ref": "#/definitions/SampleTime",
               "description": "Time associated with the sample label."
            }
         },
         "required": [
            "source",
            "name",
            "value",
            "time"
         ],
         "type": "object"
      },
      "Location": {
         "additionalProperties": false,
         "description": "The Location of the sample within the holder, such as the location of a well in a microplate.",
         "properties": {
            "position": {
               "description": "Raw position string.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "row": {
               "description": "Row index of sample location in a plate or holder.",
               "type": [
                  "number",
                  "null"
               ]
            },
            "column": {
               "description": "Column index of sample location in a plate or holder.",
               "type": [
                  "number",
                  "null"
               ]
            },
            "index": {
               "description": "Index of sample location flattened to a single dimension.",
               "type": [
                  "number",
                  "null"
               ]
            },
            "holder": {
               "$ref": "#/definitions/Holder",
               "description": "Sample holder information"
            }
         },
         "type": "object"
      },
      "Property": {
         "additionalProperties": false,
         "description": "A property has a name and a value of any type, with metadata about the\nproperty including the source of the property and times associated with it\nsuch as when the property was created or looked up.",
         "properties": {
            "source": {
               "$ref": "#/definitions/Source",
               "description": "Sample property data source information."
            },
            "name": {
               "description": "Sample Property name.",
               "type": "string"
            },
            "value": {
               "description": "The original string value of the property.",
               "type": "string"
            },
            "value_data_type": {
               "$ref": "#/definitions/ValueDataType",
               "description": "This is the type of the original value."
            },
            "string_value": {
               "description": "If string_value has a value, then numerical_value, numerical_value_unit, and boolean_value all have to be null.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "numerical_value": {
               "description": "If numerical_value has a value, then string_value and boolean_value both have to be null.",
               "type": [
                  "number",
                  "null"
               ]
            },
            "numerical_value_unit": {
               "description": "Unit for the numerical value.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "boolean_value": {
               "description": "If boolean_value has a value, then numerical_value, numerical_value_unit, and string_value all have to be null.",
               "type": [
                  "boolean",
                  "null"
               ]
            },
            "time": {
               "$ref": "#/definitions/SampleTime",
               "description": "Time associated with the sample property."
            }
         },
         "required": [
            "source",
            "name",
            "value",
            "value_data_type",
            "string_value",
            "numerical_value",
            "numerical_value_unit",
            "boolean_value",
            "time"
         ],
         "type": "object"
      },
      "RawSampleTime": {
         "additionalProperties": false,
         "description": "The base model for time associated with a specific sample.",
         "properties": {
            "start": {
               "description": "Process/experiment/task start time.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "created": {
               "description": "Data created time.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "stop": {
               "description": "Process/experiment/task stop/finish time.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "duration": {
               "description": "Process/experiment/task duration.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "last_updated": {
               "description": "Data last updated time of a file/method.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "acquired": {
               "description": "Data acquired/exported/captured time.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "modified": {
               "description": "Data last modified/edited time.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "lookup": {
               "description": "Raw sample data lookup time.",
               "type": [
                  "string",
                  "null"
               ]
            }
         },
         "required": [
            "lookup"
         ],
         "type": "object"
      },
      "SampleTime": {
         "additionalProperties": false,
         "description": "A model for experiment sample datetime values converted to a standard ISO format\nand their respective raw datetime values in the primary data.",
         "properties": {
            "start": {
               "description": "Process/experiment/task start time.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "created": {
               "description": "Data created time.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "stop": {
               "description": "Process/experiment/task stop/finish time.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "duration": {
               "description": "Process/experiment/task duration.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "last_updated": {
               "description": "Data last updated time of a file/method.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "acquired": {
               "description": "Data acquired/exported/captured time.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "modified": {
               "description": "Data last modified/edited time.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "lookup": {
               "description": "Raw sample data lookup time.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "raw": {
               "$ref": "#/definitions/RawSampleTime",
               "description": "Raw sample time values from primary data."
            }
         },
         "required": [
            "lookup"
         ],
         "type": "object"
      },
      "Set": {
         "additionalProperties": false,
         "description": "A group of Samples.",
         "properties": {
            "id": {
               "description": "Unique identifier assigned to a set.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "name": {
               "description": "Set name.",
               "type": [
                  "string",
                  "null"
               ]
            }
         },
         "type": "object"
      },
      "Source": {
         "additionalProperties": false,
         "description": "The Source of information, such as a data file or a sample database.",
         "properties": {
            "name": {
               "description": "Source name.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "type": {
               "description": "Source type.",
               "type": [
                  "string",
                  "null"
               ]
            }
         },
         "required": [
            "name",
            "type"
         ],
         "type": "object"
      },
      "ValueDataType": {
         "description": "Allowed data type values.",
         "enum": [
            "string",
            "number",
            "boolean"
         ],
         "type": "string"
      }
   }
}

Validators:

field barcode: Nullable[str]#

Barcode assigned to a sample.

field batch: Batch#
field compound: Compound#

Sample compound information.

field id_: Nullable[str] (alias 'id')#

Unique identifier assigned to a sample.

field labels: List[Label]#

Sample labels.

field location: Location#

Sample location information.

field name: Nullable[str]#

Sample name.

field pk: str#

Primary key for this sample, referenced by datacubes measured on it.

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

  • json_schema_input_type = PydanticUndefined

field properties: List[Property]#

Sample properties.

field set_: Set (alias 'set')#

Sample set.