MDIO v0#

Altay Sansal

Apr 29, 2024

0 min read

Intro#

DatasetModelV0

Represents an MDIO v0 dataset schema.

VariableModelV0

Represents an MDIO v0 variable schema.

DatasetMetadataModelV0

Represents dataset attributes schema for MDIO v0.

DimensionModelV0

Represents dimension schema for MDIO v0.

Reference#

Dataset
pydantic model mdio.schemas.v0.dataset.DatasetModelV0#

Represents an MDIO v0 dataset schema.

Show JSON schema
{
   "title": "DatasetModelV0",
   "description": "Represents an MDIO v0 dataset schema.",
   "type": "object",
   "properties": {
      "seismic": {
         "description": "Variable containing seismic.",
         "items": {
            "$ref": "#/$defs/VariableModelV0"
         },
         "title": "Seismic",
         "type": "array"
      },
      "headers": {
         "description": "Variable containing headers.",
         "items": {
            "$ref": "#/$defs/VariableModelV0"
         },
         "title": "Headers",
         "type": "array"
      },
      "metadata": {
         "allOf": [
            {
               "$ref": "#/$defs/DatasetMetadataModelV0"
            }
         ],
         "description": "Dataset metadata."
      }
   },
   "$defs": {
      "Blosc": {
         "additionalProperties": false,
         "description": "Data Model for Blosc options.",
         "properties": {
            "name": {
               "default": "blosc",
               "description": "Name of the compressor.",
               "title": "Name",
               "type": "string"
            },
            "algorithm": {
               "allOf": [
                  {
                     "$ref": "#/$defs/BloscAlgorithm"
                  }
               ],
               "default": "lz4",
               "description": "The Blosc compression algorithm to be used."
            },
            "level": {
               "default": 5,
               "description": "The compression level.",
               "maximum": 9,
               "minimum": 0,
               "title": "Level",
               "type": "integer"
            },
            "shuffle": {
               "allOf": [
                  {
                     "$ref": "#/$defs/BloscShuffle"
                  }
               ],
               "default": 1,
               "description": "The shuffle strategy to be applied before compression."
            },
            "blocksize": {
               "default": 0,
               "description": "The size of the block to be used for compression.",
               "title": "Blocksize",
               "type": "integer"
            }
         },
         "title": "Blosc",
         "type": "object"
      },
      "BloscAlgorithm": {
         "description": "Enum for Blosc algorithm options.",
         "enum": [
            "blosclz",
            "lz4",
            "lz4hc",
            "zlib",
            "zstd"
         ],
         "title": "BloscAlgorithm",
         "type": "string"
      },
      "BloscShuffle": {
         "description": "Enum for Blosc shuffle options.",
         "enum": [
            0,
            1,
            2,
            -1
         ],
         "title": "BloscShuffle",
         "type": "integer"
      },
      "DatasetMetadataModelV0": {
         "additionalProperties": false,
         "description": "Represents dataset attributes schema for MDIO v0.",
         "properties": {
            "api_version": {
               "description": "MDIO version.",
               "title": "Api Version",
               "type": "string"
            },
            "created": {
               "description": "Creation time with TZ info.",
               "format": "date-time",
               "title": "Created",
               "type": "string"
            },
            "dimension": {
               "description": "Dimensions.",
               "items": {
                  "$ref": "#/$defs/DimensionModelV0"
               },
               "title": "Dimension",
               "type": "array"
            },
            "mean": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Mean value of the samples.",
               "title": "Mean"
            },
            "std": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Standard deviation of the samples.",
               "title": "Std"
            },
            "rms": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Root mean squared value of the samples.",
               "title": "Rms"
            },
            "min": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Minimum value of the samples.",
               "title": "Min"
            },
            "max": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Maximum value of the samples.",
               "title": "Max"
            },
            "trace_count": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Number of traces in the SEG-Y file.",
               "title": "Trace Count"
            }
         },
         "required": [
            "api_version",
            "created",
            "dimension"
         ],
         "title": "DatasetMetadataModelV0",
         "type": "object"
      },
      "DimensionModelV0": {
         "additionalProperties": false,
         "description": "Represents dimension schema for MDIO v0.",
         "properties": {
            "name": {
               "description": "Name of the dimension.",
               "title": "Name",
               "type": "string"
            },
            "coords": {
               "description": "Coordinate labels (ticks).",
               "items": {
                  "type": "integer"
               },
               "title": "Coords",
               "type": "array"
            }
         },
         "required": [
            "name",
            "coords"
         ],
         "title": "DimensionModelV0",
         "type": "object"
      },
      "NamedDimension": {
         "additionalProperties": false,
         "description": "Represents a single dimension with a name and size.",
         "properties": {
            "name": {
               "description": "Unique identifier for the dimension.",
               "title": "Name",
               "type": "string"
            },
            "size": {
               "description": "Total size of the dimension.",
               "exclusiveMinimum": 0,
               "title": "Size",
               "type": "integer"
            }
         },
         "required": [
            "name",
            "size"
         ],
         "title": "NamedDimension",
         "type": "object"
      },
      "ScalarType": {
         "description": "Scalar array data type.",
         "enum": [
            "bool",
            "int8",
            "int16",
            "int32",
            "int64",
            "uint8",
            "uint16",
            "uint32",
            "uint64",
            "float16",
            "float32",
            "float64",
            "longdouble",
            "complex64",
            "complex128",
            "clongdouble"
         ],
         "title": "ScalarType",
         "type": "string"
      },
      "StructuredField": {
         "additionalProperties": false,
         "description": "Structured array field with name, format.",
         "properties": {
            "format": {
               "$ref": "#/$defs/ScalarType"
            },
            "name": {
               "title": "Name",
               "type": "string"
            }
         },
         "required": [
            "format",
            "name"
         ],
         "title": "StructuredField",
         "type": "object"
      },
      "StructuredType": {
         "additionalProperties": false,
         "description": "Structured array type with packed fields.",
         "properties": {
            "fields": {
               "items": {
                  "$ref": "#/$defs/StructuredField"
               },
               "title": "Fields",
               "type": "array"
            }
         },
         "required": [
            "fields"
         ],
         "title": "StructuredType",
         "type": "object"
      },
      "VariableModelV0": {
         "additionalProperties": false,
         "description": "Represents an MDIO v0 variable schema.",
         "properties": {
            "dataType": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/ScalarType"
                  },
                  {
                     "$ref": "#/$defs/StructuredType"
                  }
               ],
               "description": "Type of the array.",
               "title": "Datatype"
            },
            "dimensions": {
               "anyOf": [
                  {
                     "items": {
                        "$ref": "#/$defs/NamedDimension"
                     },
                     "type": "array"
                  },
                  {
                     "items": {
                        "type": "string"
                     },
                     "type": "array"
                  }
               ],
               "description": "List of Dimension collection or reference to dimension names.",
               "title": "Dimensions"
            },
            "compressor": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/Blosc"
                  },
                  {
                     "$ref": "#/$defs/ZFP"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Compression settings.",
               "title": "Compressor"
            }
         },
         "required": [
            "dataType",
            "dimensions"
         ],
         "title": "VariableModelV0",
         "type": "object"
      },
      "ZFP": {
         "additionalProperties": false,
         "description": "Data Model for ZFP options.",
         "properties": {
            "name": {
               "default": "zfp",
               "description": "Name of the compressor.",
               "title": "Name",
               "type": "string"
            },
            "mode": {
               "$ref": "#/$defs/ZFPMode"
            },
            "tolerance": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Fixed accuracy in terms of absolute error tolerance.",
               "title": "Tolerance"
            },
            "rate": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Fixed rate in terms of number of compressed bits per value.",
               "title": "Rate"
            },
            "precision": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Fixed precision in terms of number of uncompressed bits per value.",
               "title": "Precision"
            },
            "writeHeader": {
               "default": true,
               "description": "Encode array shape, scalar type, and compression parameters.",
               "title": "Writeheader",
               "type": "boolean"
            }
         },
         "required": [
            "mode"
         ],
         "title": "ZFP",
         "type": "object"
      },
      "ZFPMode": {
         "description": "Enum for ZFP algorithm modes.",
         "enum": [
            "fixed_rate",
            "fixed_precision",
            "fixed_accuracy",
            "reversible"
         ],
         "title": "ZFPMode",
         "type": "string"
      }
   },
   "$schema": "https://json-schema.org/draft/2020-12/schema",
   "additionalProperties": false,
   "required": [
      "seismic",
      "headers",
      "metadata"
   ]
}

