{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://www.nanomani.com/data/characterisation/schema.json",
  "title": "nanoMani nanomaterial characterisation record",
  "description": "Minimal citable schema for carbon-nanotube and related nanomaterial characterisation facts. Values are as reported by the supplier or laboratory; this schema does not certify measurement quality.",
  "type": "object",
  "additionalProperties": false,
  "required": ["id", "material_class", "form", "reported_at"],
  "properties": {
    "id": {
      "type": "string",
      "minLength": 3,
      "maxLength": 128,
      "pattern": "^[a-z0-9][a-z0-9._-]*$",
      "description": "Stable slug for this record."
    },
    "material_class": {
      "type": "string",
      "enum": [
        "swcnt",
        "mwcnt",
        "dwcnt",
        "graphene",
        "graphene_oxide",
        "rgo",
        "quantum_dot",
        "nanodiamond",
        "other_carbon",
        "other"
      ]
    },
    "form": {
      "type": "string",
      "enum": [
        "powder",
        "dispersion",
        "film",
        "paper",
        "fiber",
        "paste",
        "wafer",
        "other"
      ]
    },
    "reported_at": {
      "type": "string",
      "format": "date",
      "description": "ISO date the characterisation was reported (YYYY-MM-DD)."
    },
    "supplier_name": { "type": "string", "maxLength": 200 },
    "product_name": { "type": "string", "maxLength": 200 },
    "lot_id": { "type": "string", "maxLength": 100 },
    "purity_wt_pct": {
      "type": "number",
      "minimum": 0,
      "maximum": 100,
      "description": "Weight-percent purity as stated by the reporter."
    },
    "raman_g_d_ratio": {
      "type": "number",
      "exclusiveMinimum": 0,
      "description": "Raman G/D intensity ratio when reported."
    },
    "raman_laser_nm": {
      "type": "number",
      "exclusiveMinimum": 0,
      "description": "Excitation wavelength used for Raman, nanometres."
    },
    "outer_diameter_nm": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "min": { "type": "number", "exclusiveMinimum": 0 },
        "max": { "type": "number", "exclusiveMinimum": 0 },
        "mean": { "type": "number", "exclusiveMinimum": 0 }
      }
    },
    "length_um": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "min": { "type": "number", "exclusiveMinimum": 0 },
        "max": { "type": "number", "exclusiveMinimum": 0 },
        "mean": { "type": "number", "exclusiveMinimum": 0 }
      }
    },
    "chirality_notes": {
      "type": "string",
      "maxLength": 500,
      "description": "Free-text chirality or (n,m) distribution notes."
    },
    "tem_ref_url": {
      "type": "string",
      "format": "uri",
      "description": "URL of a TEM micrograph or report the buyer can inspect."
    },
    "coa_ref_url": {
      "type": "string",
      "format": "uri",
      "description": "URL of a certificate of analysis when published by the supplier."
    },
    "method_notes": {
      "type": "string",
      "maxLength": 1000
    },
    "licence": {
      "type": "string",
      "description": "Licence for this record's redistribution.",
      "default": "CC-BY-4.0"
    }
  }
}
