{
  "title": "BTS 13-01 synthetic grating pitch observed from a detached teaching witness",
  "type": "object",
  "required": ["schema","deviceId","kind","sampleId","frameId","revision","parentRevision","raster","measurement","calibration","projection","acquiredByRealInstrument","immutableStoredPixels","provenance"],
  "properties": {
    "schema": {"const":"bts.synthetic-grating-pitch.v1"},
    "deviceId": {"const":"13-01"},
    "kind": {"const":"synthetic geometry"},
    "sampleId": {"const":"locked-raster-grating-01"},
    "frameId": {"enum":["normal","projected"]},
    "revision": {"type":"integer","minimum":1},
    "parentRevision": {"type":"integer","minimum":0},
    "acquiredByRealInstrument": {"const":false},
    "immutableStoredPixels": {"const":true},
    "provenance": {"type":"string"},
    "calibration": {
      "type":"object",
      "required":["label","tickUm","tickPx","umPerPx","physicalStandard"],
      "properties":{"label":{"type":"string"},"tickUm":{"const":1},"tickPx":{"const":20},"umPerPx":{"const":0.05},"physicalStandard":{"const":false}}
    },
    "raster": {
      "type":"object",
      "required":["width","height","pixelSpacingUm","order","pixels","unit"],
      "properties":{
        "width":{"const":240},"height":{"const":96},"pixelSpacingUm":{"const":[0.05,0.05]},"order":{"const":"row-major, top-left origin, X increases right"},
        "pixels":{"type":"array","minItems":23040,"maxItems":23040,"items":{"type":"integer","minimum":0,"maximum":255}},"unit":{"const":"digital grayscale 0–255"}
      }
    },
    "measurement": {
      "type":"object",
      "required":["pitchPx","pitchUm","edgeIndices","normalPitchPx","ratio"],
      "properties":{"pitchPx":{"enum":[40,20]},"pitchUm":{"enum":[2,1]},"edgeIndices":{"type":"array","minItems":6,"maxItems":12,"items":{"type":"integer","minimum":0,"maximum":239}},"normalPitchPx":{"const":40},"ratio":{"enum":[1,0.5]}}
    },
    "projection": {
      "type":"object",
      "required":["type","detentDeg","expectedXRatio","planeToImageScale","sourcePlanePitchUm","deprojectedPitchUm","fixtureDisplayEnlargement","realSpecimenChanged"],
      "properties":{
        "type":{"type":"string"},"detentDeg":{"enum":[0,60]},"expectedXRatio":{"type":"number","minimum":0.5,"maximum":1},
        "planeToImageScale":{"type":"array","minItems":2,"maxItems":2,"items":{"type":"array","minItems":2,"maxItems":2,"items":{"type":"number"}}},
        "sourcePlanePitchUm":{"const":2},"deprojectedPitchUm":{"type":"number","minimum":1.999999,"maximum":2.000001},"fixtureDisplayEnlargement":{"const":1000},"realSpecimenChanged":{"const":false}
      }
    }
  }
}