field headers: list[VariableModelV0] [Required]#

Variable containing headers.

field metadata: DatasetMetadataModelV0 [Required]#

Dataset metadata.

field seismic: list[VariableModelV0] [Required]#

Variable containing seismic.

pydantic model mdio.schemas.v0.dataset.DatasetMetadataModelV0#

Represents dataset attributes schema for MDIO v0.

Show JSON schema
{
   "title": "DatasetMetadataModelV0",
   "description": "Represents dataset attributes schema for MDIO v0.",
   "type": "object",
   "properties": {
      "api_version": {
         "description": "MDIO version.",
         "title": "Api Version",
         "type": "string"
      },
      "created": {
         "description": "Creation time with TZ info.",
         "format": "date-time",
         "title": "Created",
         "type": "string"
      },
      "dimension": {
         "description": "Dimensions.",
         "items": {
            "$ref": "#/$defs/DimensionModelV0"
         },
         "title": "Dimension",
         "type": "array"
      },
      "mean": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Mean value of the samples.",
         "title": "Mean"
      },
      "std": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Standard deviation of the samples.",
         "title": "Std"
      },
      "rms": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Root mean squared value of the samples.",
         "title": "Rms"
      },
      "min": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Minimum value of the samples.",
         "title": "Min"
      },
      "max": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Maximum value of the samples.",
         "title": "Max"
      },
      "trace_count": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Number of traces in the SEG-Y file.",
         "title": "Trace Count"
      }
   },
   "$defs": {
      "DimensionModelV0": {
         "additionalProperties": false,
         "description": "Represents dimension schema for MDIO v0.",
         "properties": {
            "name": {
               "description": "Name of the dimension.",
               "title": "Name",
               "type": "string"
            },
            "coords": {
               "description": "Coordinate labels (ticks).",
               "items": {
                  "type": "integer"
               },
               "title": "Coords",
               "type": "array"
            }
         },
         "required": [
            "name",
            "coords"
         ],
         "title": "DimensionModelV0",
         "type": "object"
      }
   },
   "additionalProperties": false,
   "required": [
      "api_version",
      "created",
      "dimension"
   ]
}

