{
  "$defs": {
    "Action": {
      "description": "面の働き（屈折は省く）。mirror は反射してから位相・傾きを加える",
      "oneOf": [
        {
          "const": "reflect",
          "description": "反射（鏡）",
          "type": "string"
        },
        {
          "additionalProperties": false,
          "description": "屈折面での反射（ゴーストの経路の解析の写し）。medium は光が入らない側の媒質",
          "properties": {
            "ghost_reflect": {
              "additionalProperties": false,
              "properties": {
                "medium": {
                  "type": "string"
                }
              },
              "required": [
                "medium"
              ],
              "type": "object"
            }
          },
          "required": [
            "ghost_reflect"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "description": "理想レンズ（焦点距離 f、OPD の求め方 opd_mode）",
          "properties": {
            "paraxial": {
              "additionalProperties": false,
              "properties": {
                "f": {
                  "anyOf": [
                    {
                      "format": "double",
                      "type": "number"
                    },
                    {
                      "$ref": "#/$defs/NonFinite"
                    }
                  ]
                },
                "mirror": {
                  "type": "boolean"
                },
                "opd_mode": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "f"
              ],
              "type": "object"
            }
          },
          "required": [
            "paraxial"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "description": "Jones 行列 [Ar, Ai, Br, Bi, Cr, Ci, Dr, Di]、または波長ごとに作る偏光子・波長板",
          "properties": {
            "jones": {
              "additionalProperties": false,
              "properties": {
                "matrix": {
                  "items": {
                    "anyOf": [
                      {
                        "format": "double",
                        "type": "number"
                      },
                      {
                        "$ref": "#/$defs/NonFinite"
                      }
                    ]
                  },
                  "maxItems": 8,
                  "minItems": 8,
                  "type": "array"
                },
                "mirror": {
                  "type": "boolean"
                },
                "retarder": {
                  "anyOf": [
                    {
                      "$ref": "#/$defs/Retarder"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "type": "object"
            }
          },
          "required": [
            "jones"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "description": "Binary 2: 位相 Φ = order · Σ coef[i] ρ^{2(i+1)}（形は偶数次非球面）",
          "properties": {
            "binary2": {
              "additionalProperties": false,
              "properties": {
                "mirror": {
                  "type": "boolean"
                },
                "phase": {
                  "anyOf": [
                    {
                      "$ref": "#/$defs/Binary2"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "type": "object"
            }
          },
          "required": [
            "binary2"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "description": "Fresnel: 交点は頂点の平面、屈折は偶数次非球面（c・k・a）の傾きで",
          "properties": {
            "fresnel": {
              "additionalProperties": false,
              "properties": {
                "a": {
                  "items": {
                    "anyOf": [
                      {
                        "format": "double",
                        "type": "number"
                      },
                      {
                        "$ref": "#/$defs/NonFinite"
                      }
                    ]
                  },
                  "type": "array"
                },
                "c": {
                  "anyOf": [
                    {
                      "format": "double",
                      "type": "number"
                    },
                    {
                      "$ref": "#/$defs/NonFinite"
                    }
                  ]
                },
                "k": {
                  "anyOf": [
                    {
                      "format": "double",
                      "type": "number"
                    },
                    {
                      "$ref": "#/$defs/NonFinite"
                    }
                  ]
                },
                "mirror": {
                  "type": "boolean"
                }
              },
              "type": "object"
            }
          },
          "required": [
            "fresnel"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "description": "Cylinder Fresnel: 交点は形（cylinder）、屈折は bend の面の傾きで",
          "properties": {
            "cylinder_fresnel": {
              "additionalProperties": false,
              "properties": {
                "bend": {
                  "anyOf": [
                    {
                      "$ref": "#/$defs/CylFresnel"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "mirror": {
                  "type": "boolean"
                }
              },
              "type": "object"
            }
          },
          "required": [
            "cylinder_fresnel"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "description": "複屈折材の板の入口（mode 0: 常光の成分だけ、2: 波長板。axis は結晶軸）",
          "properties": {
            "birefringent_in": {
              "additionalProperties": false,
              "properties": {
                "axis": {
                  "items": {
                    "anyOf": [
                      {
                        "format": "double",
                        "type": "number"
                      },
                      {
                        "$ref": "#/$defs/NonFinite"
                      }
                    ]
                  },
                  "maxItems": 3,
                  "minItems": 3,
                  "type": "array"
                },
                "mode": {
                  "format": "uint8",
                  "maximum": 255,
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "required": [
                "mode",
                "axis"
              ],
              "type": "object"
            }
          },
          "required": [
            "birefringent_in"
          ],
          "type": "object"
        },
        {
          "const": "birefringent_out",
          "description": "複屈折材の板の出口",
          "type": "string"
        },
        {
          "additionalProperties": false,
          "description": "利用者定義の面（登録のモデルの名前と設定）",
          "properties": {
            "user": {
              "additionalProperties": false,
              "properties": {
                "config": {
                  "additionalProperties": {
                    "$ref": "#/$defs/Value"
                  },
                  "default": {},
                  "type": "object"
                },
                "mirror": {
                  "type": "boolean"
                },
                "model": {
                  "type": "string"
                }
              },
              "required": [
                "model"
              ],
              "type": "object"
            }
          },
          "required": [
            "user"
          ],
          "type": "object"
        }
      ]
    },
    "AfocalUnit": {
      "description": "アフォーカル像空間の角度の単位（.zmx の UNIT の値の 6 番目、OpticStudio の Afocal Mode Units）",
      "enum": [
        "microradians",
        "milliradians",
        "radians",
        "arc_seconds",
        "arc_minutes",
        "degrees"
      ],
      "type": "string"
    },
    "After": {
      "anyOf": [
        {
          "$ref": "#/$defs/Reverse",
          "description": "\"reverse\": 前の変換を戻す"
        },
        {
          "$ref": "#/$defs/Tilt"
        }
      ],
      "description": "面の後の傾き・偏心"
    },
    "AimPupil": {
      "description": "光線エイミングの瞳のずれ・圧縮（[`super::Prescription::aim_pupil`]）。追跡には使わない",
      "properties": {
        "auto_shift": {
          "description": "ずれを自動で求める（Automatic pupil shifting）。None は書いていない（.zmx に書くときは 1）",
          "type": [
            "boolean",
            "null"
          ]
        },
        "compress": {
          "default": [
            0.0,
            0.0
          ],
          "description": "瞳の圧縮 x・y",
          "items": {
            "anyOf": [
              {
                "format": "double",
                "type": "number"
              },
              {
                "$ref": "#/$defs/NonFinite"
              }
            ]
          },
          "maxItems": 2,
          "minItems": 2,
          "type": "array"
        },
        "scale_by_field": {
          "default": false,
          "description": "ずれを視野で倍率する（Scale Pupil Shift Factors By Field）",
          "type": "boolean"
        },
        "shift": {
          "default": [
            0.0,
            0.0,
            0.0
          ],
          "description": "瞳のずれ x・y・z（レンズ単位）",
          "items": {
            "anyOf": [
              {
                "format": "double",
                "type": "number"
              },
              {
                "$ref": "#/$defs/NonFinite"
              }
            ]
          },
          "maxItems": 3,
          "minItems": 3,
          "type": "array"
        }
      },
      "type": "object"
    },
    "Aiming": {
      "description": "光線エイミング。JSON の名前は \"off\"・\"paraxial\"・\"real\"",
      "enum": [
        "off",
        "paraxial",
        "real"
      ],
      "type": "string"
    },
    "Aperture": {
      "description": "面の開口",
      "oneOf": [
        {
          "additionalProperties": false,
          "description": "円（最小・最大半径、偏心）",
          "properties": {
            "circular": {
              "additionalProperties": false,
              "properties": {
                "dx": {
                  "anyOf": [
                    {
                      "format": "double",
                      "type": "number"
                    },
                    {
                      "$ref": "#/$defs/NonFinite"
                    }
                  ]
                },
                "dy": {
                  "anyOf": [
                    {
                      "format": "double",
                      "type": "number"
                    },
                    {
                      "$ref": "#/$defs/NonFinite"
                    }
                  ]
                },
                "max": {
                  "anyOf": [
                    {
                      "format": "double",
                      "type": "number"
                    },
                    {
                      "$ref": "#/$defs/NonFinite"
                    }
                  ]
                },
                "min": {
                  "anyOf": [
                    {
                      "format": "double",
                      "type": "number"
                    },
                    {
                      "$ref": "#/$defs/NonFinite"
                    }
                  ]
                }
              },
              "required": [
                "max"
              ],
              "type": "object"
            }
          },
          "required": [
            "circular"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "description": "矩形（x・y の半幅、偏心）",
          "properties": {
            "rect": {
              "additionalProperties": false,
              "properties": {
                "dx": {
                  "anyOf": [
                    {
                      "format": "double",
                      "type": "number"
                    },
                    {
                      "$ref": "#/$defs/NonFinite"
                    }
                  ]
                },
                "dy": {
                  "anyOf": [
                    {
                      "format": "double",
                      "type": "number"
                    },
                    {
                      "$ref": "#/$defs/NonFinite"
                    }
                  ]
                },
                "hx": {
                  "anyOf": [
                    {
                      "format": "double",
                      "type": "number"
                    },
                    {
                      "$ref": "#/$defs/NonFinite"
                    }
                  ]
                },
                "hy": {
                  "anyOf": [
                    {
                      "format": "double",
                      "type": "number"
                    },
                    {
                      "$ref": "#/$defs/NonFinite"
                    }
                  ]
                }
              },
              "required": [
                "hx",
                "hy"
              ],
              "type": "object"
            }
          },
          "required": [
            "rect"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "description": "浮動開口（半径は面の半直径。違うときだけ semi）",
          "properties": {
            "floating": {
              "additionalProperties": false,
              "properties": {
                "semi": {
                  "anyOf": [
                    {
                      "format": "double",
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    {
                      "$ref": "#/$defs/NonFinite"
                    }
                  ]
                }
              },
              "type": "object"
            }
          },
          "required": [
            "floating"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "description": "楕円（x・y の半軸、偏心）",
          "properties": {
            "ellipse": {
              "additionalProperties": false,
              "properties": {
                "dx": {
                  "anyOf": [
                    {
                      "format": "double",
                      "type": "number"
                    },
                    {
                      "$ref": "#/$defs/NonFinite"
                    }
                  ]
                },
                "dy": {
                  "anyOf": [
                    {
                      "format": "double",
                      "type": "number"
                    },
                    {
                      "$ref": "#/$defs/NonFinite"
                    }
                  ]
                },
                "hx": {
                  "anyOf": [
                    {
                      "format": "double",
                      "type": "number"
                    },
                    {
                      "$ref": "#/$defs/NonFinite"
                    }
                  ]
                },
                "hy": {
                  "anyOf": [
                    {
                      "format": "double",
                      "type": "number"
                    },
                    {
                      "$ref": "#/$defs/NonFinite"
                    }
                  ]
                }
              },
              "required": [
                "hx",
                "hy"
              ],
              "type": "object"
            }
          },
          "required": [
            "ellipse"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "description": "円形遮蔽（最小〜最大半径の間を遮る）",
          "properties": {
            "obscuration": {
              "additionalProperties": false,
              "properties": {
                "dx": {
                  "anyOf": [
                    {
                      "format": "double",
                      "type": "number"
                    },
                    {
                      "$ref": "#/$defs/NonFinite"
                    }
                  ]
                },
                "dy": {
                  "anyOf": [
                    {
                      "format": "double",
                      "type": "number"
                    },
                    {
                      "$ref": "#/$defs/NonFinite"
                    }
                  ]
                },
                "max": {
                  "anyOf": [
                    {
                      "format": "double",
                      "type": "number"
                    },
                    {
                      "$ref": "#/$defs/NonFinite"
                    }
                  ]
                },
                "min": {
                  "anyOf": [
                    {
                      "format": "double",
                      "type": "number"
                    },
                    {
                      "$ref": "#/$defs/NonFinite"
                    }
                  ]
                }
              },
              "required": [
                "max"
              ],
              "type": "object"
            }
          },
          "required": [
            "obscuration"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "description": "スパイダー（幅 width の腕 arms 本）",
          "properties": {
            "spider": {
              "additionalProperties": false,
              "properties": {
                "arms": {
                  "format": "uint32",
                  "minimum": 0,
                  "type": "integer"
                },
                "dx": {
                  "anyOf": [
                    {
                      "format": "double",
                      "type": "number"
                    },
                    {
                      "$ref": "#/$defs/NonFinite"
                    }
                  ]
                },
                "dy": {
                  "anyOf": [
                    {
                      "format": "double",
                      "type": "number"
                    },
                    {
                      "$ref": "#/$defs/NonFinite"
                    }
                  ]
                },
                "width": {
                  "anyOf": [
                    {
                      "format": "double",
                      "type": "number"
                    },
                    {
                      "$ref": "#/$defs/NonFinite"
                    }
                  ]
                }
              },
              "required": [
                "width",
                "arms"
              ],
              "type": "object"
            }
          },
          "required": [
            "spider"
          ],
          "type": "object"
        }
      ]
    },
    "ApertureKind": {
      "description": "系の開口の種類。JSON の名前は \"epd\"・\"fnum\"・\"na\"・\"float\"・\"pwfn\"・\"cone\"",
      "oneOf": [
        {
          "const": "epd",
          "description": "入射瞳径",
          "type": "string"
        },
        {
          "const": "fnum",
          "description": "像側 F 値",
          "type": "string"
        },
        {
          "const": "na",
          "description": "物体側 NA",
          "type": "string"
        },
        {
          "const": "float",
          "description": "絞り径（絞りの半直径）",
          "type": "string"
        },
        {
          "const": "pwfn",
          "description": "近軸作動 F 値",
          "type": "string"
        },
        {
          "const": "cone",
          "description": "物体側コーン角",
          "type": "string"
        }
      ]
    },
    "ApertureSpec": {
      "additionalProperties": false,
      "description": "系の開口",
      "properties": {
        "type": {
          "$ref": "#/$defs/ApertureKind"
        },
        "value": {
          "anyOf": [
            {
              "format": "double",
              "type": "number"
            },
            {
              "$ref": "#/$defs/NonFinite"
            }
          ]
        }
      },
      "required": [
        "type",
        "value"
      ],
      "type": "object"
    },
    "Apodization": {
      "description": "瞳のアポダイゼーション（系の設定。.zmx の系の行 GFAC 係数 種類、OpticStudio の System Explorer の Aperture の\nApodization Type・Apodization Factor）。解析の瞳関数の振幅に常に入る（FFT PSF・Huygens PSF・回折 MTF）。\n\n式は OpticStudio のヘルプ（System Explorer > Aperture）の定義に合わせる:\n- Gaussian: 「瞳の上で振幅がガウス形に変わる。アポダイゼーション係数は振幅が瞳の半径の座標で減る速さ」。\n  振幅 A(ρ) = exp(−G ρ²)（ρ は正規化瞳の半径、G が係数。瞳の中心で 1）。G = 1 で縁の振幅が 1/e（強度 1/e²）、\n  強度が 1/e² になる半径は ρ₀ = 1/√G（ヘルプの例「係数 3 なら入射瞳の直径が 1/e² の幅の √3 倍」と同じ）。\n- Cosine Cubed: 「点光源が平面を照らすときの強度の落ち方」。強度 I(θ) = cos³θ（θ は z 軸と、入射瞳と交わる\n  光線の角）を瞳の中心で 1 に正規化（I/I_中心）。振幅は √I。θ は物点から近軸の入射瞳の面の点\n  (ρ_x r, ρ_y r)（r は入射瞳の半径）への向きで求める。無限遠物体ではどの光線も同じ向きなので一様になる。\n\nOpticStudio 26.1 と照合済み（Cooke 40 の Strehl が OS の FFT PSF 瞳 512 と 0.3% 以内。試験は解析的に確かめたもの）",
      "oneOf": [
        {
          "const": "uniform",
          "description": "一様（.zmx の GFAC _ 0）",
          "type": "string"
        },
        {
          "additionalProperties": false,
          "description": "ガウス A(ρ) = exp(−G ρ²)（GFAC G 1）",
          "properties": {
            "gaussian": {
              "anyOf": [
                {
                  "format": "double",
                  "type": "number"
                },
                {
                  "$ref": "#/$defs/NonFinite"
                }
              ]
            }
          },
          "required": [
            "gaussian"
          ],
          "type": "object"
        },
        {
          "const": "cosine_cubed",
          "description": "cos³θ の強度（GFAC _ 2）",
          "type": "string"
        }
      ]
    },
    "Auto": {
      "enum": [
        "auto"
      ],
      "type": "string"
    },
    "Binary2": {
      "description": "Binary 2 の位相 Φ = order · Σ coef[i] ρ^{2(i+1)}（ρ = r / norm、係数の単位は rad）",
      "properties": {
        "coef": {
          "items": {
            "anyOf": [
              {
                "format": "double",
                "type": "number"
              },
              {
                "$ref": "#/$defs/NonFinite"
              }
            ]
          },
          "type": "array"
        },
        "norm": {
          "anyOf": [
            {
              "format": "double",
              "type": "number"
            },
            {
              "$ref": "#/$defs/NonFinite"
            }
          ],
          "description": "正規化半径"
        },
        "order": {
          "anyOf": [
            {
              "format": "double",
              "type": "number"
            },
            {
              "$ref": "#/$defs/NonFinite"
            }
          ],
          "description": "回折次数 M"
        }
      },
      "required": [
        "order",
        "norm",
        "coef"
      ],
      "type": "object"
    },
    "Bore": {
      "description": "部品の穴（円柱）。z は部品の座標 [mm]",
      "properties": {
        "radius": {
          "anyOf": [
            {
              "format": "double",
              "type": "number"
            },
            {
              "$ref": "#/$defs/NonFinite"
            }
          ],
          "description": "半径 [mm]"
        },
        "z0": {
          "anyOf": [
            {
              "format": "double",
              "type": "number"
            },
            {
              "$ref": "#/$defs/NonFinite"
            }
          ]
        },
        "z1": {
          "anyOf": [
            {
              "format": "double",
              "type": "number"
            },
            {
              "$ref": "#/$defs/NonFinite"
            }
          ]
        }
      },
      "required": [
        "z0",
        "z1",
        "radius"
      ],
      "type": "object"
    },
    "CatalogRef": {
      "additionalProperties": false,
      "description": "使ったガラスのカタログ",
      "properties": {
        "hash": {
          "description": "保存したときのカタログのファイルの中身の SHA-256（\"sha256:…\"）。ファイルが見つからなかったときは空",
          "type": "string"
        },
        "name": {
          "description": "カタログの名前（AGF のファイル名から拡張子を除いたもの）",
          "type": "string"
        }
      },
      "required": [
        "name"
      ],
      "type": "object"
    },
    "ConfigPick": {
      "description": "多重構成の行の、構成 k の値 = 構成 from の値 × scale + offset（どちらも 1 始まり）。row があれば、構成 from の値は\n同じ表の別の行 row のもの（OpticStudio の構成のピックアップの元の行。同じ量の種類の行だけ。row なら from は k と同じでもよい。\nOpticStudio は上の行・前か同じ構成からだけ拾うので、ほかは .zmx に値だけ書く）",
      "properties": {
        "from": {
          "format": "uint",
          "minimum": 0,
          "type": "integer"
        },
        "k": {
          "format": "uint",
          "minimum": 0,
          "type": "integer"
        },
        "offset": {
          "anyOf": [
            {
              "format": "double",
              "type": "number"
            },
            {
              "$ref": "#/$defs/NonFinite"
            }
          ],
          "default": 0.0
        },
        "row": {
          "anyOf": [
            {
              "$ref": "#/$defs/Param"
            },
            {
              "type": "null"
            }
          ],
          "description": "元の行（同じ表の行のパラメータ）。省くと同じ行"
        },
        "scale": {
          "anyOf": [
            {
              "format": "double",
              "type": "number"
            },
            {
              "$ref": "#/$defs/NonFinite"
            }
          ],
          "default": 1.0
        }
      },
      "required": [
        "k",
        "from"
      ],
      "type": "object"
    },
    "ConfigRow": {
      "description": "多重構成の表の 1 行",
      "properties": {
        "names": {
          "description": "材料の行の材料の名前（面の表の材料と同じ書き方）、膜の行の膜の名前（空は膜なし）。ほかの行は空で、省く",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "param": {
          "$ref": "#/$defs/Param"
        },
        "picks": {
          "description": "構成のピックアップ（OpticStudio の多重構成の pickup）。無ければ省く",
          "items": {
            "$ref": "#/$defs/ConfigPick"
          },
          "type": "array"
        },
        "values": {
          "description": "構成ごとの値（長さは構成の数）。ピックアップの構成の値は元の構成から求めた値。\n材料・膜の行（[`Kind::Material`]・[`Kind::Coating`]）は `names` の番号（0 始まり）",
          "items": {
            "anyOf": [
              {
                "format": "double",
                "type": "number"
              },
              {
                "$ref": "#/$defs/NonFinite"
              }
            ]
          },
          "type": "array"
        }
      },
      "required": [
        "param",
        "values"
      ],
      "type": "object"
    },
    "Configs": {
      "description": "多重構成の表（OpticStudio の Multi-Configuration Editor の数の行に当たる）。\n行ごとにパラメータ 1 つと、構成ごとの値を持つ。[`System::config`] で構成 k の値を入れた系を作る",
      "properties": {
        "active": {
          "description": "今の系に入っている構成（1 始まり）",
          "format": "uint",
          "minimum": 0,
          "type": "integer"
        },
        "n": {
          "description": "構成の数（1 以上）",
          "format": "uint",
          "minimum": 0,
          "type": "integer"
        },
        "rows": {
          "items": {
            "$ref": "#/$defs/ConfigRow"
          },
          "type": "array"
        }
      },
      "required": [
        "n",
        "active",
        "rows"
      ],
      "type": "object"
    },
    "CylFresnel": {
      "description": "Cylinder Fresnel の屈折に使う面: z = c y² / (1 + √(1 − (1 + k) c² y²)) + Σ coef[i] y^{2(i+1)}",
      "properties": {
        "c": {
          "anyOf": [
            {
              "format": "double",
              "type": "number"
            },
            {
              "$ref": "#/$defs/NonFinite"
            }
          ]
        },
        "coef": {
          "items": {
            "anyOf": [
              {
                "format": "double",
                "type": "number"
              },
              {
                "$ref": "#/$defs/NonFinite"
              }
            ]
          },
          "type": "array"
        },
        "k": {
          "anyOf": [
            {
              "format": "double",
              "type": "number"
            },
            {
              "$ref": "#/$defs/NonFinite"
            }
          ]
        }
      },
      "required": [
        "c",
        "k",
        "coef"
      ],
      "type": "object"
    },
    "FieldCond": {
      "description": "条件で定める視野の条件（主光線、局所座標）",
      "oneOf": [
        {
          "additionalProperties": false,
          "description": "面 surf での位置 (x, y) = 視野の値（JSON の欄の名前は surface）",
          "properties": {
            "cond": {
              "const": "position",
              "type": "string"
            },
            "surface": {
              "format": "uint",
              "minimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "cond",
            "surface"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "description": "面 s1 と s2 での方向余弦 (l, m) の和 = 視野の値（法線入射で戻る主光線なら 0）",
          "properties": {
            "cond": {
              "const": "dir_sum",
              "type": "string"
            },
            "s1": {
              "format": "uint",
              "minimum": 0,
              "type": "integer"
            },
            "s2": {
              "format": "uint",
              "minimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "cond",
            "s1",
            "s2"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "description": "面 s1 と s2 での方向余弦 (l, m) の差（s1 − s2）= 視野の値",
          "properties": {
            "cond": {
              "const": "dir_diff",
              "type": "string"
            },
            "s1": {
              "format": "uint",
              "minimum": 0,
              "type": "integer"
            },
            "s2": {
              "format": "uint",
              "minimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "cond",
            "s1",
            "s2"
          ],
          "type": "object"
        }
      ]
    },
    "FieldKind": {
      "description": "視野の種類（[`FieldType`] の条件を除いたもの。プロジェクトの `fields.type`・系ファイル版 2 の `field.type` の名前）。\nJSON の名前は \"angle\"・\"object_height\"・\"paraxial_image_height\"・\"real_image_height\"・\"solve\"",
      "oneOf": [
        {
          "enum": [
            "angle",
            "object_height",
            "paraxial_image_height",
            "real_image_height"
          ],
          "type": "string"
        },
        {
          "const": "solve",
          "description": "条件で定める視野（[`FieldType::Solve`]）",
          "type": "string"
        }
      ]
    },
    "FieldNorm": {
      "description": "視野の正規化（瞳・視野の座標の 1 を何にとるか。.zmx の FTYP の 6 番目）。JSON の名前は \"radial\"・\"rect\"",
      "oneOf": [
        {
          "const": "radial",
          "description": "半径（最も遠い視野が 1）",
          "type": "string"
        },
        {
          "const": "rect",
          "description": "矩形（x・y の最大がそれぞれ 1）",
          "type": "string"
        }
      ]
    },
    "Fields": {
      "additionalProperties": false,
      "description": "視野",
      "properties": {
        "norm": {
          "$ref": "#/$defs/FieldNorm",
          "description": "正規化"
        },
        "points": {
          "description": "視野の (x, y)",
          "items": {
            "items": {
              "anyOf": [
                {
                  "format": "double",
                  "type": "number"
                },
                {
                  "$ref": "#/$defs/NonFinite"
                }
              ]
            },
            "maxItems": 2,
            "minItems": 2,
            "type": "array"
          },
          "type": "array"
        },
        "solve": {
          "anyOf": [
            {
              "$ref": "#/$defs/FieldCond"
            },
            {
              "type": "null"
            }
          ],
          "description": "type = solve のときの条件"
        },
        "type": {
          "$ref": "#/$defs/FieldKind"
        },
        "vignetting": {
          "description": "視野ごとのケラレ係数 [VDX, VDY, VCX, VCY, VAN]（省略はすべて 0）",
          "items": {
            "items": {
              "anyOf": [
                {
                  "format": "double",
                  "type": "number"
                },
                {
                  "$ref": "#/$defs/NonFinite"
                }
              ]
            },
            "maxItems": 5,
            "minItems": 5,
            "type": "array"
          },
          "type": "array"
        },
        "weights": {
          "description": "視野ごとの重み（省略はすべて 1）",
          "items": {
            "anyOf": [
              {
                "format": "double",
                "type": "number"
              },
              {
                "$ref": "#/$defs/NonFinite"
              }
            ]
          },
          "type": "array"
        }
      },
      "required": [
        "points"
      ],
      "type": "object"
    },
    "GlassTemplate": {
      "description": "ガラス置換のテンプレート（OpticStudio の Glass Substitution Template、.zmx の GSTD）。最適化のガラスの置き換えの候補の\n絞り込みに使う（lensbench-design の `glass_sub`）。並びは GSTD と同じで、OpticStudio 2026 R1.01 で 1 欄ずつ確かめた",
      "properties": {
        "check": {
          "default": [
            true,
            true,
            true,
            true,
            true,
            true
          ],
          "description": "上限を確かめる性質（相対価格・CR・FR・SR・AR・PR、13〜18 番目）。上限が 0 以下なら確かめない",
          "items": {
            "type": "boolean"
          },
          "maxItems": 6,
          "minItems": 6,
          "type": "array"
        },
        "enabled": {
          "default": false,
          "description": "テンプレートを使う（GSTD の 1 番目）",
          "type": "boolean"
        },
        "exclude_incomplete": {
          "default": false,
          "description": "値の無い硝材を除く（Exclude Glasses With Incomplete Data、8 番目）",
          "type": "boolean"
        },
        "max": {
          "default": [
            100.0,
            100.0,
            100.0,
            100.0,
            100.0,
            100.0
          ],
          "description": "上限: 相対価格・耐候性 CR・耐汚染性 FR・耐酸性 SR・耐アルカリ性 AR・耐リン酸塩性 PR（2〜7 番目）",
          "items": {
            "anyOf": [
              {
                "format": "double",
                "type": "number"
              },
              {
                "$ref": "#/$defs/NonFinite"
              }
            ]
          },
          "maxItems": 6,
          "minItems": 6,
          "type": "array"
        },
        "status": {
          "default": [
            true,
            true,
            false,
            false
          ],
          "description": "使ってよい状態: 標準・推奨・廃止・特殊（9〜12 番目。溶解は選べず、テンプレートを使うといつも除く）",
          "items": {
            "type": "boolean"
          },
          "maxItems": 4,
          "minItems": 4,
          "type": "array"
        }
      },
      "type": "object"
    },
    "Grad9Mat": {
      "description": "Gradient 9 の材料（GRADIENT_9.DAT の組）",
      "properties": {
        "b": {
          "anyOf": [
            {
              "format": "double",
              "type": "number"
            },
            {
              "$ref": "#/$defs/NonFinite"
            }
          ]
        },
        "c": {
          "anyOf": [
            {
              "format": "double",
              "type": "number"
            },
            {
              "$ref": "#/$defs/NonFinite"
            }
          ]
        },
        "k0": {
          "anyOf": [
            {
              "format": "double",
              "type": "number"
            },
            {
              "$ref": "#/$defs/NonFinite"
            }
          ]
        },
        "k1": {
          "anyOf": [
            {
              "format": "double",
              "type": "number"
            },
            {
              "$ref": "#/$defs/NonFinite"
            }
          ]
        },
        "k2": {
          "anyOf": [
            {
              "format": "double",
              "type": "number"
            },
            {
              "$ref": "#/$defs/NonFinite"
            }
          ]
        }
      },
      "required": [
        "b",
        "c",
        "k0",
        "k1",
        "k2"
      ],
      "type": "object"
    },
    "GradiumProfile": {
      "description": "Gradium の分布（PROFILE.GRD の組）",
      "properties": {
        "coef": {
          "description": "n_0 … n_11",
          "items": {
            "anyOf": [
              {
                "format": "double",
                "type": "number"
              },
              {
                "$ref": "#/$defs/NonFinite"
              }
            ]
          },
          "type": "array"
        },
        "family": {
          "description": "分散の名前（SGRIN.DAT の組）",
          "type": "string"
        },
        "file": {
          "description": "読んだファイルの名前（PROFILE.GRD など。.zmx の COFN に書く）",
          "type": "string"
        },
        "flipped": {
          "description": "分布を z について裏返した（鏡の後に置いた）もの。係数はファイルの組と違うので .zmx には書けない",
          "type": "boolean"
        },
        "name": {
          "type": "string"
        },
        "zmax": {
          "anyOf": [
            {
              "format": "double",
              "type": "number"
            },
            {
              "$ref": "#/$defs/NonFinite"
            }
          ],
          "description": "玉の素材の厚さ z_max"
        }
      },
      "required": [
        "name",
        "family",
        "zmax",
        "coef",
        "file"
      ],
      "type": "object"
    },
    "GridSag": {
      "description": "Grid Sag の格子",
      "properties": {
        "dx": {
          "anyOf": [
            {
              "format": "double",
              "type": "number"
            },
            {
              "$ref": "#/$defs/NonFinite"
            }
          ],
          "description": "格子の間隔 [mm]"
        },
        "dy": {
          "anyOf": [
            {
              "format": "double",
              "type": "number"
            },
            {
              "$ref": "#/$defs/NonFinite"
            }
          ]
        },
        "linear": {
          "description": "双一次で補間する（false は双三次）。双一次では傾きも格子点の傾きの双一次補間",
          "type": "boolean"
        },
        "nodata": {
          "description": "値のない点",
          "items": {
            "type": "boolean"
          },
          "type": "array"
        },
        "nx": {
          "format": "uint",
          "minimum": 0,
          "type": "integer"
        },
        "ny": {
          "format": "uint",
          "minimum": 0,
          "type": "integer"
        },
        "xdec": {
          "anyOf": [
            {
              "format": "double",
              "type": "number"
            },
            {
              "$ref": "#/$defs/NonFinite"
            }
          ],
          "description": "格子の中心の偏心 [mm]"
        },
        "ydec": {
          "anyOf": [
            {
              "format": "double",
              "type": "number"
            },
            {
              "$ref": "#/$defs/NonFinite"
            }
          ]
        },
        "z": {
          "description": "点ごとの (z, ∂z/∂x, ∂z/∂y, ∂²z/∂x∂y)。並びは y の小さい行から、行の中は x の小さい点から\n（iy * nx + ix）。単位は mm",
          "items": {
            "items": {
              "anyOf": [
                {
                  "format": "double",
                  "type": "number"
                },
                {
                  "$ref": "#/$defs/NonFinite"
                }
              ]
            },
            "maxItems": 4,
            "minItems": 4,
            "type": "array"
          },
          "type": "array"
        }
      },
      "required": [
        "nx",
        "ny",
        "dx",
        "dy",
        "xdec",
        "ydec",
        "z",
        "nodata",
        "linear"
      ],
      "type": "object"
    },
    "Grin": {
      "additionalProperties": false,
      "description": "屈折率分布の媒質",
      "properties": {
        "dt": {
          "anyOf": [
            {
              "format": "double",
              "type": "number"
            },
            {
              "$ref": "#/$defs/NonFinite"
            }
          ],
          "description": "OpticStudio の刻み Δt"
        },
        "name": {
          "description": "材料の名前",
          "type": "string"
        },
        "profile": {
          "$ref": "#/$defs/GrinKind"
        }
      },
      "required": [
        "profile"
      ],
      "type": "object"
    },
    "GrinKind": {
      "oneOf": [
        {
          "additionalProperties": false,
          "properties": {
            "Gradium": {
              "properties": {
                "cap": {
                  "description": "端の扱い: 0 両端で止める、1 左（z′ + Δz < 0）だけ止める、2 右だけ止める、3 止めない\n（止めない側は端の屈折率の一様な媒質）",
                  "format": "uint8",
                  "maximum": 255,
                  "minimum": 0,
                  "type": "integer"
                },
                "dec": {
                  "description": "公差の項 d_x d_y t_x t_y（近軸では使わない）",
                  "items": {
                    "anyOf": [
                      {
                        "format": "double",
                        "type": "number"
                      },
                      {
                        "$ref": "#/$defs/NonFinite"
                      }
                    ]
                  },
                  "maxItems": 4,
                  "minItems": 4,
                  "type": "array"
                },
                "disp": {
                  "$ref": "#/$defs/Sgrin"
                },
                "dz": {
                  "anyOf": [
                    {
                      "format": "double",
                      "type": "number"
                    },
                    {
                      "$ref": "#/$defs/NonFinite"
                    }
                  ],
                  "description": "分布の上の位置のずれ Δz"
                },
                "prof": {
                  "$ref": "#/$defs/GradiumProfile"
                }
              },
              "required": [
                "prof",
                "disp",
                "dz",
                "dec",
                "cap"
              ],
              "type": "object"
            }
          },
          "required": [
            "Gradium"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "properties": {
            "Grad9": {
              "properties": {
                "mat": {
                  "$ref": "#/$defs/Grad9Mat"
                },
                "tan": {
                  "description": "形の傾きの項 tan α、tan β",
                  "items": {
                    "anyOf": [
                      {
                        "format": "double",
                        "type": "number"
                      },
                      {
                        "$ref": "#/$defs/NonFinite"
                      }
                    ]
                  },
                  "maxItems": 2,
                  "minItems": 2,
                  "type": "array"
                }
              },
              "required": [
                "mat",
                "tan"
              ],
              "type": "object"
            }
          },
          "required": [
            "Grad9"
          ],
          "type": "object"
        }
      ]
    },
    "InputPolarization": {
      "description": "系の入射偏光（OpticStudio の System Explorer の Polarization、.zmx の POLS）: 膜・偏光を入れる解析（MTF・PSF・相対照度の\n`polarization`）の入射の偏光。既定は偏光なし（光線に垂直な面の正規直交の 2 つの偏光の平均）",
      "properties": {
        "jx": {
          "anyOf": [
            {
              "format": "double",
              "type": "number"
            },
            {
              "$ref": "#/$defs/NonFinite"
            }
          ],
          "default": 0.0,
          "description": "電場の x・y の振幅（正規化しない。強度をそろえて使う）"
        },
        "jy": {
          "anyOf": [
            {
              "format": "double",
              "type": "number"
            },
            {
              "$ref": "#/$defs/NonFinite"
            }
          ],
          "default": 1.0
        },
        "phase_x": {
          "anyOf": [
            {
              "format": "double",
              "type": "number"
            },
            {
              "$ref": "#/$defs/NonFinite"
            }
          ],
          "default": 0.0,
          "description": "x・y の位相 [deg]"
        },
        "phase_y": {
          "anyOf": [
            {
              "format": "double",
              "type": "number"
            },
            {
              "$ref": "#/$defs/NonFinite"
            }
          ],
          "default": 0.0
        },
        "unpolarized": {
          "default": true,
          "description": "偏光なし（true なら jx・jy・位相は使わない）",
          "type": "boolean"
        }
      },
      "type": "object"
    },
    "Kind": {
      "description": "パラメータの種類",
      "oneOf": [
        {
          "enum": [
            "Dx",
            "Dy",
            "Ty",
            "Tz",
            "ObjY",
            "Pres",
            "Apod",
            "ApDy",
            "AfterOrder",
            "ModelVd",
            "ModelDpgf",
            "ChipZone",
            "CoordRetSurf"
          ],
          "type": "string"
        },
        {
          "const": "Curv",
          "description": "曲率 c",
          "type": "string"
        },
        {
          "const": "Radius",
          "description": "曲率半径 R = 1/c（0 は平面）",
          "type": "string"
        },
        {
          "const": "Conic",
          "description": "円錐係数",
          "type": "string"
        },
        {
          "additionalProperties": false,
          "description": "偶数次非球面の係数（0 が r^2、7 が r^16）",
          "properties": {
            "Asph": {
              "format": "uint8",
              "maximum": 255,
              "minimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "Asph"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "description": "Zernike Sag の面の項 j の係数（1 から）",
          "properties": {
            "Zern": {
              "format": "uint16",
              "maximum": 65535,
              "minimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "Zern"
          ],
          "type": "object"
        },
        {
          "const": "Thick",
          "description": "次の面までの厚さ",
          "type": "string"
        },
        {
          "const": "Tx",
          "description": "傾き [deg]",
          "type": "string"
        },
        {
          "const": "Dn",
          "description": "媒質の屈折率のずれ",
          "type": "string"
        },
        {
          "const": "Disp",
          "description": "媒質の分散の相対変化",
          "type": "string"
        },
        {
          "const": "ObjX",
          "description": "物点の x・y（有限物体。面の番号は使わない）",
          "type": "string"
        },
        {
          "additionalProperties": false,
          "description": "系の波長 i（0 始まり、名前は wave1 から）[µm]。面の番号は使わない。変えると全媒質の屈折率がその波長の値になる\n（光源の波長のずれの公差・多重構成の行（.zmx の WAVE）用。最適化の変数には使えない）",
          "properties": {
            "Wave": {
              "format": "uint8",
              "maximum": 255,
              "minimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "Wave"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "description": "系の波長 i の重み（0 始まり、名前は wwt1 から）。多重構成の行（.zmx の WLWT）。最適化の変数には使えない",
          "properties": {
            "WaveW": {
              "format": "uint8",
              "maximum": 255,
              "minimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "WaveW"
          ],
          "type": "object"
        },
        {
          "const": "Primary",
          "description": "主波長の番号（1 から。値は整数）。多重構成の行（.zmx の PRWV）。最適化の変数には使えない",
          "type": "string"
        },
        {
          "const": "Aper",
          "description": "開口の値（開口の種類の単位: 入射瞳径 mm・F 値・NA など）。多重構成の行（.zmx の APER）。最適化の変数には使えない",
          "type": "string"
        },
        {
          "const": "ApertureType",
          "description": "開口の種類（OpticStudio の番号 0〜5: 入射瞳径・像側 F 値・物体側 NA・絞り径・近軸作動 F 値・物体側の開き角）。\n多重構成の行（.zmx の SATP）。最適化の変数には使えない",
          "type": "string"
        },
        {
          "const": "Stop",
          "description": "絞りの面の番号（値は整数）。多重構成の行（.zmx の STPS）。最適化の変数には使えない",
          "type": "string"
        },
        {
          "const": "FieldType",
          "description": "視野の種類（OpticStudio の番号 0〜3: 角度・物体高・近軸像高・実像高）。多重構成の行（.zmx の FLTP）。\n最適化の変数には使えない",
          "type": "string"
        },
        {
          "const": "Temp",
          "description": "系の温度 [°C]・気圧 [atm]（変えると全媒質の屈折率を作り直す）。多重構成の行（.zmx の TEMP・PRES）。最適化の変数には使えない",
          "type": "string"
        },
        {
          "const": "Afocal",
          "description": "アフォーカルの像空間か（1 でアフォーカル）。多重構成の行（.zmx の AFOC）。最適化の変数には使えない",
          "type": "string"
        },
        {
          "const": "ApodType",
          "description": "アポダイゼーションの種類（OpticStudio の番号 0〜2: 一様・ガウス・cos³）と、ガウスの係数。多重構成の行\n（.zmx の APDT・APDF）。最適化の変数には使えない",
          "type": "string"
        },
        {
          "const": "Aiming",
          "description": "光線エイミング（0〜2: なし・近軸・実光線）。多重構成の行（.zmx の RAAM）。最適化の変数には使えない",
          "type": "string"
        },
        {
          "const": "Ropd",
          "description": "OPD の基準（OpticStudio の番号 0〜3、.zmx の ROPD と同じ）。多重構成の行（.zmx の OPDR）。最適化の変数には使えない",
          "type": "string"
        },
        {
          "additionalProperties": false,
          "description": "光線エイミングの瞳のずれ x・y・z（0〜2）と圧縮 x・y（3・4）。名前は pshx・pshy・pshz・pscx・pscy。多重構成の行\n（.zmx の PSHX〜PSCY）。追跡には効かない（[`crate::system::AimPupil`]）。最適化の変数には使えない",
          "properties": {
            "AimPupil": {
              "format": "uint8",
              "maximum": 255,
              "minimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "AimPupil"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "description": "系の入射偏光の偏光なし（1 か 0）・振幅 x・y・位相 x・y [deg]（0〜4）。名前は polun・poljx・poljy・polpx・polpy。\n多重構成の行（.zmx の GPIU・GPJX・GPJY・GPPX・GPPY）。[`crate::system::InputPolarization`]。最適化の変数には使えない",
          "properties": {
            "InputPol": {
              "format": "uint8",
              "maximum": 255,
              "minimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "InputPol"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "description": "視野 i の x・y・重み（0 始まり、名前は fx1・fy1・fwt1 から）。多重構成の行（.zmx の XFIE・YFIE・FLWT）。\n最適化の変数には使えない",
          "properties": {
            "FieldX": {
              "format": "uint8",
              "maximum": 255,
              "minimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "FieldX"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "properties": {
            "FieldY": {
              "format": "uint8",
              "maximum": 255,
              "minimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "FieldY"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "properties": {
            "FieldW": {
              "format": "uint8",
              "maximum": 255,
              "minimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "FieldW"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "description": "視野 i（0 始まり）のけられ係数 j（0〜4 = VDX・VDY・VCX・VCY・VAN、名前は vdx1・vdy1・vcx1・vcy1・van1 から）。\n多重構成の行（.zmx の FVDX・FVDY・FVCX・FVCY・FVAN・FTAN）。最適化の変数には使えない",
          "properties": {
            "FieldVig": {
              "maxItems": 2,
              "minItems": 2,
              "prefixItems": [
                {
                  "format": "uint8",
                  "maximum": 255,
                  "minimum": 0,
                  "type": "integer"
                },
                {
                  "format": "uint8",
                  "maximum": 255,
                  "minimum": 0,
                  "type": "integer"
                }
              ],
              "type": "array"
            }
          },
          "required": [
            "FieldVig"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "description": "玉・群のパラメータ（付く先は [`Target::Unit`]）",
          "properties": {
            "Unit": {
              "$ref": "#/$defs/UnitKind"
            }
          },
          "required": [
            "Unit"
          ],
          "type": "object"
        },
        {
          "const": "Semi",
          "description": "半直径（semi-diameter）。ピックアップ・マクロのソルブの量と、多重構成の行（.zmx の SDIA。固定の半直径にし、\n浮動開口の面はその半直径でける）。最適化の変数には使えない",
          "type": "string"
        },
        {
          "const": "Ignore",
          "description": "面を無視するか（1 で無視、0 で使う）。多重構成の行（.zmx の IGNR）。最適化の変数には使えない",
          "type": "string"
        },
        {
          "const": "ApMax",
          "description": "円形の開口・遮蔽の最大の半径。多重構成の行（.zmx の APMX）。最適化の変数には使えない",
          "type": "string"
        },
        {
          "const": "ApMin",
          "description": "円形の開口・遮蔽の最小の半径。多重構成の行（.zmx の APMN）。最適化の変数には使えない",
          "type": "string"
        },
        {
          "const": "ApDx",
          "description": "開口・遮蔽の偏心 x・y。多重構成の行（.zmx の APDX・APDY）。最適化の変数には使えない",
          "type": "string"
        },
        {
          "const": "ApType",
          "description": "開口の種類（OpticStudio の番号: 0 なし・1 円形の開口・2 円形の遮蔽・3 スパイダー・4 矩形・6 楕円・10 浮動。\n変えられるのは 0〜2 の間で、半径は今の円形の開口・遮蔽の値）。多重構成の行（.zmx の APTP）。最適化の変数には使えない",
          "type": "string"
        },
        {
          "const": "BeforeOrder",
          "description": "面の前・後の傾き偏心の順序（0 偏心から、1 傾きから）。多重構成の行（.zmx の CBOR・CAOR）。最適化の変数には使えない",
          "type": "string"
        },
        {
          "const": "ModelNd",
          "description": "モデルガラスの nd・vd・ΔPgF（面の材料がモデルガラスのときだけ）。多重構成の行（.zmx の MIND・MABB・MDPG）。\n最適化の変数には使えない",
          "type": "string"
        },
        {
          "const": "Tce",
          "description": "面の熱膨張係数 [1e-6/°C]（[`crate::surface::Surface::tce`]）。多重構成の行（.zmx の TCEX）。最適化の変数には使えない",
          "type": "string"
        },
        {
          "const": "MechSemi",
          "description": "面の機械半径（[`System::lens_radius`]、設定すると固定）・チップゾーン（[`crate::surface::Surface::chip_zone`]）。\n多重構成の行（.zmx の MCSD・CHZN）。最適化の変数には使えない",
          "type": "string"
        },
        {
          "const": "CoordRet",
          "description": "座標ブレークの座標の戻り（[`crate::surface::Surface::coord_return`]）の戻し方（OpticStudio の番号 0〜3）と戻り先の面。\n名前は cror・crsr。多重構成の行（.zmx の CROR・CRSR）。最適化の変数には使えない",
          "type": "string"
        },
        {
          "additionalProperties": false,
          "description": "面の曲率・厚さのソルブ（ピックアップを含む）の条件の値 i（0 始まり、名前は csp1・tsp1 から）と、面タイプのパラメータ\nn のピックアップの値 i（名前は psp1_n から）。値の番号は OpticStudio のソルブの窓の順（[`set_solve_value`]）。\n多重構成の行（.zmx の CSP1・CSP2・TSP1〜TSP3・PSP1〜PSP3）。最適化の変数には使えない",
          "properties": {
            "CurvSolve": {
              "format": "uint8",
              "maximum": 255,
              "minimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "CurvSolve"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "properties": {
            "ThickSolve": {
              "format": "uint8",
              "maximum": 255,
              "minimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "ThickSolve"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "properties": {
            "ParmSolve": {
              "maxItems": 2,
              "minItems": 2,
              "prefixItems": [
                {
                  "format": "uint8",
                  "maximum": 255,
                  "minimum": 0,
                  "type": "integer"
                },
                {
                  "format": "uint8",
                  "maximum": 255,
                  "minimum": 0,
                  "type": "integer"
                }
              ],
              "type": "array"
            }
          },
          "required": [
            "ParmSolve"
          ],
          "type": "object"
        },
        {
          "const": "Material",
          "description": "面の材料。多重構成の行（.zmx の GLSS）だけで、値は行の材料の名前の番号（[`crate::configs::ConfigRow::names`]）。\n最適化の変数には使えない",
          "type": "string"
        },
        {
          "additionalProperties": false,
          "description": "面タイプのパラメータ（.zmx の PARM の番号、1 から）。ピックアップ・マクロのソルブの量（パラメータは\n[`Kind::Asph`] などの意味のある名前で）",
          "properties": {
            "Parm": {
              "format": "uint8",
              "maximum": 255,
              "minimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "Parm"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "description": "面の前の傾き偏心の値 i（0〜4 = dx dy tx ty tz）。ピックアップの量（座標ブレークの面は [`Kind::Parm`]、\nパラメータは [`Kind::Dx`] など）",
          "properties": {
            "Before": {
              "format": "uint8",
              "maximum": 255,
              "minimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "Before"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "description": "面の後の傾き偏心の値 i（.zmx の SCBD 2 のピックアップ。元は [`Kind::Before`]、反転は倍率 −1）",
          "properties": {
            "After": {
              "format": "uint8",
              "maximum": 255,
              "minimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "After"
          ],
          "type": "object"
        },
        {
          "const": "Coating",
          "description": "膜の名前。ピックアップ（倍率・オフセットは使わない。OpticStudio に無いので .zmx には書かない）と、多重構成の行\n（.zmx の COTN。値は行の膜の名前の番号（[`crate::configs::ConfigRow::names`]）、空の名前は膜なし）。最適化の変数には使えない",
          "type": "string"
        },
        {
          "additionalProperties": false,
          "description": "利用者定義の形の面の設定の数の項目（名前、[`crate::usershape`]）。名前は `u_<項目>`（面の番号と `.` で区切るので、項目の名前に `.` は使えない）",
          "properties": {
            "User": {
              "$ref": "#/$defs/UserKey"
            }
          },
          "required": [
            "User"
          ],
          "type": "object"
        }
      ]
    },
    "Macro": {
      "description": "系に付けたマクロ（名前と文）。系ファイル（JSON）には文をそのまま入れ、戻すときにファイルは読まない",
      "properties": {
        "name": {
          "description": ".zmx に書かれた名前（拡張子なし）",
          "type": "string"
        },
        "source": {
          "description": "マクロの文（.ZPL の中身）",
          "type": "string"
        }
      },
      "required": [
        "name",
        "source"
      ],
      "type": "object"
    },
    "MacroParm": {
      "description": "曲率・厚さ以外の列の ZPL マクロのソルブ（.zmx の PZPL 番号 \"名前\"・KZPL \"名前\"・DIAM 値 4 0 0 1 \"名前\"）",
      "properties": {
        "id": {
          "description": "[`System::macros`] の番号",
          "format": "uint16",
          "maximum": 65535,
          "minimum": 0,
          "type": "integer"
        },
        "surf": {
          "format": "uint",
          "minimum": 0,
          "type": "integer"
        },
        "what": {
          "$ref": "#/$defs/Kind",
          "description": "マクロの値を入れる量: 面タイプのパラメータ（PZPL、[`Kind::Parm`]）・円錐係数（KZPL、[`Kind::Conic`]）・\n半直径（DIAM 値 4 0 0 1 \"名前\"、[`Kind::Semi`]）"
        }
      },
      "required": [
        "surf",
        "id",
        "what"
      ],
      "type": "object"
    },
    "MechPart": {
      "description": "系に置いた機構部品",
      "properties": {
        "bores": {
          "items": {
            "$ref": "#/$defs/Bore"
          },
          "type": "array"
        },
        "hold_radius": {
          "anyOf": [
            {
              "format": "double",
              "type": "number"
            },
            {
              "$ref": "#/$defs/NonFinite"
            }
          ],
          "default": 0.0,
          "description": "素子を保持する内壁の半径（保持径の半分）。0 なら穴の半径が内壁"
        },
        "holds": {
          "description": "保持する素子の面（系の面の番号）。はみ出し・保持径の確認に使う",
          "items": {
            "format": "uint",
            "minimum": 0,
            "type": "integer"
          },
          "type": "array"
        },
        "length": {
          "anyOf": [
            {
              "format": "double",
              "type": "number"
            },
            {
              "$ref": "#/$defs/NonFinite"
            }
          ],
          "default": 0.0,
          "description": "外形（描画・重なりの確認用）: 部品の z の範囲と外径の半径。0 なら穴から決める"
        },
        "name": {
          "type": "string"
        },
        "offset": {
          "default": [
            0.0,
            0.0,
            0.0
          ],
          "description": "基準の面の局所座標でのずれ [dx, dy, dz] [mm]",
          "items": {
            "anyOf": [
              {
                "format": "double",
                "type": "number"
              },
              {
                "$ref": "#/$defs/NonFinite"
              }
            ]
          },
          "maxItems": 3,
          "minItems": 3,
          "type": "array"
        },
        "outer_radius": {
          "anyOf": [
            {
              "format": "double",
              "type": "number"
            },
            {
              "$ref": "#/$defs/NonFinite"
            }
          ],
          "default": 0.0
        },
        "rod_spacing": {
          "anyOf": [
            {
              "format": "double",
              "type": "number"
            },
            {
              "$ref": "#/$defs/NonFinite"
            }
          ],
          "default": 0.0,
          "description": "ケージのロッドの間隔 [mm]（0 はケージ板でない）"
        },
        "square": {
          "description": "外形が角（`outer_radius` は正方形の一辺の半分、辺は部品の x・y 軸に沿う）。false は丸",
          "type": "boolean"
        },
        "step": {
          "description": "部品の詳しい形の STEP（品の公式の STEP を取ったキャッシュのファイル）。描画で詳しい形を選ぶと使う",
          "type": "string"
        },
        "step_flip": {
          "description": "STEP の形を裏返して置く（部品を `reversed` で置いた。z → 長さ − z、y → −y）",
          "type": "boolean"
        },
        "surface": {
          "description": "置く基準の面（その面の局所座標）",
          "format": "uint",
          "minimum": 0,
          "type": "integer"
        },
        "tilt": {
          "default": [
            0.0,
            0.0
          ],
          "description": "傾き [tx, ty] [deg]（ずらした後、x → y の順）",
          "items": {
            "anyOf": [
              {
                "format": "double",
                "type": "number"
              },
              {
                "$ref": "#/$defs/NonFinite"
              }
            ]
          },
          "maxItems": 2,
          "minItems": 2,
          "type": "array"
        }
      },
      "required": [
        "name",
        "surface",
        "bores"
      ],
      "type": "object"
    },
    "Medium": {
      "anyOf": [
        {
          "description": "ガラスの名前（カタログから引く。\"AIR\" は空気）",
          "type": "string"
        },
        {
          "$ref": "#/$defs/MediumData",
          "description": "モデルガラス・GRIN"
        }
      ],
      "description": "面の後の媒質"
    },
    "MediumData": {
      "oneOf": [
        {
          "additionalProperties": false,
          "description": "モデルガラス（nd・vd・ΔPgF）。vd = 0 は分散なし（屈折率 nd）",
          "properties": {
            "model": {
              "additionalProperties": false,
              "properties": {
                "dpgf": {
                  "anyOf": [
                    {
                      "format": "double",
                      "type": "number"
                    },
                    {
                      "$ref": "#/$defs/NonFinite"
                    }
                  ]
                },
                "nd": {
                  "anyOf": [
                    {
                      "format": "double",
                      "type": "number"
                    },
                    {
                      "$ref": "#/$defs/NonFinite"
                    }
                  ]
                },
                "vd": {
                  "anyOf": [
                    {
                      "format": "double",
                      "type": "number"
                    },
                    {
                      "$ref": "#/$defs/NonFinite"
                    }
                  ]
                }
              },
              "required": [
                "nd"
              ],
              "type": "object"
            }
          },
          "required": [
            "model"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "description": "屈折率分布（Gradium・Gradient 9）",
          "properties": {
            "grin": {
              "$ref": "#/$defs/Grin"
            }
          },
          "required": [
            "grin"
          ],
          "type": "object"
        }
      ]
    },
    "NonFinite": {
      "additionalProperties": false,
      "description": "JSON に書けない数（無限遠の inf、NaN）",
      "properties": {
        "$f": {
          "enum": [
            "inf",
            "-inf",
            "nan"
          ]
        }
      },
      "required": [
        "$f"
      ],
      "type": "object"
    },
    "Param": {
      "description": "パラメータ: 付く先と種類。付く先は種類から決まる（[`Kind::is_global`] は系全体、[`Kind::Unit`] は玉・群、\nほかは面）ので、[`Param::new`]・[`Param::unit`]・[`Param::system`] で作る",
      "properties": {
        "kind": {
          "$ref": "#/$defs/Kind"
        },
        "target": {
          "$ref": "#/$defs/Target"
        }
      },
      "required": [
        "target",
        "kind"
      ],
      "type": "object"
    },
    "Pickup": {
      "description": "ピックアップ: 面 dst の量 what = scale × 面 src の量 from（None なら what）+ offset。\n\n曲率は OpticStudio と同じく特別で（2026 R1.01 で実測）、同じ列（曲率・半径）からなら c = scale × c元、\n別の列の値 v からなら元の値を半径とみなして c = scale / v（オフセットなし）。ほかの量が半径の列から取るときは\n半径の値 R を使う（v = scale × R + offset）",
      "properties": {
        "dst": {
          "format": "uint",
          "minimum": 0,
          "type": "integer"
        },
        "from": {
          "anyOf": [
            {
              "$ref": "#/$defs/Kind"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "元の量（別の列からのピックアップ）。None は what と同じ"
        },
        "offset": {
          "anyOf": [
            {
              "format": "double",
              "type": "number"
            },
            {
              "$ref": "#/$defs/NonFinite"
            }
          ]
        },
        "scale": {
          "anyOf": [
            {
              "format": "double",
              "type": "number"
            },
            {
              "$ref": "#/$defs/NonFinite"
            }
          ]
        },
        "src": {
          "format": "uint",
          "minimum": 0,
          "type": "integer"
        },
        "what": {
          "$ref": "#/$defs/Kind"
        }
      },
      "required": [
        "dst",
        "src",
        "what",
        "scale",
        "offset"
      ],
      "type": "object"
    },
    "Plate": {
      "additionalProperties": false,
      "description": "波長板の複屈折材の板",
      "properties": {
        "axis_deg": {
          "anyOf": [
            {
              "format": "double",
              "type": "number"
            },
            {
              "$ref": "#/$defs/NonFinite"
            }
          ]
        },
        "material": {
          "type": "string"
        },
        "thickness": {
          "anyOf": [
            {
              "format": "double",
              "type": "number"
            },
            {
              "$ref": "#/$defs/NonFinite"
            }
          ],
          "description": "厚さ [mm]"
        }
      },
      "required": [
        "material",
        "thickness",
        "axis_deg"
      ],
      "type": "object"
    },
    "Prescription": {
      "additionalProperties": false,
      "description": "系（処方）。系ファイルの `system`",
      "properties": {
        "adjust_index": {
          "description": "ガラスの屈折率を温度・気圧で補正する（OpticStudio の Adjust Index Data To Environment）",
          "type": "boolean"
        },
        "afocal": {
          "description": "像空間がアフォーカル",
          "type": "boolean"
        },
        "afocal_unit": {
          "$ref": "#/$defs/AfocalUnit",
          "description": "アフォーカル像空間の角度の単位"
        },
        "aim_pupil": {
          "$ref": "#/$defs/AimPupil",
          "description": "光線エイミングの瞳のずれ・圧縮（.zmx の PUSH と RAIM の 10 番目。追跡には効かない）"
        },
        "aiming": {
          "$ref": "#/$defs/Aiming",
          "description": "光線エイミング"
        },
        "aperture": {
          "$ref": "#/$defs/ApertureSpec"
        },
        "apodization": {
          "$ref": "#/$defs/Apodization",
          "description": "瞳のアポダイゼーション（.zmx の GFAC。FFT PSF・Huygens・回折 MTF の瞳の振幅）"
        },
        "catalogs": {
          "description": "使ったガラスのカタログ（名前で引く順）と、保存したときのファイルの hash",
          "items": {
            "$ref": "#/$defs/CatalogRef"
          },
          "type": "array"
        },
        "coat_tables": {
          "additionalProperties": {
            "items": {
              "maxItems": 2,
              "minItems": 2,
              "prefixItems": [
                {
                  "anyOf": [
                    {
                      "format": "double",
                      "type": "number"
                    },
                    {
                      "$ref": "#/$defs/NonFinite"
                    }
                  ]
                },
                {
                  "items": {
                    "items": {
                      "anyOf": [
                        {
                          "format": "double",
                          "type": "number"
                        },
                        {
                          "$ref": "#/$defs/NonFinite"
                        }
                      ]
                    },
                    "maxItems": 9,
                    "minItems": 9,
                    "type": "array"
                  },
                  "type": "array"
                }
              ],
              "type": "array"
            },
            "type": "array"
          },
          "description": "膜ファイルの外で定めた TABLE 膜（名前 → 表）",
          "type": "object"
        },
        "coating_file": {
          "description": "膜ファイル（.zmx の COFN で見つけたファイル）",
          "type": [
            "string",
            "null"
          ]
        },
        "configs": {
          "anyOf": [
            {
              "$ref": "#/$defs/Configs"
            },
            {
              "type": "null"
            }
          ],
          "description": "多重構成の表"
        },
        "fields": {
          "$ref": "#/$defs/Fields"
        },
        "floating_clip": {
          "description": "浮動開口（半直径を固定した面）の外の光線をけるか",
          "type": "boolean"
        },
        "glass_template": {
          "$ref": "#/$defs/GlassTemplate",
          "description": "ガラス置換のテンプレート（OpticStudio の Glass Substitution Template、.zmx の GSTD）。最適化のガラスの置き換えの候補を絞る"
        },
        "glrs": {
          "description": "大域座標の基準の面（.zmx の GLRS）",
          "format": "uint",
          "minimum": 0,
          "type": "integer"
        },
        "input_pol": {
          "$ref": "#/$defs/InputPolarization",
          "description": "系の入射偏光（.zmx の POLS）"
        },
        "macro_parms": {
          "items": {
            "$ref": "#/$defs/MacroParm"
          },
          "type": "array"
        },
        "macros": {
          "description": "ソルブが呼ぶ ZPL のマクロ（文を入れる）",
          "items": {
            "$ref": "#/$defs/Macro"
          },
          "type": "array"
        },
        "mech_clip": {
          "description": "機構部品の穴の外に出た光線をけるか",
          "type": "boolean"
        },
        "mechanics": {
          "description": "機構部品",
          "items": {
            "$ref": "#/$defs/MechPart"
          },
          "type": "array"
        },
        "name": {
          "type": "string"
        },
        "pickups": {
          "items": {
            "$ref": "#/$defs/Pickup"
          },
          "type": "array"
        },
        "pressure_atm": {
          "anyOf": [
            {
              "format": "double",
              "type": "number"
            },
            {
              "$ref": "#/$defs/NonFinite"
            }
          ],
          "description": "気圧 [atm]"
        },
        "primary": {
          "description": "主波長の番号（1 始まり）",
          "format": "uint",
          "minimum": 0,
          "type": "integer"
        },
        "ropd": {
          "description": "OPD の基準（.zmx の ROPD）",
          "format": "int64",
          "type": "integer"
        },
        "solves": {
          "items": {
            "$ref": "#/$defs/Solve"
          },
          "type": "array"
        },
        "surfaces": {
          "description": "面の列（面とその後の間隔）。0 が物体面、最後が像面",
          "items": {
            "$ref": "#/$defs/Row"
          },
          "type": "array"
        },
        "telecentric": {
          "description": "物体側テレセントリック",
          "type": "boolean"
        },
        "temperature_c": {
          "anyOf": [
            {
              "format": "double",
              "type": "number"
            },
            {
              "$ref": "#/$defs/NonFinite"
            }
          ],
          "description": "温度 [°C]"
        },
        "units": {
          "description": "玉・群",
          "items": {
            "$ref": "#/$defs/Unit"
          },
          "type": "array"
        },
        "vig_interp": {
          "$ref": "#/$defs/VigInterp",
          "description": "定義した視野以外の点のケラレ係数の求め方"
        },
        "wavelengths": {
          "items": {
            "$ref": "#/$defs/Wave"
          },
          "type": "array"
        }
      },
      "required": [
        "wavelengths",
        "fields",
        "aperture",
        "surfaces"
      ],
      "type": "object"
    },
    "Retarder": {
      "additionalProperties": false,
      "description": "偏光子・波長板（Jones の面）",
      "properties": {
        "axis_deg": {
          "anyOf": [
            {
              "format": "double",
              "type": "number"
            },
            {
              "$ref": "#/$defs/NonFinite"
            }
          ]
        },
        "order": {
          "default": 0,
          "format": "uint32",
          "minimum": 0,
          "type": "integer"
        },
        "plates": {
          "description": "複屈折材の板（ガラスは名前で引く）",
          "items": {
            "$ref": "#/$defs/Plate"
          },
          "type": "array"
        },
        "retardance": {
          "anyOf": [
            {
              "format": "double",
              "type": "number"
            },
            {
              "$ref": "#/$defs/NonFinite"
            }
          ],
          "description": "設計波長での遅延 [波長]"
        },
        "tx": {
          "anyOf": [
            {
              "format": "double",
              "type": "number"
            },
            {
              "$ref": "#/$defs/NonFinite"
            }
          ]
        },
        "ty": {
          "anyOf": [
            {
              "format": "double",
              "type": "number"
            },
            {
              "$ref": "#/$defs/NonFinite"
            }
          ]
        },
        "wl0": {
          "anyOf": [
            {
              "format": "double",
              "type": "number"
            },
            {
              "$ref": "#/$defs/NonFinite"
            }
          ],
          "description": "設計波長 [µm]"
        }
      },
      "required": [
        "axis_deg",
        "tx",
        "ty",
        "retardance",
        "wl0"
      ],
      "type": "object"
    },
    "Reverse": {
      "enum": [
        "reverse"
      ],
      "type": "string"
    },
    "Row": {
      "additionalProperties": false,
      "description": "面の列の 1 行（面とその後の間隔）",
      "properties": {
        "action": {
          "anyOf": [
            {
              "$ref": "#/$defs/Action"
            },
            {
              "type": "null"
            }
          ],
          "description": "面の働き（省略は屈折）"
        },
        "after": {
          "anyOf": [
            {
              "$ref": "#/$defs/After"
            },
            {
              "type": "null"
            }
          ],
          "description": "面の後の傾き・偏心（\"reverse\" は前の変換を戻す）"
        },
        "aperture": {
          "anyOf": [
            {
              "$ref": "#/$defs/Aperture"
            },
            {
              "type": "null"
            }
          ],
          "description": "面の開口（省略は開口なし）"
        },
        "before": {
          "anyOf": [
            {
              "$ref": "#/$defs/Tilt"
            },
            {
              "type": "null"
            }
          ],
          "description": "面の前の傾き・偏心"
        },
        "chip": {
          "anyOf": [
            {
              "format": "double",
              "type": "number"
            },
            {
              "$ref": "#/$defs/NonFinite"
            }
          ],
          "description": "チップゾーン [mm]（OpticStudio の Chip Zone）: 面の形をクリア半径からこの幅だけ外へ延ばし、その外を平らにする"
        },
        "coating": {
          "description": "膜の名前",
          "type": "string"
        },
        "comment": {
          "type": "string"
        },
        "coordinate_break": {
          "anyOf": [
            {
              "$ref": "#/$defs/Tilt"
            },
            {
              "type": "null"
            }
          ],
          "description": "座標ブレーク（面でなく座標系だけを変える行）"
        },
        "disp": {
          "anyOf": [
            {
              "format": "double",
              "type": "number"
            },
            {
              "$ref": "#/$defs/NonFinite"
            }
          ],
          "description": "媒質の分散の相対変化: n = n0(λ) + dn + disp·(n0(λ) − n0(主波長))"
        },
        "dn": {
          "anyOf": [
            {
              "format": "double",
              "type": "number"
            },
            {
              "$ref": "#/$defs/NonFinite"
            }
          ],
          "description": "媒質の屈折率のずれ（全波長に足す）"
        },
        "dnd": {
          "anyOf": [
            {
              "format": "double",
              "type": "number"
            },
            {
              "$ref": "#/$defs/NonFinite"
            }
          ],
          "description": "ガラスの d 線の屈折率のずれ（OpticStudio の TIND）: モデルガラスの式で nd を変えた差を波長ごとに足す"
        },
        "dvd": {
          "anyOf": [
            {
              "format": "double",
              "type": "number"
            },
            {
              "$ref": "#/$defs/NonFinite"
            }
          ],
          "description": "ガラスのアッベ数のずれ（OpticStudio の TABB）: モデルガラスの式で vd を変えた差を波長ごとに足す"
        },
        "ignore": {
          "description": "無視する",
          "type": "boolean"
        },
        "image": {
          "description": "像面の印（最後の行）",
          "type": "boolean"
        },
        "mech": {
          "anyOf": [
            {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            {
              "$ref": "#/$defs/NonFinite"
            }
          ],
          "description": "固定した機械半径 [mm]（OpticStudio の Mech Semi-Dia。省略は自動: ガラスでつながる面の縁 + チップゾーンの最大。\n自動より小さければ自動のまま）"
        },
        "medium": {
          "anyOf": [
            {
              "$ref": "#/$defs/Medium"
            },
            {
              "type": "null"
            }
          ],
          "description": "面の後の媒質（省略は空気。鏡・座標ブレークでは前の媒質）"
        },
        "object": {
          "description": "物体面の印（最初の行。読むときは確かめるだけ）",
          "type": "boolean"
        },
        "semi": {
          "anyOf": [
            {
              "$ref": "#/$defs/Semi"
            },
            {
              "type": "null"
            }
          ],
          "description": "半直径 [mm]。\"auto\" は光線から求める"
        },
        "shape": {
          "anyOf": [
            {
              "$ref": "#/$defs/Shape"
            },
            {
              "type": "null"
            }
          ],
          "description": "面の形（省略は平面の標準面）"
        },
        "stop": {
          "description": "絞り",
          "type": "boolean"
        },
        "t": {
          "anyOf": [
            {
              "format": "double",
              "type": "number"
            },
            {
              "$ref": "#/$defs/NonFinite"
            }
          ],
          "description": "次の面までの厚さ [mm]"
        },
        "tce": {
          "anyOf": [
            {
              "format": "double",
              "type": "number"
            },
            {
              "$ref": "#/$defs/NonFinite"
            }
          ],
          "description": "面の熱膨張係数 [1e-6/°C]（OpticStudio のレンズデータの TCE の列。光線追跡には効かない）"
        }
      },
      "type": "object"
    },
    "Semi": {
      "anyOf": [
        {
          "anyOf": [
            {
              "format": "double",
              "type": "number"
            },
            {
              "$ref": "#/$defs/NonFinite"
            }
          ]
        },
        {
          "$ref": "#/$defs/Auto",
          "description": "\"auto\": 光線から求める"
        }
      ],
      "description": "半直径"
    },
    "Sgrin": {
      "description": "Gradient 5 の分散（SGRIN.DAT の組）",
      "properties": {
        "k": {
          "description": "K_ij（i = 1..3、j = 1..K_MAX）",
          "items": {
            "items": {
              "anyOf": [
                {
                  "format": "double",
                  "type": "number"
                },
                {
                  "$ref": "#/$defs/NonFinite"
                }
              ]
            },
            "type": "array"
          },
          "maxItems": 3,
          "minItems": 3,
          "type": "array"
        },
        "l": {
          "description": "L_ij（i = 1..3、j = 1..L_MAX）",
          "items": {
            "items": {
              "anyOf": [
                {
                  "format": "double",
                  "type": "number"
                },
                {
                  "$ref": "#/$defs/NonFinite"
                }
              ]
            },
            "type": "array"
          },
          "maxItems": 3,
          "minItems": 3,
          "type": "array"
        },
        "lmax": {
          "anyOf": [
            {
              "format": "double",
              "type": "number"
            },
            {
              "$ref": "#/$defs/NonFinite"
            }
          ]
        },
        "lmin": {
          "anyOf": [
            {
              "format": "double",
              "type": "number"
            },
            {
              "$ref": "#/$defs/NonFinite"
            }
          ],
          "description": "波長の範囲 [µm]"
        },
        "lref": {
          "anyOf": [
            {
              "format": "double",
              "type": "number"
            },
            {
              "$ref": "#/$defs/NonFinite"
            }
          ],
          "description": "基準波長 [µm]"
        },
        "name": {
          "type": "string"
        }
      },
      "required": [
        "name",
        "lmin",
        "lmax",
        "lref",
        "k",
        "l"
      ],
      "type": "object"
    },
    "Shape": {
      "description": "面の形（種類ごとの値だけ）。曲率は c [1/mm]",
      "oneOf": [
        {
          "additionalProperties": false,
          "description": "二次曲面（標準面）",
          "properties": {
            "conic": {
              "additionalProperties": false,
              "properties": {
                "c": {
                  "anyOf": [
                    {
                      "format": "double",
                      "type": "number"
                    },
                    {
                      "$ref": "#/$defs/NonFinite"
                    }
                  ]
                },
                "k": {
                  "anyOf": [
                    {
                      "format": "double",
                      "type": "number"
                    },
                    {
                      "$ref": "#/$defs/NonFinite"
                    }
                  ]
                }
              },
              "type": "object"
            }
          },
          "required": [
            "conic"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "description": "偶数次非球面: a は r², r⁴, … の係数",
          "properties": {
            "even_asphere": {
              "additionalProperties": false,
              "properties": {
                "a": {
                  "items": {
                    "anyOf": [
                      {
                        "format": "double",
                        "type": "number"
                      },
                      {
                        "$ref": "#/$defs/NonFinite"
                      }
                    ]
                  },
                  "type": "array"
                },
                "c": {
                  "anyOf": [
                    {
                      "format": "double",
                      "type": "number"
                    },
                    {
                      "$ref": "#/$defs/NonFinite"
                    }
                  ]
                },
                "k": {
                  "anyOf": [
                    {
                      "format": "double",
                      "type": "number"
                    },
                    {
                      "$ref": "#/$defs/NonFinite"
                    }
                  ]
                }
              },
              "type": "object"
            }
          },
          "required": [
            "even_asphere"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "description": "Odd Asphere: b は r¹, r², … の係数",
          "properties": {
            "odd_asphere": {
              "additionalProperties": false,
              "properties": {
                "b": {
                  "items": {
                    "anyOf": [
                      {
                        "format": "double",
                        "type": "number"
                      },
                      {
                        "$ref": "#/$defs/NonFinite"
                      }
                    ]
                  },
                  "type": "array"
                },
                "c": {
                  "anyOf": [
                    {
                      "format": "double",
                      "type": "number"
                    },
                    {
                      "$ref": "#/$defs/NonFinite"
                    }
                  ]
                },
                "k": {
                  "anyOf": [
                    {
                      "format": "double",
                      "type": "number"
                    },
                    {
                      "$ref": "#/$defs/NonFinite"
                    }
                  ]
                }
              },
              "type": "object"
            }
          },
          "required": [
            "odd_asphere"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "description": "トロイダル面: YZ 面の曲線（c・k・y², y⁴, … の係数 a）を回転の曲率 cx で回した面（cx = 0 は円柱面）",
          "properties": {
            "toroid": {
              "additionalProperties": false,
              "properties": {
                "a": {
                  "items": {
                    "anyOf": [
                      {
                        "format": "double",
                        "type": "number"
                      },
                      {
                        "$ref": "#/$defs/NonFinite"
                      }
                    ]
                  },
                  "type": "array"
                },
                "c": {
                  "anyOf": [
                    {
                      "format": "double",
                      "type": "number"
                    },
                    {
                      "$ref": "#/$defs/NonFinite"
                    }
                  ]
                },
                "cx": {
                  "anyOf": [
                    {
                      "format": "double",
                      "type": "number"
                    },
                    {
                      "$ref": "#/$defs/NonFinite"
                    }
                  ]
                },
                "k": {
                  "anyOf": [
                    {
                      "format": "double",
                      "type": "number"
                    },
                    {
                      "$ref": "#/$defs/NonFinite"
                    }
                  ]
                }
              },
              "type": "object"
            }
          },
          "required": [
            "toroid"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "description": "Zernike Standard Sag",
          "properties": {
            "zernike_standard": {
              "$ref": "#/$defs/ZernikeShape"
            }
          },
          "required": [
            "zernike_standard"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "description": "Zernike Fringe Sag",
          "properties": {
            "zernike_fringe": {
              "$ref": "#/$defs/ZernikeShape"
            }
          },
          "required": [
            "zernike_fringe"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "description": "Grid Sag",
          "properties": {
            "grid_sag": {
              "additionalProperties": false,
              "properties": {
                "a": {
                  "items": {
                    "anyOf": [
                      {
                        "format": "double",
                        "type": "number"
                      },
                      {
                        "$ref": "#/$defs/NonFinite"
                      }
                    ]
                  },
                  "type": "array"
                },
                "c": {
                  "anyOf": [
                    {
                      "format": "double",
                      "type": "number"
                    },
                    {
                      "$ref": "#/$defs/NonFinite"
                    }
                  ]
                },
                "grid": {
                  "anyOf": [
                    {
                      "$ref": "#/$defs/GridSag"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "grid_file": {
                  "description": "格子の .DAT のファイル名（書き出し用）",
                  "type": "string"
                },
                "k": {
                  "anyOf": [
                    {
                      "format": "double",
                      "type": "number"
                    },
                    {
                      "$ref": "#/$defs/NonFinite"
                    }
                  ]
                },
                "terms": {
                  "anyOf": [
                    {
                      "$ref": "#/$defs/ZernSag"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "type": "object"
            }
          },
          "required": [
            "grid_sag"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "description": "Tilted: 平面 z = x tan α + y tan β。c・k は交点を求める初めの値にだけ使う（.zmx から読んだ値が残るとき）",
          "properties": {
            "tilted": {
              "additionalProperties": false,
              "properties": {
                "c": {
                  "anyOf": [
                    {
                      "format": "double",
                      "type": "number"
                    },
                    {
                      "$ref": "#/$defs/NonFinite"
                    }
                  ]
                },
                "k": {
                  "anyOf": [
                    {
                      "format": "double",
                      "type": "number"
                    },
                    {
                      "$ref": "#/$defs/NonFinite"
                    }
                  ]
                },
                "tan": {
                  "items": {
                    "anyOf": [
                      {
                        "format": "double",
                        "type": "number"
                      },
                      {
                        "$ref": "#/$defs/NonFinite"
                      }
                    ]
                  },
                  "maxItems": 2,
                  "minItems": 2,
                  "type": "array"
                }
              },
              "type": "object"
            }
          },
          "required": [
            "tilted"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "description": "Irregular: 偏心・傾けた標準面に Zs ρ⁴ + Za ρ_y² + Zc ρ² ρ_y（ρ は半直径で正規化）",
          "properties": {
            "irregular": {
              "additionalProperties": false,
              "properties": {
                "angle": {
                  "anyOf": [
                    {
                      "format": "double",
                      "type": "number"
                    },
                    {
                      "$ref": "#/$defs/NonFinite"
                    }
                  ],
                  "description": "項を回す角度 [deg]"
                },
                "c": {
                  "anyOf": [
                    {
                      "format": "double",
                      "type": "number"
                    },
                    {
                      "$ref": "#/$defs/NonFinite"
                    }
                  ]
                },
                "decenter": {
                  "items": {
                    "anyOf": [
                      {
                        "format": "double",
                        "type": "number"
                      },
                      {
                        "$ref": "#/$defs/NonFinite"
                      }
                    ]
                  },
                  "maxItems": 2,
                  "minItems": 2,
                  "type": "array"
                },
                "k": {
                  "anyOf": [
                    {
                      "format": "double",
                      "type": "number"
                    },
                    {
                      "$ref": "#/$defs/NonFinite"
                    }
                  ]
                },
                "tilt": {
                  "description": "傾き x・y [deg]",
                  "items": {
                    "anyOf": [
                      {
                        "format": "double",
                        "type": "number"
                      },
                      {
                        "$ref": "#/$defs/NonFinite"
                      }
                    ]
                  },
                  "maxItems": 2,
                  "minItems": 2,
                  "type": "array"
                },
                "za": {
                  "anyOf": [
                    {
                      "format": "double",
                      "type": "number"
                    },
                    {
                      "$ref": "#/$defs/NonFinite"
                    }
                  ]
                },
                "zc": {
                  "anyOf": [
                    {
                      "format": "double",
                      "type": "number"
                    },
                    {
                      "$ref": "#/$defs/NonFinite"
                    }
                  ]
                },
                "zs": {
                  "anyOf": [
                    {
                      "format": "double",
                      "type": "number"
                    },
                    {
                      "$ref": "#/$defs/NonFinite"
                    }
                  ]
                }
              },
              "type": "object"
            }
          },
          "required": [
            "irregular"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "description": "y だけの偶数次非球面（Cylinder Fresnel の基板。働きは cylinder_fresnel）",
          "properties": {
            "cylinder": {
              "additionalProperties": false,
              "properties": {
                "a": {
                  "items": {
                    "anyOf": [
                      {
                        "format": "double",
                        "type": "number"
                      },
                      {
                        "$ref": "#/$defs/NonFinite"
                      }
                    ]
                  },
                  "type": "array"
                },
                "c": {
                  "anyOf": [
                    {
                      "format": "double",
                      "type": "number"
                    },
                    {
                      "$ref": "#/$defs/NonFinite"
                    }
                  ]
                },
                "k": {
                  "anyOf": [
                    {
                      "format": "double",
                      "type": "number"
                    },
                    {
                      "$ref": "#/$defs/NonFinite"
                    }
                  ]
                }
              },
              "type": "object"
            }
          },
          "required": [
            "cylinder"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "description": "利用者定義の形: 二次曲面（c・k）に、登録したモデル model の矢高を足す",
          "properties": {
            "user": {
              "additionalProperties": false,
              "properties": {
                "c": {
                  "anyOf": [
                    {
                      "format": "double",
                      "type": "number"
                    },
                    {
                      "$ref": "#/$defs/NonFinite"
                    }
                  ]
                },
                "config": {
                  "additionalProperties": {
                    "$ref": "#/$defs/Value"
                  },
                  "default": {},
                  "type": "object"
                },
                "flip_z": {
                  "description": "z について裏返した（鏡の後・玉の反転。矢高の符号が逆）",
                  "type": "boolean"
                },
                "k": {
                  "anyOf": [
                    {
                      "format": "double",
                      "type": "number"
                    },
                    {
                      "$ref": "#/$defs/NonFinite"
                    }
                  ]
                },
                "mirror_x": {
                  "description": "x について映した（玉の反転。x の向きが逆）",
                  "type": "boolean"
                },
                "model": {
                  "description": "モデルの名前（空は未設定）",
                  "type": "string"
                }
              },
              "required": [
                "model"
              ],
              "type": "object"
            }
          },
          "required": [
            "user"
          ],
          "type": "object"
        }
      ]
    },
    "Solve": {
      "description": "ソルブ: 面 surf の厚さか曲率（[`SolveKind::is_curv`]）を、種類 kind の条件で決める",
      "oneOf": [
        {
          "description": "厚さ: 次の面での主波長の近軸マージナル光線の高さ = height（MAZH 高さ 0）",
          "properties": {
            "height": {
              "anyOf": [
                {
                  "format": "double",
                  "type": "number"
                },
                {
                  "$ref": "#/$defs/NonFinite"
                }
              ]
            },
            "type": {
              "const": "marginal_height",
              "type": "string"
            }
          },
          "required": [
            "type",
            "height"
          ],
          "type": "object"
        },
        {
          "description": "厚さ: 次の面での実光線（軸上、瞳 (0, zone)、主波長）の高さ = height（MAZH 高さ 帯、帯 ≠ 0）",
          "properties": {
            "height": {
              "anyOf": [
                {
                  "format": "double",
                  "type": "number"
                },
                {
                  "$ref": "#/$defs/NonFinite"
                }
              ]
            },
            "type": {
              "const": "marginal_height_zone",
              "type": "string"
            },
            "zone": {
              "anyOf": [
                {
                  "format": "double",
                  "type": "number"
                },
                {
                  "$ref": "#/$defs/NonFinite"
                }
              ]
            }
          },
          "required": [
            "type",
            "height",
            "zone"
          ],
          "type": "object"
        },
        {
          "description": "厚さ: 次の面での近軸主光線の高さ = height（CHZH 高さ 0）",
          "properties": {
            "height": {
              "anyOf": [
                {
                  "format": "double",
                  "type": "number"
                },
                {
                  "$ref": "#/$defs/NonFinite"
                }
              ]
            },
            "type": {
              "const": "chief_height",
              "type": "string"
            }
          },
          "required": [
            "type",
            "height"
          ],
          "type": "object"
        },
        {
          "description": "厚さ: 軸上の視野・主波長の実光線（瞳 (0, zone)）の像面での OPD [波] = opd（OPDZ OPD 帯）。OPD は\n[`crate::opd::opd`]（OpticStudio の光線の OPD、OPDC と同じ）",
          "properties": {
            "opd": {
              "anyOf": [
                {
                  "format": "double",
                  "type": "number"
                },
                {
                  "$ref": "#/$defs/NonFinite"
                }
              ]
            },
            "type": {
              "const": "opd",
              "type": "string"
            },
            "zone": {
              "anyOf": [
                {
                  "format": "double",
                  "type": "number"
                },
                {
                  "$ref": "#/$defs/NonFinite"
                }
              ]
            }
          },
          "required": [
            "type",
            "opd",
            "zone"
          ],
          "type": "object"
        },
        {
          "description": "厚さ: 次の面を近軸の瞳（その空間で近軸主光線が軸を切る位置）に置く（TPUP）",
          "properties": {
            "type": {
              "const": "pupil_position",
              "type": "string"
            }
          },
          "required": [
            "type"
          ],
          "type": "object"
        },
        {
          "description": "厚さ: 半径方向の高さ radius（0 は面の半直径）でのコバ厚 = thickness（EDGE コバ厚 r）",
          "properties": {
            "radius": {
              "anyOf": [
                {
                  "format": "double",
                  "type": "number"
                },
                {
                  "$ref": "#/$defs/NonFinite"
                }
              ]
            },
            "thickness": {
              "anyOf": [
                {
                  "format": "double",
                  "type": "number"
                },
                {
                  "$ref": "#/$defs/NonFinite"
                }
              ]
            },
            "type": {
              "const": "edge",
              "type": "string"
            }
          },
          "required": [
            "type",
            "thickness",
            "radius"
          ],
          "type": "object"
        },
        {
          "description": "厚さ: 面 other から次の面までの距離（厚さの和 Σ t[other..=この面]）= length（TOLE s 長さ）。other が後ろなら、\nこの面から面 other までの距離 Σ t[この面..other] = length",
          "properties": {
            "length": {
              "anyOf": [
                {
                  "format": "double",
                  "type": "number"
                },
                {
                  "$ref": "#/$defs/NonFinite"
                }
              ]
            },
            "other": {
              "format": "uint",
              "minimum": 0,
              "type": "integer"
            },
            "type": {
              "const": "position",
              "type": "string"
            }
          },
          "required": [
            "type",
            "other",
            "length"
          ],
          "type": "object"
        },
        {
          "description": "厚さ: 面 other の厚さ + この面の厚さ = sum（TCOM s 和）",
          "properties": {
            "other": {
              "format": "uint",
              "minimum": 0,
              "type": "integer"
            },
            "sum": {
              "anyOf": [
                {
                  "format": "double",
                  "type": "number"
                },
                {
                  "$ref": "#/$defs/NonFinite"
                }
              ]
            },
            "type": {
              "const": "compensator",
              "type": "string"
            }
          },
          "required": [
            "type",
            "other",
            "sum"
          ],
          "type": "object"
        },
        {
          "description": "厚さ: 次の面を面 other の曲率中心に置く（TCOC s 0。平面は R = 1e10）",
          "properties": {
            "other": {
              "format": "uint",
              "minimum": 0,
              "type": "integer"
            },
            "type": {
              "const": "center_of_curvature",
              "type": "string"
            }
          },
          "required": [
            "type",
            "other"
          ],
          "type": "object"
        },
        {
          "description": "曲率: 面の後の近軸マージナル光線の傾き = angle（CURV c 2 値）",
          "properties": {
            "angle": {
              "anyOf": [
                {
                  "format": "double",
                  "type": "number"
                },
                {
                  "$ref": "#/$defs/NonFinite"
                }
              ]
            },
            "type": {
              "const": "marginal_angle",
              "type": "string"
            }
          },
          "required": [
            "type",
            "angle"
          ],
          "type": "object"
        },
        {
          "description": "曲率: 面の後の近軸主光線の傾き = angle（CURV c 3 値）",
          "properties": {
            "angle": {
              "anyOf": [
                {
                  "format": "double",
                  "type": "number"
                },
                {
                  "$ref": "#/$defs/NonFinite"
                }
              ]
            },
            "type": {
              "const": "chief_angle",
              "type": "string"
            }
          },
          "required": [
            "type",
            "angle"
          ],
          "type": "object"
        },
        {
          "description": "曲率: 近軸マージナル光線が面に垂直に入る（CURV c 5）",
          "properties": {
            "type": {
              "const": "marginal_normal",
              "type": "string"
            }
          },
          "required": [
            "type"
          ],
          "type": "object"
        },
        {
          "description": "曲率: 近軸主光線が面に垂直に入る（CURV c 6）",
          "properties": {
            "type": {
              "const": "chief_normal",
              "type": "string"
            }
          },
          "required": [
            "type"
          ],
          "type": "object"
        },
        {
          "description": "曲率: 近軸マージナル光線で不遊（u′/n′ = u/n、CURV c 7）",
          "properties": {
            "type": {
              "const": "aplanatic",
              "type": "string"
            }
          },
          "required": [
            "type"
          ],
          "type": "object"
        },
        {
          "description": "曲率: この面を含む玉（後ろがガラスなら次の面と、そうでなければ前の面と）のパワー = power（CURV c 8 値）",
          "properties": {
            "power": {
              "anyOf": [
                {
                  "format": "double",
                  "type": "number"
                },
                {
                  "$ref": "#/$defs/NonFinite"
                }
              ]
            },
            "type": {
              "const": "element_power",
              "type": "string"
            }
          },
          "required": [
            "type",
            "power"
          ],
          "type": "object"
        },
        {
          "description": "曲率: 曲率中心を面 other の頂点に置く（CURV c 9 s）",
          "properties": {
            "other": {
              "format": "uint",
              "minimum": 0,
              "type": "integer"
            },
            "type": {
              "const": "concentric_surface",
              "type": "string"
            }
          },
          "required": [
            "type",
            "other"
          ],
          "type": "object"
        },
        {
          "description": "曲率: 曲率中心を面 other の曲率中心に置く（CURV c 10 s。平面は R = 1e10）",
          "properties": {
            "other": {
              "format": "uint",
              "minimum": 0,
              "type": "integer"
            },
            "type": {
              "const": "concentric_radius",
              "type": "string"
            }
          },
          "required": [
            "type",
            "other"
          ],
          "type": "object"
        },
        {
          "description": "曲率: 面の後の近軸マージナル光線の傾き = −1/(2 fnum)（CURV c 11 F）",
          "properties": {
            "fnum": {
              "anyOf": [
                {
                  "format": "double",
                  "type": "number"
                },
                {
                  "$ref": "#/$defs/NonFinite"
                }
              ]
            },
            "type": {
              "const": "f_number",
              "type": "string"
            }
          },
          "required": [
            "type",
            "fnum"
          ],
          "type": "object"
        },
        {
          "description": "曲率: ZPL のマクロ（[`System::macros`] の番号 index）の SOLVERETURN の値（CURV c 12 … \"名前\"）",
          "properties": {
            "index": {
              "format": "uint16",
              "maximum": 65535,
              "minimum": 0,
              "type": "integer"
            },
            "type": {
              "const": "macro_curv",
              "type": "string"
            }
          },
          "required": [
            "type",
            "index"
          ],
          "type": "object"
        },
        {
          "description": "厚さ: ZPL のマクロ（[`System::macros`] の番号 index）の SOLVERETURN の値",
          "properties": {
            "index": {
              "format": "uint16",
              "maximum": 65535,
              "minimum": 0,
              "type": "integer"
            },
            "type": {
              "const": "macro_thick",
              "type": "string"
            }
          },
          "required": [
            "type",
            "index"
          ],
          "type": "object"
        }
      ],
      "properties": {
        "surf": {
          "format": "uint",
          "minimum": 0,
          "type": "integer"
        }
      },
      "required": [
        "surf"
      ],
      "type": "object"
    },
    "Target": {
      "description": "パラメータが付く先。面・玉/群の番号の意味は種類で変わらない",
      "oneOf": [
        {
          "additionalProperties": false,
          "description": "面の番号",
          "properties": {
            "surf": {
              "format": "uint",
              "minimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "surf"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "description": "玉・群の番号（[`System::units`]）",
          "properties": {
            "unit": {
              "format": "uint",
              "minimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "unit"
          ],
          "type": "object"
        },
        {
          "const": "system",
          "description": "面・玉・群に付かない系全体（物点の移動・波長）",
          "type": "string"
        }
      ]
    },
    "Tilt": {
      "additionalProperties": false,
      "description": "傾き・偏心（座標ブレーク・面の前後）",
      "properties": {
        "decenter": {
          "description": "偏心 x・y [mm]",
          "items": {
            "anyOf": [
              {
                "format": "double",
                "type": "number"
              },
              {
                "$ref": "#/$defs/NonFinite"
              }
            ]
          },
          "maxItems": 2,
          "minItems": 2,
          "type": "array"
        },
        "order": {
          "description": "順序（0: 偏心 → X → Y → Z、1: Z → Y → X → 偏心）",
          "format": "uint8",
          "maximum": 255,
          "minimum": 0,
          "type": "integer"
        },
        "tilt": {
          "description": "傾き x・y・z [deg]",
          "items": {
            "anyOf": [
              {
                "format": "double",
                "type": "number"
              },
              {
                "$ref": "#/$defs/NonFinite"
              }
            ]
          },
          "maxItems": 3,
          "minItems": 3,
          "type": "array"
        }
      },
      "type": "object"
    },
    "Unit": {
      "description": "玉・群: 面の範囲の組と、その剛体の動き・移動",
      "properties": {
        "auto": {
          "description": "読込で作った玉（lens1 …）",
          "type": "boolean"
        },
        "flipped": {
          "description": "玉をもとの向き（カタログ・.zmx の向き）から裏返して置いた（プロジェクトの `reversed` の玉）。\n公差のくさびの面（もとの向きの後ろの面）を選ぶのに使う",
          "type": "boolean"
        },
        "motion": {
          "description": "剛体の動き dx dy tx ty tz [mm, deg]",
          "items": {
            "anyOf": [
              {
                "format": "double",
                "type": "number"
              },
              {
                "$ref": "#/$defs/NonFinite"
              }
            ]
          },
          "maxItems": 5,
          "minItems": 5,
          "type": "array"
        },
        "name": {
          "type": "string"
        },
        "pivot": {
          "description": "回転の中心（最初の範囲の最初の面の直前の座標系、その面の頂点が原点）",
          "items": {
            "anyOf": [
              {
                "format": "double",
                "type": "number"
              },
              {
                "$ref": "#/$defs/NonFinite"
              }
            ]
          },
          "maxItems": 3,
          "minItems": 3,
          "type": "array"
        },
        "shift": {
          "anyOf": [
            {
              "format": "double",
              "type": "number"
            },
            {
              "$ref": "#/$defs/NonFinite"
            }
          ],
          "description": "群の移動 [mm]（今の厚さに入っている分）"
        },
        "spans": {
          "description": "面の範囲 [最初, 最後]（両端を含む、光の通る順）",
          "items": {
            "items": {
              "format": "uint",
              "minimum": 0,
              "type": "integer"
            },
            "maxItems": 2,
            "minItems": 2,
            "type": "array"
          },
          "type": "array"
        }
      },
      "required": [
        "name",
        "spans",
        "pivot",
        "motion",
        "shift",
        "auto"
      ],
      "type": "object"
    },
    "UnitKind": {
      "description": "玉・群のパラメータの種類",
      "oneOf": [
        {
          "enum": [
            "Dx",
            "Dy",
            "Ty",
            "Tz"
          ],
          "type": "string"
        },
        {
          "const": "Tx",
          "description": "傾き [deg]",
          "type": "string"
        },
        {
          "const": "Shift",
          "description": "群の移動（前の間隔に足し、後の間隔から引く）",
          "type": "string"
        },
        {
          "const": "Dn",
          "description": "範囲の中の媒質の屈折率のずれ",
          "type": "string"
        },
        {
          "const": "Disp",
          "description": "範囲の中の媒質の分散の相対変化",
          "type": "string"
        }
      ]
    },
    "UserKey": {
      "type": "string"
    },
    "Value": {
      "anyOf": [
        {
          "anyOf": [
            {
              "format": "double",
              "type": "number"
            },
            {
              "$ref": "#/$defs/NonFinite"
            }
          ]
        },
        {
          "description": "真偽（[`ConfigReader::flag`]。0・1 の数も受ける）",
          "type": "boolean"
        },
        {
          "type": "string"
        },
        {
          "description": "数の並び（角度 4 個など）",
          "items": {
            "anyOf": [
              {
                "format": "double",
                "type": "number"
              },
              {
                "$ref": "#/$defs/NonFinite"
              }
            ]
          },
          "type": "array"
        }
      ],
      "description": "設定の値（系ファイルの JSON では数・真偽・文字列・数の並びをそのまま書く）"
    },
    "VigInterp": {
      "description": "定義した視野以外の点のケラレ係数の求め方（[`System::vig_factors`]）",
      "oneOf": [
        {
          "const": "opticstudio",
          "description": "OpticStudio 2026 R1.01 と同じ（y だけの視野は r² で補間、ほかは L1 で最も近い視野の値。視野の間で段差になる）。\nOpticStudio と照合するとき",
          "type": "string"
        },
        {
          "const": "continuous",
          "description": "連続（既定、2026-11-13 masa 決定）: y だけの視野は r² で補間（外は最も外の視野の値。OpticStudio と同じ区間は\n同じ値）、ほかは視野の点の Delaunay 三角形分割で線形、外側は凸包の縁の最も近い点の値",
          "type": "string"
        }
      ]
    },
    "Wave": {
      "additionalProperties": false,
      "description": "波長",
      "properties": {
        "um": {
          "anyOf": [
            {
              "format": "double",
              "type": "number"
            },
            {
              "$ref": "#/$defs/NonFinite"
            }
          ],
          "description": "波長 [µm]"
        },
        "weight": {
          "anyOf": [
            {
              "format": "double",
              "type": "number"
            },
            {
              "$ref": "#/$defs/NonFinite"
            }
          ]
        }
      },
      "required": [
        "um"
      ],
      "type": "object"
    },
    "ZernSag": {
      "description": "Zernike の矢高の項\n\nserde では内部の `groups` を書き出さず、読み直したら `coef` から作り直す。\n項の数が [`ZernSag::max_terms`] を超えるものは読み直しでエラーにする",
      "properties": {
        "coef": {
          "description": "項 1, 2, … の係数 [mm]",
          "items": {
            "anyOf": [
              {
                "format": "double",
                "type": "number"
              },
              {
                "$ref": "#/$defs/NonFinite"
              }
            ]
          },
          "type": "array"
        },
        "dx": {
          "anyOf": [
            {
              "format": "double",
              "type": "number"
            },
            {
              "$ref": "#/$defs/NonFinite"
            }
          ],
          "description": "Zernike の項の中心の偏心（Zern Decenter X・Y）[mm]"
        },
        "dy": {
          "anyOf": [
            {
              "format": "double",
              "type": "number"
            },
            {
              "$ref": "#/$defs/NonFinite"
            }
          ]
        },
        "extrapolate": {
          "description": "正規化半径の外でも Zernike の項を使うか",
          "type": "boolean"
        },
        "fringe": {
          "description": "Fringe の順（規格化なし）か、Standard（Noll の順、規格化）か",
          "type": "boolean"
        },
        "norm": {
          "anyOf": [
            {
              "format": "double",
              "type": "number"
            },
            {
              "$ref": "#/$defs/NonFinite"
            }
          ],
          "description": "正規化半径 [mm]"
        }
      },
      "required": [
        "fringe",
        "norm",
        "coef",
        "extrapolate",
        "dx",
        "dy"
      ],
      "type": "object"
    },
    "ZernikeShape": {
      "additionalProperties": false,
      "description": "Zernike Sag の形",
      "properties": {
        "a": {
          "description": "土台の偶数次非球面の係数",
          "items": {
            "anyOf": [
              {
                "format": "double",
                "type": "number"
              },
              {
                "$ref": "#/$defs/NonFinite"
              }
            ]
          },
          "type": "array"
        },
        "c": {
          "anyOf": [
            {
              "format": "double",
              "type": "number"
            },
            {
              "$ref": "#/$defs/NonFinite"
            }
          ]
        },
        "k": {
          "anyOf": [
            {
              "format": "double",
              "type": "number"
            },
            {
              "$ref": "#/$defs/NonFinite"
            }
          ]
        },
        "terms": {
          "anyOf": [
            {
              "$ref": "#/$defs/ZernSag"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "type": "object"
    }
  },
  "$id": "https://masa-iwm.github.io/lensbench/schema/v0.11/system.schema.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "description": "系ファイル（[`crate::sysfile`]）の形。スキーマを作るためだけの型（読み書きは sysfile が Value で行う）",
  "properties": {
    "$schema": {
      "description": "このファイルのスキーマ（エディタの補完・検査用。読むときは無視する）",
      "type": "string"
    },
    "coatings": {
      "default": [],
      "description": "膜の実測表・モデルのファイル（相対パスは系ファイルのフォルダから）",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "format": {
      "const": "lensbench-system",
      "description": "系ファイルの印（\"lensbench-system\"）",
      "type": "string"
    },
    "format_version": {
      "description": "形式の版（書くのは 2。読めるのはこの lensbench が書く版以下）",
      "format": "uint64",
      "minimum": 0,
      "type": "integer"
    },
    "hash": {
      "default": "",
      "description": "`system` の部分（キーを名前の順にした空白なしの JSON）の SHA-256（\"sha256:…\"）。合わなければ読むときに注意を出す",
      "type": "string"
    },
    "lensbench": {
      "default": "",
      "description": "書いた lensbench の版",
      "type": "string"
    },
    "system": {
      "$ref": "#/$defs/Prescription",
      "description": "順次の面の列の系（処方。利用者が書いた値だけ）"
    }
  },
  "required": [
    "format",
    "format_version",
    "system"
  ],
  "title": "lensbench 系ファイル",
  "type": "object"
}
