ts_ids_components.tangential_flow_filtration package#

Module contents#

This module contains components for the Tangential Flow Filtration results data model.

Tangential Flow Filtration (TFF) is a filtration technique where the fluid flows tangentially across the surface of a filter membrane rather than directly into it.

Data from a tangential flow filtration device comes typically in time series formats since a filtration takes time to execute. This include multiple datapoints for each run.

Because of the multiple data points, a parquet file is used to store the data. The parquet file is referenced via file name and file ID in the TangentialFlowFiltrationResults class component.

The Result class component also holds high level time series data measurements from a tangential flow filtration device as well as the associated foreign keys.

This data model encapsulates high-level time series data measurements from a tangential flow filtration device. It includes:

  • A reference to the parquet file containing the detailed time series data. file_name and file_id

  • Basic time data (minimum and maximum timestamps) via the MinMaxTime class.

  • A comprehensive results component (TangentialFlowFiltrationResults) that links experimental run

information to its corresponding parquet file through various foreign key relationships (run, method, system, user, and sample).

The IDS serves as the central document, providing a primary key for each experimental run, which is used to associate additional data (such as recipe, system, user, alarms, etc.) via foreign key relationships. This design ensures that the results component accurately references and locates the corresponding parquet file containing all detailed time series data.

The resulting IDS JSON will look like this after calling instance.model_dump_json(indent=2):

{
  "file_name": "sample.parquet",
  "file_id": "abc00000-0000-0000-0000-000000000001",
  "fk_run": "abc00000-0000-0000-0000-000000000002",
  "fk_method": "abc00000-0000-0000-0000-000000000003",
  "fk_sample": "abc00000-0000-0000-0000-000000000001",
  "time": {
    "start_timestamp": "2023-01-01T00:00:00Z",
    "end_timestamp": "2023-01-01T12:00:00Z",
    "raw": {
      "start_timestamp": "2023-01-01T00:00:00Z",
      "end_timestamp": "2023-01-01T12:00:00Z"
    }
  }
}
Model MinMaxTime[source]#

Bases: IdsElement

Time data from a tangential flow filtration device.

Show JSON schema
{
   "description": "Time data from a tangential flow filtration device.",
   "type": "object",
   "properties": {
      "min_timestamp": {
         "description": "Minimum time data from the raw file. Equivalent to a start timestamp",
         "type": [
            "string",
            "null"
         ]
      },
      "max_timestamp": {
         "description": "Maximum time data from the raw file. Equivalent to an end timestamp",
         "type": [
            "string",
            "null"
         ]
      }
   },
   "additionalProperties": false
}

Validators:

field max_timestamp: str | None#

Maximum time data from the raw file. Equivalent to an end timestamp

field min_timestamp: str | None#

Minimum time data from the raw file. Equivalent to a start timestamp

Model StartEndTime[source]#

Bases: IdsElement

Start and end time data from a tangential flow filtration device. Preferred method to use for time-series data.

Show JSON schema
{
   "description": "Start and end time data from a tangential flow filtration device.\nPreferred method to use for time-series data.",
   "type": "object",
   "properties": {
      "start_timestamp": {
         "description": "Start time data from the raw file. Equivalent to a minimum timestamp.",
         "type": [
            "string",
            "null"
         ]
      },
      "end_timestamp": {
         "description": "End time data from the raw file. Equivalent to a maximum timestamp.",
         "type": [
            "string",
            "null"
         ]
      }
   },
   "additionalProperties": false
}

Validators:

field end_timestamp: str | None#

End time data from the raw file. Equivalent to a maximum timestamp.

field start_timestamp: str | None#

Start time data from the raw file. Equivalent to a minimum timestamp.

Model RawTime[source]#

Bases: StartEndTime, MinMaxTime

Raw time data that includes both start/end and min/max timestamps.

Show JSON schema
{
   "description": "Raw time data that includes both start/end and min/max timestamps.",
   "type": "object",
   "properties": {
      "min_timestamp": {
         "description": "Minimum time data from the raw file. Equivalent to a start timestamp",
         "type": [
            "string",
            "null"
         ]
      },
      "max_timestamp": {
         "description": "Maximum time data from the raw file. Equivalent to an end timestamp",
         "type": [
            "string",
            "null"
         ]
      },
      "start_timestamp": {
         "description": "Start time data from the raw file. Equivalent to a minimum timestamp.",
         "type": [
            "string",
            "null"
         ]
      },
      "end_timestamp": {
         "description": "End time data from the raw file. Equivalent to a maximum timestamp.",
         "type": [
            "string",
            "null"
         ]
      }
   },
   "additionalProperties": false
}

Validators:

field end_timestamp: str | None#

End time data from the raw file. Equivalent to a maximum timestamp.

field start_timestamp: str | None#

Start time data from the raw file. Equivalent to a minimum timestamp.

Model Time[source]#

Bases: StartEndTime, MinMaxTime

Time data from a tangential flow filtration device. Inherits both start/end timestamps and min/max timestamps.