field api_version: str [Required]#

MDIO version.

field created: AwareDatetime [Required]#

Creation time with TZ info.

field dimension: list[DimensionModelV0] [Required]#

Dimensions.

field max: float | None = None#

Maximum value of the samples.

field mean: float | None = None#

Mean value of the samples.

field min: float | None = None#

Minimum value of the samples.

field rms: float | None = None#

Root mean squared value of the samples.

field std: float | None = None#

Standard deviation of the samples.

field trace_count: int | None = None#

Number of traces in the SEG-Y file.

pydantic model mdio.schemas.v0.dataset.DimensionModelV0#

Represents dimension schema for MDIO v0.

Show JSON schema
{
   "title": "DimensionModelV0",
   "description": "Represents dimension schema for MDIO v0.",
   "type": "object",
   "properties": {
      "name": {
         "description": "Name of the dimension.",
         "title": "Name",
         "type": "string"
      },
      "coords": {
         "description": "Coordinate labels (ticks).",
         "items": {
            "type": "integer"
         },
         "title": "Coords",
         "type": "array"
      }
   },
   "additionalProperties": false,
   "required": [
      "name",
      "coords"
   ]
}

field coords: list[int] [Required]#

Coordinate labels (ticks).

field name: str [Required]#

Name of the dimension.

Variable
pydantic model mdio.schemas.v0.dataset.VariableModelV0#

Represents an MDIO v0 variable schema.

Show JSON schema
{
   "title": "VariableModelV0",
   "description": "Represents an MDIO v0 variable schema.",
   "type": "object",
   "properties": {
      "dataType": {
         "anyOf": [
            {
               "$ref": "#/$defs/ScalarType"
            },
            {
               "$ref": "#/$defs/StructuredType"
            }
         ],
         "description": "Type of the array.",
         "title": "Datatype"
      },
      "dimensions": {
         "anyOf": [
            {
               "items": {
                  "$ref": "#/$defs/NamedDimension"
               },
               "type": "array"
            },
            {
               "items": {
                  "type": "string"
               },
               "type": "array"
            }
         ],
         "description": "List of Dimension collection or reference to dimension names.",
         "title": "Dimensions"
      },
      "compressor": {
         "anyOf": [
            {
               "$ref": "#/$defs/Blosc"
            },
            {
               "$ref": "#/$defs/ZFP"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Compression settings.",
         "title": "Compressor"
      }
   },
   "$defs": {
      "Blosc": {
         "additionalProperties": false,
         "description": "Data Model for Blosc options.",
         "properties": {
            "name": {
               "default": "blosc",
               "description": "Name of the compressor.",
               "title": "Name",
               "type": "string"
            },
            "algorithm": {
               "allOf": [
                  {
                     "$ref": "#/$defs/BloscAlgorithm"
                  }
               ],
               "default": "lz4",
               "description": "The Blosc compression algorithm to be used."
            },
            "level": {
               "default": 5,
               "description": "The compression level.",
               "maximum": 9,
               "minimum": 0,
               "title": "Level",
               "type": "integer"
            },
            "shuffle": {
               "allOf": [
                  {
                     "$ref": "#/$defs/BloscShuffle"
                  }
               ],
               "default": 1,
               "description": "The shuffle strategy to be applied before compression."
            },
            "blocksize": {
               "default": 0,
               "description": "The size of the block to be used for compression.",
               "title": "Blocksize",
               "type": "integer"
            }
         },
         "title": "Blosc",
         "type": "object"
      },
      "BloscAlgorithm": {
         "description": "Enum for Blosc algorithm options.",
         "enum": [
            "blosclz",
            "lz4",
            "lz4hc",
            "zlib",
            "zstd"
         ],
         "title": "BloscAlgorithm",
         "type": "string"
      },
      "BloscShuffle": {
         "description": "Enum for Blosc shuffle options.",
         "enum": [
            0,
            1,
            2,
            -1
         ],
         "title": "BloscShuffle",
         "type": "integer"
      },
      "NamedDimension": {
         "additionalProperties": false,
         "description": "Represents a single dimension with a name and size.",
         "properties": {
            "name": {
               "description": "Unique identifier for the dimension.",
               "title": "Name",
               "type": "string"
            },
            "size": {
               "description": "Total size of the dimension.",
               "exclusiveMinimum": 0,
               "title": "Size",
               "type": "integer"
            }
         },
         "required": [
            "name",
            "size"
         ],
         "title": "NamedDimension",
         "type": "object"
      },
      "ScalarType": {
         "description": "Scalar array data type.",
         "enum": [
            "bool",
            "int8",
            "int16",
            "int32",
            "int64",
            "uint8",
            "uint16",
            "uint32",
            "uint64",
            "float16",
            "float32",
            "float64",
            "longdouble",
            "complex64",
            "complex128",
            "clongdouble"
         ],
         "title": "ScalarType",
         "type": "string"
      },
      "StructuredField": {
         "additionalProperties": false,
         "description": "Structured array field with name, format.",
         "properties": {
            "format": {
               "$ref": "#/$defs/ScalarType"
            },
            "name": {
               "title": "Name",
               "type": "string"
            }
         },
         "required": [
            "format",
            "name"
         ],
         "title": "StructuredField",
         "type": "object"
      },
      "StructuredType": {
         "additionalProperties": false,
         "description": "Structured array type with packed fields.",
         "properties": {
            "fields": {
               "items": {
                  "$ref": "#/$defs/StructuredField"
               },
               "title": "Fields",
               "type": "array"
            }
         },
         "required": [
            "fields"
         ],
         "title": "StructuredType",
         "type": "object"
      },
      "ZFP": {
         "additionalProperties": false,
         "description": "Data Model for ZFP options.",
         "properties": {
            "name": {
               "default": "zfp",
               "description": "Name of the compressor.",
               "title": "Name",
               "type": "string"
            },
            "mode": {
               "$ref": "#/$defs/ZFPMode"
            },
            "tolerance": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Fixed accuracy in terms of absolute error tolerance.",
               "title": "Tolerance"
            },
            "rate": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Fixed rate in terms of number of compressed bits per value.",
               "title": "Rate"
            },
            "precision": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Fixed precision in terms of number of uncompressed bits per value.",
               "title": "Precision"
            },
            "writeHeader": {
               "default": true,
               "description": "Encode array shape, scalar type, and compression parameters.",
               "title": "Writeheader",
               "type": "boolean"
            }
         },
         "required": [
            "mode"
         ],
         "title": "ZFP",
         "type": "object"
      },
      "ZFPMode": {
         "description": "Enum for ZFP algorithm modes.",
         "enum": [
            "fixed_rate",
            "fixed_precision",
            "fixed_accuracy",
            "reversible"
         ],
         "title": "ZFPMode",
         "type": "string"
      }
   },
   "additionalProperties": false,
   "required": [
      "dataType",
      "dimensions"
   ]
}

field compressor: Blosc | ZFP | None = None#

Compression settings.

field dataType: ScalarType | StructuredType [Required]#

Type of the array.

field dimensions: list[NamedDimension] | list[str] [Required]#

List of Dimension collection or reference to dimension names.