Show JSON schema
{
   "description": "Time data from a tangential flow filtration device.\nInherits both start/end timestamps and min/max timestamps.",
   "type": "object",
   "properties": {
      "min_timestamp": {
         "description": "Minimum time data from the raw file. Equivalent to a start timestamp",
         "type": [
            "string",
            "null"
         ]
      },
      "max_timestamp": {
         "description": "Maximum time data from the raw file. Equivalent to an end timestamp",
         "type": [
            "string",
            "null"
         ]
      },
      "start_timestamp": {
         "description": "Start time data from the raw file. Equivalent to a minimum timestamp.",
         "type": [
            "string",
            "null"
         ]
      },
      "end_timestamp": {
         "description": "End time data from the raw file. Equivalent to a maximum timestamp.",
         "type": [
            "string",
            "null"
         ]
      },
      "raw": {
         "$ref": "#/definitions/RawTime",
         "description": "Raw time data from the raw file."
      }
   },
   "additionalProperties": false,
   "definitions": {
      "RawTime": {
         "additionalProperties": false,
         "description": "Raw time data that includes both start/end and min/max timestamps.",
         "properties": {
            "min_timestamp": {
               "description": "Minimum time data from the raw file. Equivalent to a start timestamp",
               "type": [
                  "string",
                  "null"
               ]
            },
            "max_timestamp": {
               "description": "Maximum time data from the raw file. Equivalent to an end timestamp",
               "type": [
                  "string",
                  "null"
               ]
            },
            "start_timestamp": {
               "description": "Start time data from the raw file. Equivalent to a minimum timestamp.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "end_timestamp": {
               "description": "End time data from the raw file. Equivalent to a maximum timestamp.",
               "type": [
                  "string",
                  "null"
               ]
            }
         },
         "type": "object"
      }
   }
}

Validators:

field raw: RawTime#

Raw time data from the raw file.

Model TangentialFlowFiltrationResults[source]#

Bases: IdsElement

Time Series data measurements from tangential flow filtration device and all associated data.

Show JSON schema
{
   "description": "Time Series data measurements from tangential flow filtration device\nand all associated data.",
   "type": "object",
   "properties": {
      "file_name": {
         "description": "The name of the parquet file containing the data.",
         "type": "string"
      },
      "file_id": {
         "description": "The file ID of the parquet file containing the data.",
         "type": "string"
      },
      "fk_run": {
         "@foreign_key": "/properties/runs/items/properties/pk",
         "description": "Foreign key relating the parquet file back to the experiment run.",
         "type": "string"
      },
      "fk_method": {
         "@foreign_key": "/properties/methods/items/properties/pk",
         "description": "Foreign key relating the parquet file back to the method.",
         "type": "string"
      },
      "fk_sample": {
         "@foreign_key": "/properties/samples/items/properties/pk",
         "description": "Foreign key relating the parquet file back to the sample.",
         "type": "string"
      },
      "time": {
         "$ref": "#/definitions/Time"
      }
   },
   "additionalProperties": false,
   "required": [
      "fk_run",
      "fk_method",
      "fk_sample"
   ],
   "definitions": {
      "RawTime": {
         "additionalProperties": false,
         "description": "Raw time data that includes both start/end and min/max timestamps.",
         "properties": {
            "min_timestamp": {
               "description": "Minimum time data from the raw file. Equivalent to a start timestamp",
               "type": [
                  "string",
                  "null"
               ]
            },
            "max_timestamp": {
               "description": "Maximum time data from the raw file. Equivalent to an end timestamp",
               "type": [
                  "string",
                  "null"
               ]
            },
            "start_timestamp": {
               "description": "Start time data from the raw file. Equivalent to a minimum timestamp.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "end_timestamp": {
               "description": "End time data from the raw file. Equivalent to a maximum timestamp.",
               "type": [
                  "string",
                  "null"
               ]
            }
         },
         "type": "object"
      },
      "Time": {
         "additionalProperties": false,
         "description": "Time data from a tangential flow filtration device.\nInherits both start/end timestamps and min/max timestamps.",
         "properties": {
            "min_timestamp": {
               "description": "Minimum time data from the raw file. Equivalent to a start timestamp",
               "type": [
                  "string",
                  "null"
               ]
            },
            "max_timestamp": {
               "description": "Maximum time data from the raw file. Equivalent to an end timestamp",
               "type": [
                  "string",
                  "null"
               ]
            },
            "start_timestamp": {
               "description": "Start time data from the raw file. Equivalent to a minimum timestamp.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "end_timestamp": {
               "description": "End time data from the raw file. Equivalent to a maximum timestamp.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "raw": {
               "$ref": "#/definitions/RawTime",
               "description": "Raw time data from the raw file."
            }
         },
         "type": "object"
      }
   }
}

Validators:

field file_id: str#

The file ID of the parquet file containing the data.

field file_name: str#

The name of the parquet file containing the data.

field fk_method: str#

Foreign key relating the parquet file back to the method.

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

  • json_schema_input_type = PydanticUndefined

  • ids_field_arg = primary_key

  • pk_reference_field = @foreign_key

field fk_run: str#

Foreign key relating the parquet file back to the experiment run.

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

  • json_schema_input_type = PydanticUndefined

  • ids_field_arg = primary_key

  • pk_reference_field = @foreign_key

field fk_sample: str#

Foreign key relating the parquet file back to the sample.

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

  • json_schema_input_type = PydanticUndefined

  • ids_field_arg = primary_key

  • pk_reference_field = @foreign_key

field time: Time#