dipoleq.input

dipoleq input file schema using pydantic for validation

pydantic model dipoleq.input.CDipoleIntStableIn

Bases: PlasmaModelBaseModel

Parameters:

data (Any)

Show JSON schema
{
   "title": "CDipoleIntStableIn",
   "type": "object",
   "properties": {
      "Type": {
         "anyOf": [
            {
               "const": 6,
               "type": "integer"
            },
            {
               "const": "DipoleIntStable",
               "type": "string"
            },
            {
               "const": "6",
               "type": "string"
            }
         ],
         "title": "Type"
      },
      "RPeak": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "title": "Rpeak"
      },
      "ZPeak": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "title": "Zpeak"
      },
      "PEdge": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "title": "Pedge"
      },
      "PsiFlat": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "title": "Psiflat"
      },
      "NSurf": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "title": "Nsurf"
      },
      "fCrit": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "title": "Fcrit"
      }
   },
   "required": [
      "Type",
      "RPeak",
      "ZPeak",
      "PEdge",
      "PsiFlat",
      "NSurf",
      "fCrit"
   ]
}

Fields:
Validators:
field NSurf: int | None [Required]
field PEdge: float | None [Required]
field PsiFlat: float | None [Required]
field RPeak: float | None [Required]
field Type: LDS [Required]
Validated by:
field ZPeak: float | None [Required]
field fCrit: float | None [Required]
validator check_model_type  »  Type
Parameters:

v (Any)

Return type:

Any

do_init(pl)

Initialize the plasma model with the input data.

Parameters:

pl (Plasma)

Return type:

None

pydantic model dipoleq.input.CDipoleStablePsiNIn

Bases: PlasmaModelBaseModel

Parameters:

data (Any)

Show JSON schema
{
   "title": "CDipoleStablePsiNIn",
   "type": "object",
   "properties": {
      "Type": {
         "anyOf": [
            {
               "const": 7,
               "type": "integer"
            },
            {
               "const": "DipoleStablePsiN",
               "type": "string"
            },
            {
               "const": "7",
               "type": "string"
            }
         ],
         "title": "Type"
      },
      "PsiNPeak": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "title": "Psinpeak"
      },
      "PEdge": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "title": "Pedge"
      },
      "PsiFlat": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "title": "Psiflat"
      },
      "NSurf": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "title": "Nsurf"
      },
      "fCrit": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "title": "Fcrit"
      }
   },
   "required": [
      "Type",
      "PsiNPeak",
      "PEdge",
      "PsiFlat",
      "NSurf",
      "fCrit"
   ]
}

Fields:
Validators:
field NSurf: int | None [Required]
field PEdge: float | None [Required]
field PsiFlat: float | None [Required]
field PsiNPeak: float | None [Required]
field Type: LDPN [Required]
Validated by:
field fCrit: float | None [Required]
validator check_model_type  »  Type
Parameters:

v (Any)

Return type:

Any

do_init(pl)

Initialize the plasma model with the input data.

Parameters:

pl (Plasma)

Return type:

None

pydantic model dipoleq.input.CDipoleStdIn

Bases: PlasmaModelBaseModel

Parameters:

data (Any)

Show JSON schema
{
   "title": "CDipoleStdIn",
   "type": "object",
   "properties": {
      "Type": {
         "anyOf": [
            {
               "const": 5,
               "type": "integer"
            },
            {
               "const": "DipoleStd",
               "type": "string"
            },
            {
               "const": "5",
               "type": "string"
            }
         ],
         "title": "Type"
      },
      "RPeak": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "title": "Rpeak"
      },
      "ZPeak": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "title": "Zpeak"
      },
      "PsiPeak": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "title": "Psipeak"
      },
      "PsiEdge": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "title": "Psiedge"
      },
      "PsiDipole": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "title": "Psidipole"
      },
      "PPeak": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "title": "Ppeak"
      },
      "PrExp": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "title": "Prexp"
      }
   },
   "required": [
      "Type",
      "RPeak",
      "ZPeak",
      "PsiPeak",
      "PsiEdge",
      "PsiDipole",
      "PPeak",
      "PrExp"
   ]
}

Fields:
Validators:
field PPeak: float | None [Required]
field PrExp: float | None [Required]
field PsiDipole: float | None [Required]
field PsiEdge: float | None [Required]
field PsiPeak: float | None [Required]
field RPeak: float | None [Required]
field Type: LTS [Required]
Validated by:
field ZPeak: float | None [Required]
validator check_model_type  »  Type
Parameters:

v (Any)

Return type:

Any

do_init(pl)
Parameters:

pl (Plasma)

Return type:

None

pydantic model dipoleq.input.CoilIn

Bases: BaseModel

Coil input data.

Parameters:

data (Any)

Show JSON schema
{
   "title": "CoilIn",
   "description": "Coil input data.",
   "type": "object",
   "properties": {
      "Name": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Name"
      },
      "Enabled": {
         "anyOf": [
            {
               "type": "boolean"
            },
            {
               "type": "null"
            }
         ],
         "default": true,
         "title": "Enabled"
      },
      "InitialCurrent": {
         "title": "Initialcurrent",
         "type": "number"
      },
      "R": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "R"
      },
      "dR": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Dr"
      },
      "Z": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Z"
      },
      "dZ": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Dz"
      },
      "NumSubCoils": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Numsubcoils"
      },
      "SubCoils": {
         "anyOf": [
            {
               "items": {
                  "$ref": "#/$defs/SubCoilIn"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Subcoils"
      }
   },
   "$defs": {
      "SubCoilIn": {
         "description": "Subcoil input data.",
         "properties": {
            "Name": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Name"
            },
            "Fraction": {
               "title": "Fraction",
               "type": "number"
            },
            "R": {
               "title": "R",
               "type": "number"
            },
            "Z": {
               "title": "Z",
               "type": "number"
            }
         },
         "required": [
            "Fraction",
            "R",
            "Z"
         ],
         "title": "SubCoilIn",
         "type": "object"
      }
   },
   "required": [
      "InitialCurrent"
   ]
}

Fields:
Validators:
field Enabled: bool | None = True
Validated by:
field InitialCurrent: float [Required]
Validated by:
field Name: str | None = None
Validated by:
field NumSubCoils: int | None = None
Validated by:
field R: float | None = None
Validated by:
field SubCoils: list[SubCoilIn] | None = None
Validated by:
field Z: float | None = None
Validated by:
field dR: float | None = None
Validated by:
field dZ: float | None = None
Validated by:
validator check_shape_vs_subcoils  »  all fields
Return type:

Self

do_init(coil, psiGrid)
Parameters:
Return type:

None

pydantic model dipoleq.input.LimiterIn

Bases: BaseModel

Parameters:

data (Any)

Show JSON schema
{
   "title": "LimiterIn",
   "type": "object",
   "properties": {
      "Name": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "title": "Name"
      },
      "R1": {
         "title": "R1",
         "type": "number"
      },
      "Z1": {
         "title": "Z1",
         "type": "number"
      },
      "R2": {
         "title": "R2",
         "type": "number"
      },
      "Z2": {
         "title": "Z2",
         "type": "number"
      },
      "Enabled": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": true,
         "title": "Enabled"
      }
   },
   "required": [
      "Name",
      "R1",
      "Z1",
      "R2",
      "Z2"
   ]
}

Fields:
field Enabled: int | None = True
field Name: str | None [Required]
field R1: float [Required]
field R2: float [Required]
field Z1: float [Required]
field Z2: float [Required]
do_init(lim)
Parameters:

lim (Limiter)

Return type:

None

pydantic model dipoleq.input.MachineIn

Bases: BaseModel

Parameters:

data (Any)

Show JSON schema
{
   "title": "MachineIn",
   "type": "object",
   "properties": {
      "MaxIterFixed": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": 0,
         "title": "Maxiterfixed"
      },
      "MaxIterFree": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": 50,
         "title": "Maxiterfree"
      },
      "Name": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": "pyDipolEQ",
         "title": "Name"
      },
      "Info": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": "DipolEQ Equilibrium",
         "title": "Info"
      },
      "Oname": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Oname"
      },
      "Iname": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Iname"
      },
      "MGname": {
         "default": "",
         "title": "Mgname",
         "type": "string"
      },
      "LHname": {
         "default": "",
         "title": "Lhname",
         "type": "string"
      },
      "RSname": {
         "default": "",
         "title": "Rsname",
         "type": "string"
      },
      "RestartStatus": {
         "anyOf": [
            {
               "type": "boolean"
            },
            {
               "type": "null"
            }
         ],
         "default": false,
         "title": "Restartstatus"
      },
      "RestartUnkns": {
         "anyOf": [
            {
               "type": "boolean"
            },
            {
               "type": "null"
            }
         ],
         "default": false,
         "title": "Restartunkns"
      },
      "LHGreenStatus": {
         "anyOf": [
            {
               "type": "boolean"
            },
            {
               "type": "null"
            }
         ],
         "default": false,
         "title": "Lhgreenstatus"
      },
      "MGreenStatus": {
         "anyOf": [
            {
               "type": "boolean"
            },
            {
               "type": "null"
            }
         ],
         "default": false,
         "title": "Mgreenstatus"
      },
      "NumEqualEq": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": 0,
         "title": "Numequaleq"
      },
      "VacuumOnly": {
         "anyOf": [
            {
               "type": "boolean"
            },
            {
               "type": "null"
            }
         ],
         "default": false,
         "title": "Vacuumonly"
      },
      "FitMeasurements": {
         "anyOf": [
            {
               "type": "boolean"
            },
            {
               "type": "null"
            }
         ],
         "default": false,
         "title": "Fitmeasurements"
      },
      "PsiGrid": {
         "$ref": "#/$defs/PsiGridIn"
      },
      "Plasma": {
         "$ref": "#/$defs/PlasmaIn"
      },
      "Coils": {
         "items": {
            "$ref": "#/$defs/CoilIn"
         },
         "title": "Coils",
         "type": "array"
      },
      "Limiters": {
         "items": {
            "$ref": "#/$defs/LimiterIn"
         },
         "title": "Limiters",
         "type": "array"
      },
      "Separatrices": {
         "anyOf": [
            {
               "items": {
                  "$ref": "#/$defs/SeparatrixIn"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Separatrices"
      },
      "Measures": {
         "anyOf": [
            {
               "items": {
                  "$ref": "#/$defs/MeasureIn"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Measures"
      },
      "Shells": {
         "anyOf": [
            {
               "items": {
                  "$ref": "#/$defs/ShellIn"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Shells"
      },
      "NumCoils": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Numcoils"
      },
      "NumShells": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Numshells"
      },
      "NumLimiters": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Numlimiters"
      },
      "NumSeps": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Numseps"
      },
      "NumMeasures": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Nummeasures"
      }
   },
   "$defs": {
      "CDipoleIntStableIn": {
         "properties": {
            "Type": {
               "anyOf": [
                  {
                     "const": 6,
                     "type": "integer"
                  },
                  {
                     "const": "DipoleIntStable",
                     "type": "string"
                  },
                  {
                     "const": "6",
                     "type": "string"
                  }
               ],
               "title": "Type"
            },
            "RPeak": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Rpeak"
            },
            "ZPeak": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Zpeak"
            },
            "PEdge": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Pedge"
            },
            "PsiFlat": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Psiflat"
            },
            "NSurf": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Nsurf"
            },
            "fCrit": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Fcrit"
            }
         },
         "required": [
            "Type",
            "RPeak",
            "ZPeak",
            "PEdge",
            "PsiFlat",
            "NSurf",
            "fCrit"
         ],
         "title": "CDipoleIntStableIn",
         "type": "object"
      },
      "CDipoleStablePsiNIn": {
         "properties": {
            "Type": {
               "anyOf": [
                  {
                     "const": 7,
                     "type": "integer"
                  },
                  {
                     "const": "DipoleStablePsiN",
                     "type": "string"
                  },
                  {
                     "const": "7",
                     "type": "string"
                  }
               ],
               "title": "Type"
            },
            "PsiNPeak": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Psinpeak"
            },
            "PEdge": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Pedge"
            },
            "PsiFlat": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Psiflat"
            },
            "NSurf": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Nsurf"
            },
            "fCrit": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Fcrit"
            }
         },
         "required": [
            "Type",
            "PsiNPeak",
            "PEdge",
            "PsiFlat",
            "NSurf",
            "fCrit"
         ],
         "title": "CDipoleStablePsiNIn",
         "type": "object"
      },
      "CDipoleStdIn": {
         "properties": {
            "Type": {
               "anyOf": [
                  {
                     "const": 5,
                     "type": "integer"
                  },
                  {
                     "const": "DipoleStd",
                     "type": "string"
                  },
                  {
                     "const": "5",
                     "type": "string"
                  }
               ],
               "title": "Type"
            },
            "RPeak": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Rpeak"
            },
            "ZPeak": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Zpeak"
            },
            "PsiPeak": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Psipeak"
            },
            "PsiEdge": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Psiedge"
            },
            "PsiDipole": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Psidipole"
            },
            "PPeak": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Ppeak"
            },
            "PrExp": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Prexp"
            }
         },
         "required": [
            "Type",
            "RPeak",
            "ZPeak",
            "PsiPeak",
            "PsiEdge",
            "PsiDipole",
            "PPeak",
            "PrExp"
         ],
         "title": "CDipoleStdIn",
         "type": "object"
      },
      "CoilIn": {
         "description": "Coil input data.",
         "properties": {
            "Name": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Name"
            },
            "Enabled": {
               "anyOf": [
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": true,
               "title": "Enabled"
            },
            "InitialCurrent": {
               "title": "Initialcurrent",
               "type": "number"
            },
            "R": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "R"
            },
            "dR": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Dr"
            },
            "Z": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Z"
            },
            "dZ": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Dz"
            },
            "NumSubCoils": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Numsubcoils"
            },
            "SubCoils": {
               "anyOf": [
                  {
                     "items": {
                        "$ref": "#/$defs/SubCoilIn"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Subcoils"
            }
         },
         "required": [
            "InitialCurrent"
         ],
         "title": "CoilIn",
         "type": "object"
      },
      "LimiterIn": {
         "properties": {
            "Name": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Name"
            },
            "R1": {
               "title": "R1",
               "type": "number"
            },
            "Z1": {
               "title": "Z1",
               "type": "number"
            },
            "R2": {
               "title": "R2",
               "type": "number"
            },
            "Z2": {
               "title": "Z2",
               "type": "number"
            },
            "Enabled": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": true,
               "title": "Enabled"
            }
         },
         "required": [
            "Name",
            "R1",
            "Z1",
            "R2",
            "Z2"
         ],
         "title": "LimiterIn",
         "type": "object"
      },
      "MeasureIn": {
         "description": "Measurement input data.",
         "properties": {
            "Name": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Name"
            },
            "Type": {
               "description": "Measurement type",
               "enum": [
                  0,
                  1,
                  2,
                  3,
                  4,
                  5,
                  6,
                  7,
                  8,
                  9,
                  10,
                  11,
                  12,
                  13,
                  14,
                  15,
                  16,
                  18,
                  17,
                  19,
                  20,
                  21,
                  22,
                  23,
                  24
               ],
               "title": "MeasType",
               "type": "integer"
            }
         },
         "required": [
            "Name",
            "Type"
         ],
         "title": "MeasureIn",
         "type": "object"
      },
      "PlasmaIn": {
         "properties": {
            "B0": {
               "title": "B0",
               "type": "number"
            },
            "R0": {
               "title": "R0",
               "type": "number"
            },
            "R0B0": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "R0B0"
            },
            "Ip0": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Ip0"
            },
            "NumBndMomts": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Numbndmomts"
            },
            "NumPsiPts": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Numpsipts"
            },
            "PsiXmax": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Psixmax"
            },
            "Jedge": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Jedge"
            },
            "Model": {
               "discriminator": {
                  "mapping": {
                     "0": "#/$defs/PlasmaModelOld",
                     "1": "#/$defs/PlasmaModelOld",
                     "2": "#/$defs/PlasmaModelOld",
                     "3": "#/$defs/PlasmaModelOld",
                     "4": "#/$defs/PlasmaModelOld",
                     "5": "#/$defs/CDipoleStdIn",
                     "6": "#/$defs/CDipoleIntStableIn",
                     "7": "#/$defs/CDipoleStablePsiNIn",
                     "AnisoFlow": "#/$defs/PlasmaModelOld",
                     "AnisoNoFlow": "#/$defs/PlasmaModelOld",
                     "DipoleIntStable": "#/$defs/CDipoleIntStableIn",
                     "DipoleStablePsiN": "#/$defs/CDipoleStablePsiNIn",
                     "DipoleStd": "#/$defs/CDipoleStdIn",
                     "IsoFlow": "#/$defs/PlasmaModelOld",
                     "IsoNoFlow": "#/$defs/PlasmaModelOld",
                     "Std": "#/$defs/PlasmaModelOld"
                  },
                  "propertyName": "Type"
               },
               "oneOf": [
                  {
                     "$ref": "#/$defs/PlasmaModelOld"
                  },
                  {
                     "$ref": "#/$defs/CDipoleStdIn"
                  },
                  {
                     "$ref": "#/$defs/CDipoleIntStableIn"
                  },
                  {
                     "$ref": "#/$defs/CDipoleStablePsiNIn"
                  }
               ],
               "title": "Model"
            }
         },
         "required": [
            "B0",
            "R0",
            "Ip0",
            "NumPsiPts",
            "PsiXmax",
            "Jedge",
            "Model"
         ],
         "title": "PlasmaIn",
         "type": "object"
      },
      "PlasmaModelOld": {
         "description": "Old plasma model data. Covers the standard polynomial models.",
         "properties": {
            "Type": {
               "anyOf": [
                  {
                     "const": 0,
                     "type": "integer"
                  },
                  {
                     "const": "Std",
                     "type": "string"
                  },
                  {
                     "const": "0",
                     "type": "string"
                  },
                  {
                     "const": 1,
                     "type": "integer"
                  },
                  {
                     "const": "IsoNoFlow",
                     "type": "string"
                  },
                  {
                     "const": "1",
                     "type": "string"
                  },
                  {
                     "const": 2,
                     "type": "integer"
                  },
                  {
                     "const": "IsoFlow",
                     "type": "string"
                  },
                  {
                     "const": "2",
                     "type": "string"
                  },
                  {
                     "const": 3,
                     "type": "integer"
                  },
                  {
                     "const": "AnisoNoFlow",
                     "type": "string"
                  },
                  {
                     "const": "3",
                     "type": "string"
                  },
                  {
                     "const": 4,
                     "type": "integer"
                  },
                  {
                     "const": "AnisoFlow",
                     "type": "string"
                  },
                  {
                     "const": "4",
                     "type": "string"
                  }
               ],
               "title": "Type"
            },
            "G2pTerms": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "G2Pterms"
            },
            "HTerms": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Hterms"
            },
            "PpTerms": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Ppterms"
            },
            "RotTerms": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Rotterms"
            },
            "SisoTerms": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Sisoterms"
            },
            "SparTerms": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Sparterms"
            },
            "SperTerms": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Sperterms"
            },
            "G2p": {
               "anyOf": [
                  {
                     "items": {
                        "type": "number"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "G2P"
            },
            "H": {
               "anyOf": [
                  {
                     "items": {
                        "type": "number"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "H"
            },
            "Pp": {
               "anyOf": [
                  {
                     "items": {
                        "type": "number"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Pp"
            },
            "Rot": {
               "anyOf": [
                  {
                     "items": {
                        "type": "number"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Rot"
            },
            "Siso": {
               "anyOf": [
                  {
                     "items": {
                        "type": "number"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Siso"
            },
            "Spar": {
               "anyOf": [
                  {
                     "items": {
                        "type": "number"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Spar"
            },
            "Sper": {
               "anyOf": [
                  {
                     "items": {
                        "type": "number"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Sper"
            }
         },
         "required": [
            "Type",
            "G2pTerms",
            "HTerms",
            "PpTerms",
            "RotTerms",
            "SisoTerms",
            "SparTerms",
            "SperTerms",
            "G2p",
            "H",
            "Pp",
            "Rot",
            "Siso",
            "Spar",
            "Sper"
         ],
         "title": "PlasmaModelOld",
         "type": "object"
      },
      "PsiGridIn": {
         "properties": {
            "Nsize": {
               "default": 256,
               "title": "Nsize",
               "type": "integer"
            },
            "Rmin": {
               "title": "Rmin",
               "type": "number"
            },
            "Rmax": {
               "title": "Rmax",
               "type": "number"
            },
            "Zmin": {
               "title": "Zmin",
               "type": "number"
            },
            "Zmax": {
               "title": "Zmax",
               "type": "number"
            },
            "Symmetric": {
               "anyOf": [
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": false,
               "title": "Symmetric"
            },
            "BoundThreshold": {
               "default": 1e-06,
               "title": "Boundthreshold",
               "type": "number"
            },
            "ResThreshold": {
               "default": 1e-06,
               "title": "Resthreshold",
               "type": "number"
            },
            "UnderRelax1": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Underrelax1"
            },
            "UnderRelax2": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Underrelax2"
            }
         },
         "required": [
            "Rmin",
            "Rmax",
            "Zmin",
            "Zmax"
         ],
         "title": "PsiGridIn",
         "type": "object"
      },
      "SeparatrixIn": {
         "properties": {
            "Name": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Name"
            },
            "R1": {
               "default": 0.0,
               "title": "R1",
               "type": "number"
            },
            "Z1": {
               "title": "Z1",
               "type": "number"
            },
            "R2": {
               "default": 0.0,
               "title": "R2",
               "type": "number"
            },
            "Z2": {
               "title": "Z2",
               "type": "number"
            },
            "RC": {
               "default": 0.0,
               "title": "Rc",
               "type": "number"
            },
            "ZC": {
               "default": 0.0,
               "title": "Zc",
               "type": "number"
            },
            "Enabled": {
               "anyOf": [
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": true,
               "title": "Enabled"
            }
         },
         "required": [
            "Name",
            "Z1",
            "Z2"
         ],
         "title": "SeparatrixIn",
         "type": "object"
      },
      "ShellIn": {
         "description": "(Super) Conducting shell input.",
         "properties": {
            "Name": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Name"
            },
            "Enabled": {
               "anyOf": [
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": true,
               "title": "Enabled"
            },
            "NumSubShells": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Numsubshells"
            },
            "SubShells": {
               "items": {
                  "$ref": "#/$defs/SubShellIn"
               },
               "title": "Subshells",
               "type": "array"
            }
         },
         "required": [
            "Name",
            "NumSubShells",
            "SubShells"
         ],
         "title": "ShellIn",
         "type": "object"
      },
      "SubCoilIn": {
         "description": "Subcoil input data.",
         "properties": {
            "Name": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Name"
            },
            "Fraction": {
               "title": "Fraction",
               "type": "number"
            },
            "R": {
               "title": "R",
               "type": "number"
            },
            "Z": {
               "title": "Z",
               "type": "number"
            }
         },
         "required": [
            "Fraction",
            "R",
            "Z"
         ],
         "title": "SubCoilIn",
         "type": "object"
      },
      "SubShellIn": {
         "description": "Subshell data.",
         "properties": {
            "Name": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Name"
            },
            "Current": {
               "default": 0.0,
               "title": "Current",
               "type": "number"
            },
            "R": {
               "title": "R",
               "type": "number"
            },
            "Z": {
               "title": "Z",
               "type": "number"
            }
         },
         "required": [
            "Name",
            "R",
            "Z"
         ],
         "title": "SubShellIn",
         "type": "object"
      }
   },
   "required": [
      "PsiGrid",
      "Plasma",
      "Coils",
      "Limiters"
   ]
}

Fields:
Validators:
field Coils: list[CoilIn] [Required]
Validated by:
field FitMeasurements: bool | None = False
Validated by:
field Iname: str | None = None
Validated by:
field Info: str | None = 'DipolEQ Equilibrium'
Validated by:
field LHGreenStatus: bool | None = False
Validated by:
field LHname: str = ''
Validated by:
field Limiters: list[LimiterIn] [Required]
Validated by:
field MGname: str = ''
Validated by:
field MGreenStatus: bool | None = False
Validated by:
field MaxIterFixed: int | None = 0
Validated by:
field MaxIterFree: int | None = 50
Validated by:
field Measures: list[MeasureIn] | None = None
Validated by:
field Name: str | None = 'pyDipolEQ'
Validated by:
field NumCoils: int | None = None
Validated by:
field NumEqualEq: int | None = 0
Validated by:
field NumLimiters: int | None = None
Validated by:
field NumMeasures: int | None = None
Validated by:
field NumSeps: int | None = None
Validated by:
field NumShells: int | None = None
Validated by:
field Oname: str | None = None
Validated by:
field Plasma: PlasmaIn [Required]
Validated by:
field PsiGrid: PsiGridIn [Required]
Validated by:
field RSname: str = ''
Validated by:
field RestartStatus: bool | None = False
Validated by:
field RestartUnkns: bool | None = False
Validated by:
field Separatrices: list[SeparatrixIn] | None = None
Validated by:
field Shells: list[ShellIn] | None = None
Validated by:
field VacuumOnly: bool | None = False
Validated by:
validator check_numbers  »  all fields

check that Num* fields match the number of items in the lists :param Self: the MachineIn object

Returns:

the MachineIn object, validated

Return type:

Self

initalize_machine(m)

Initializes a Machine object from the input data

Parameters:

m (Machine)

Return type:

None

pydantic model dipoleq.input.MeasureIn

Bases: BaseModel

Measurement input data.

Parameters:

data (Any)

Show JSON schema
{
   "title": "MeasureIn",
   "description": "Measurement input data.",
   "type": "object",
   "properties": {
      "Name": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "title": "Name"
      },
      "Type": {
         "description": "Measurement type",
         "enum": [
            0,
            1,
            2,
            3,
            4,
            5,
            6,
            7,
            8,
            9,
            10,
            11,
            12,
            13,
            14,
            15,
            16,
            18,
            17,
            19,
            20,
            21,
            22,
            23,
            24
         ],
         "title": "MeasType",
         "type": "integer"
      }
   },
   "required": [
      "Name",
      "Type"
   ]
}

Fields:
field Name: str | None [Required]
field Type: MeasTypeA [Required]
Constraints:
  • __module__ = dipoleq.input

  • __doc__ = Validation annotation for pybind11 enum classes.

  • __get_pydantic_core_schema__ = <bound method PyBindEnumAnnotation.__get_pydantic_core_schema__ of <class ‘dipoleq.input.PyBindEnumAnnotation’>>

  • __orig_bases__ = (typing.Generic[~_T],)

  • __dict__ = {‘__module__’: ‘dipoleq.input’, ‘__doc__’: ‘Validation annotation for pybind11 enum classes.’, ‘__get_pydantic_core_schema__’: <classmethod(<function PyBindEnumAnnotation.__get_pydantic_core_schema__ at 0x7f2bccacef20>)>, ‘__orig_bases__’: (typing.Generic[~_T],), ‘__dict__’: <attribute ‘__dict__’ of ‘PyBindEnumAnnotation’ objects>, ‘__weakref__’: <attribute ‘__weakref__’ of ‘PyBindEnumAnnotation’ objects>, ‘__parameters__’: (~_T,)}

  • __weakref__ = <attribute ‘__weakref__’ of ‘PyBindEnumAnnotation’ objects>

  • __parameters__ = (~_T,)

do_init(meas)
Parameters:

meas (Measure)

Return type:

None

pydantic model dipoleq.input.PlasmaIn

Bases: BaseModel

Parameters:

data (Any)

Show JSON schema
{
   "title": "PlasmaIn",
   "type": "object",
   "properties": {
      "B0": {
         "title": "B0",
         "type": "number"
      },
      "R0": {
         "title": "R0",
         "type": "number"
      },
      "R0B0": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "R0B0"
      },
      "Ip0": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "title": "Ip0"
      },
      "NumBndMomts": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Numbndmomts"
      },
      "NumPsiPts": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "title": "Numpsipts"
      },
      "PsiXmax": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "title": "Psixmax"
      },
      "Jedge": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "title": "Jedge"
      },
      "Model": {
         "discriminator": {
            "mapping": {
               "0": "#/$defs/PlasmaModelOld",
               "1": "#/$defs/PlasmaModelOld",
               "2": "#/$defs/PlasmaModelOld",
               "3": "#/$defs/PlasmaModelOld",
               "4": "#/$defs/PlasmaModelOld",
               "5": "#/$defs/CDipoleStdIn",
               "6": "#/$defs/CDipoleIntStableIn",
               "7": "#/$defs/CDipoleStablePsiNIn",
               "AnisoFlow": "#/$defs/PlasmaModelOld",
               "AnisoNoFlow": "#/$defs/PlasmaModelOld",
               "DipoleIntStable": "#/$defs/CDipoleIntStableIn",
               "DipoleStablePsiN": "#/$defs/CDipoleStablePsiNIn",
               "DipoleStd": "#/$defs/CDipoleStdIn",
               "IsoFlow": "#/$defs/PlasmaModelOld",
               "IsoNoFlow": "#/$defs/PlasmaModelOld",
               "Std": "#/$defs/PlasmaModelOld"
            },
            "propertyName": "Type"
         },
         "oneOf": [
            {
               "$ref": "#/$defs/PlasmaModelOld"
            },
            {
               "$ref": "#/$defs/CDipoleStdIn"
            },
            {
               "$ref": "#/$defs/CDipoleIntStableIn"
            },
            {
               "$ref": "#/$defs/CDipoleStablePsiNIn"
            }
         ],
         "title": "Model"
      }
   },
   "$defs": {
      "CDipoleIntStableIn": {
         "properties": {
            "Type": {
               "anyOf": [
                  {
                     "const": 6,
                     "type": "integer"
                  },
                  {
                     "const": "DipoleIntStable",
                     "type": "string"
                  },
                  {
                     "const": "6",
                     "type": "string"
                  }
               ],
               "title": "Type"
            },
            "RPeak": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Rpeak"
            },
            "ZPeak": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Zpeak"
            },
            "PEdge": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Pedge"
            },
            "PsiFlat": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Psiflat"
            },
            "NSurf": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Nsurf"
            },
            "fCrit": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Fcrit"
            }
         },
         "required": [
            "Type",
            "RPeak",
            "ZPeak",
            "PEdge",
            "PsiFlat",
            "NSurf",
            "fCrit"
         ],
         "title": "CDipoleIntStableIn",
         "type": "object"
      },
      "CDipoleStablePsiNIn": {
         "properties": {
            "Type": {
               "anyOf": [
                  {
                     "const": 7,
                     "type": "integer"
                  },
                  {
                     "const": "DipoleStablePsiN",
                     "type": "string"
                  },
                  {
                     "const": "7",
                     "type": "string"
                  }
               ],
               "title": "Type"
            },
            "PsiNPeak": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Psinpeak"
            },
            "PEdge": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Pedge"
            },
            "PsiFlat": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Psiflat"
            },
            "NSurf": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Nsurf"
            },
            "fCrit": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Fcrit"
            }
         },
         "required": [
            "Type",
            "PsiNPeak",
            "PEdge",
            "PsiFlat",
            "NSurf",
            "fCrit"
         ],
         "title": "CDipoleStablePsiNIn",
         "type": "object"
      },
      "CDipoleStdIn": {
         "properties": {
            "Type": {
               "anyOf": [
                  {
                     "const": 5,
                     "type": "integer"
                  },
                  {
                     "const": "DipoleStd",
                     "type": "string"
                  },
                  {
                     "const": "5",
                     "type": "string"
                  }
               ],
               "title": "Type"
            },
            "RPeak": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Rpeak"
            },
            "ZPeak": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Zpeak"
            },
            "PsiPeak": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Psipeak"
            },
            "PsiEdge": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Psiedge"
            },
            "PsiDipole": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Psidipole"
            },
            "PPeak": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Ppeak"
            },
            "PrExp": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Prexp"
            }
         },
         "required": [
            "Type",
            "RPeak",
            "ZPeak",
            "PsiPeak",
            "PsiEdge",
            "PsiDipole",
            "PPeak",
            "PrExp"
         ],
         "title": "CDipoleStdIn",
         "type": "object"
      },
      "PlasmaModelOld": {
         "description": "Old plasma model data. Covers the standard polynomial models.",
         "properties": {
            "Type": {
               "anyOf": [
                  {
                     "const": 0,
                     "type": "integer"
                  },
                  {
                     "const": "Std",
                     "type": "string"
                  },
                  {
                     "const": "0",
                     "type": "string"
                  },
                  {
                     "const": 1,
                     "type": "integer"
                  },
                  {
                     "const": "IsoNoFlow",
                     "type": "string"
                  },
                  {
                     "const": "1",
                     "type": "string"
                  },
                  {
                     "const": 2,
                     "type": "integer"
                  },
                  {
                     "const": "IsoFlow",
                     "type": "string"
                  },
                  {
                     "const": "2",
                     "type": "string"
                  },
                  {
                     "const": 3,
                     "type": "integer"
                  },
                  {
                     "const": "AnisoNoFlow",
                     "type": "string"
                  },
                  {
                     "const": "3",
                     "type": "string"
                  },
                  {
                     "const": 4,
                     "type": "integer"
                  },
                  {
                     "const": "AnisoFlow",
                     "type": "string"
                  },
                  {
                     "const": "4",
                     "type": "string"
                  }
               ],
               "title": "Type"
            },
            "G2pTerms": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "G2Pterms"
            },
            "HTerms": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Hterms"
            },
            "PpTerms": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Ppterms"
            },
            "RotTerms": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Rotterms"
            },
            "SisoTerms": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Sisoterms"
            },
            "SparTerms": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Sparterms"
            },
            "SperTerms": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Sperterms"
            },
            "G2p": {
               "anyOf": [
                  {
                     "items": {
                        "type": "number"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "G2P"
            },
            "H": {
               "anyOf": [
                  {
                     "items": {
                        "type": "number"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "H"
            },
            "Pp": {
               "anyOf": [
                  {
                     "items": {
                        "type": "number"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Pp"
            },
            "Rot": {
               "anyOf": [
                  {
                     "items": {
                        "type": "number"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Rot"
            },
            "Siso": {
               "anyOf": [
                  {
                     "items": {
                        "type": "number"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Siso"
            },
            "Spar": {
               "anyOf": [
                  {
                     "items": {
                        "type": "number"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Spar"
            },
            "Sper": {
               "anyOf": [
                  {
                     "items": {
                        "type": "number"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Sper"
            }
         },
         "required": [
            "Type",
            "G2pTerms",
            "HTerms",
            "PpTerms",
            "RotTerms",
            "SisoTerms",
            "SparTerms",
            "SperTerms",
            "G2p",
            "H",
            "Pp",
            "Rot",
            "Siso",
            "Spar",
            "Sper"
         ],
         "title": "PlasmaModelOld",
         "type": "object"
      }
   },
   "required": [
      "B0",
      "R0",
      "Ip0",
      "NumPsiPts",
      "PsiXmax",
      "Jedge",
      "Model"
   ]
}

Fields:
field B0: float [Required]
field Ip0: float | None [Required]
field Jedge: float | None [Required]
field Model: PlasmaModel [Required]
field NumBndMomts: int | None = None
field NumPsiPts: int | None [Required]
field PsiXmax: float | None [Required]
field R0: float [Required]
field R0B0: float | None = None
do_init(pl)
Parameters:

pl (Plasma)

Return type:

None

pydantic model dipoleq.input.PlasmaModelBaseModel

Bases: BaseModel

Base class for plasma models. This is not a real model, but a base class

Parameters:

data (Any)

Show JSON schema
{
   "title": "PlasmaModelBaseModel",
   "description": "Base class for plasma models. This is not a real model, but a base class",
   "type": "object",
   "properties": {
      "Type": {
         "description": "Plasma model type",
         "enum": [
            0,
            1,
            2,
            3,
            4,
            5,
            6,
            7
         ],
         "title": "ModelType",
         "type": "integer"
      }
   },
   "required": [
      "Type"
   ]
}

Fields:
Validators:
field Type: ModelTypeA [Required]
Constraints:
  • __module__ = dipoleq.input

  • __doc__ = Validation annotation for pybind11 enum classes.

  • __get_pydantic_core_schema__ = <bound method PyBindEnumAnnotation.__get_pydantic_core_schema__ of <class ‘dipoleq.input.PyBindEnumAnnotation’>>

  • __orig_bases__ = (typing.Generic[~_T],)

  • __dict__ = {‘__module__’: ‘dipoleq.input’, ‘__doc__’: ‘Validation annotation for pybind11 enum classes.’, ‘__get_pydantic_core_schema__’: <classmethod(<function PyBindEnumAnnotation.__get_pydantic_core_schema__ at 0x7f2bccacef20>)>, ‘__orig_bases__’: (typing.Generic[~_T],), ‘__dict__’: <attribute ‘__dict__’ of ‘PyBindEnumAnnotation’ objects>, ‘__weakref__’: <attribute ‘__weakref__’ of ‘PyBindEnumAnnotation’ objects>, ‘__parameters__’: (~_T,)}

  • __weakref__ = <attribute ‘__weakref__’ of ‘PyBindEnumAnnotation’ objects>

  • __parameters__ = (~_T,)

Validated by:
validator check_model_type  »  Type
Parameters:

v (Any)

Return type:

Any

pydantic model dipoleq.input.PlasmaModelOld

Bases: PlasmaModelBaseModel

Old plasma model data. Covers the standard polynomial models.

Parameters:

data (Any)

Show JSON schema
{
   "title": "PlasmaModelOld",
   "description": "Old plasma model data. Covers the standard polynomial models.",
   "type": "object",
   "properties": {
      "Type": {
         "anyOf": [
            {
               "const": 0,
               "type": "integer"
            },
            {
               "const": "Std",
               "type": "string"
            },
            {
               "const": "0",
               "type": "string"
            },
            {
               "const": 1,
               "type": "integer"
            },
            {
               "const": "IsoNoFlow",
               "type": "string"
            },
            {
               "const": "1",
               "type": "string"
            },
            {
               "const": 2,
               "type": "integer"
            },
            {
               "const": "IsoFlow",
               "type": "string"
            },
            {
               "const": "2",
               "type": "string"
            },
            {
               "const": 3,
               "type": "integer"
            },
            {
               "const": "AnisoNoFlow",
               "type": "string"
            },
            {
               "const": "3",
               "type": "string"
            },
            {
               "const": 4,
               "type": "integer"
            },
            {
               "const": "AnisoFlow",
               "type": "string"
            },
            {
               "const": "4",
               "type": "string"
            }
         ],
         "title": "Type"
      },
      "G2pTerms": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "title": "G2Pterms"
      },
      "HTerms": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "title": "Hterms"
      },
      "PpTerms": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "title": "Ppterms"
      },
      "RotTerms": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "title": "Rotterms"
      },
      "SisoTerms": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "title": "Sisoterms"
      },
      "SparTerms": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "title": "Sparterms"
      },
      "SperTerms": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "title": "Sperterms"
      },
      "G2p": {
         "anyOf": [
            {
               "items": {
                  "type": "number"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "title": "G2P"
      },
      "H": {
         "anyOf": [
            {
               "items": {
                  "type": "number"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "title": "H"
      },
      "Pp": {
         "anyOf": [
            {
               "items": {
                  "type": "number"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "title": "Pp"
      },
      "Rot": {
         "anyOf": [
            {
               "items": {
                  "type": "number"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "title": "Rot"
      },
      "Siso": {
         "anyOf": [
            {
               "items": {
                  "type": "number"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "title": "Siso"
      },
      "Spar": {
         "anyOf": [
            {
               "items": {
                  "type": "number"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "title": "Spar"
      },
      "Sper": {
         "anyOf": [
            {
               "items": {
                  "type": "number"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "title": "Sper"
      }
   },
   "required": [
      "Type",
      "G2pTerms",
      "HTerms",
      "PpTerms",
      "RotTerms",
      "SisoTerms",
      "SparTerms",
      "SperTerms",
      "G2p",
      "H",
      "Pp",
      "Rot",
      "Siso",
      "Spar",
      "Sper"
   ]
}

Fields:
Validators:
field G2p: list[float] | None [Required]
Validated by:
field G2pTerms: int | None [Required]
Validated by:
field H: list[float] | None [Required]
Validated by:
field HTerms: int | None [Required]
Validated by:
field Pp: list[float] | None [Required]
Validated by:
field PpTerms: int | None [Required]
Validated by:
field Rot: list[float] | None [Required]
Validated by:
field RotTerms: int | None [Required]
Validated by:
field Siso: list[float] | None [Required]
Validated by:
field SisoTerms: int | None [Required]
Validated by:
field Spar: list[float] | None [Required]
Validated by:
field SparTerms: int | None [Required]
Validated by:
field Sper: list[float] | None [Required]
Validated by:
field SperTerms: int | None [Required]
Validated by:
field Type: PLASMA_BASE_MODEL_TYPES [Required]
Validated by:
validator check_model_type  »  Type
Parameters:

v (Any)

Return type:

Any

validator check_old_plasma_model  »  all fields

Check for validation of the old plasma model data.

Return type:

Self

do_init(pm)

Initialize the plasma model with the input data.

Parameters:

pm (Plasma)

Return type:

None

pydantic model dipoleq.input.PsiGridIn

Bases: BaseModel

Parameters:

data (Any)

Show JSON schema
{
   "title": "PsiGridIn",
   "type": "object",
   "properties": {
      "Nsize": {
         "default": 256,
         "title": "Nsize",
         "type": "integer"
      },
      "Rmin": {
         "title": "Rmin",
         "type": "number"
      },
      "Rmax": {
         "title": "Rmax",
         "type": "number"
      },
      "Zmin": {
         "title": "Zmin",
         "type": "number"
      },
      "Zmax": {
         "title": "Zmax",
         "type": "number"
      },
      "Symmetric": {
         "anyOf": [
            {
               "type": "boolean"
            },
            {
               "type": "null"
            }
         ],
         "default": false,
         "title": "Symmetric"
      },
      "BoundThreshold": {
         "default": 1e-06,
         "title": "Boundthreshold",
         "type": "number"
      },
      "ResThreshold": {
         "default": 1e-06,
         "title": "Resthreshold",
         "type": "number"
      },
      "UnderRelax1": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Underrelax1"
      },
      "UnderRelax2": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Underrelax2"
      }
   },
   "required": [
      "Rmin",
      "Rmax",
      "Zmin",
      "Zmax"
   ]
}

Fields:
field BoundThreshold: float = 1e-06
field Nsize: int = 256
field ResThreshold: float = 1e-06
field Rmax: float [Required]
field Rmin: float [Required]
field Symmetric: bool | None = False
field UnderRelax1: float | None = None
field UnderRelax2: float | None = None
field Zmax: float [Required]
field Zmin: float [Required]
do_init(pg)
Parameters:

pg (PsiGrid)

Return type:

None

class dipoleq.input.PyBindEnumAnnotation

Bases: Generic[_T]

Validation annotation for pybind11 enum classes.

pydantic model dipoleq.input.SeparatrixIn

Bases: BaseModel

Parameters:

data (Any)

Show JSON schema
{
   "title": "SeparatrixIn",
   "type": "object",
   "properties": {
      "Name": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "title": "Name"
      },
      "R1": {
         "default": 0.0,
         "title": "R1",
         "type": "number"
      },
      "Z1": {
         "title": "Z1",
         "type": "number"
      },
      "R2": {
         "default": 0.0,
         "title": "R2",
         "type": "number"
      },
      "Z2": {
         "title": "Z2",
         "type": "number"
      },
      "RC": {
         "default": 0.0,
         "title": "Rc",
         "type": "number"
      },
      "ZC": {
         "default": 0.0,
         "title": "Zc",
         "type": "number"
      },
      "Enabled": {
         "anyOf": [
            {
               "type": "boolean"
            },
            {
               "type": "null"
            }
         ],
         "default": true,
         "title": "Enabled"
      }
   },
   "required": [
      "Name",
      "Z1",
      "Z2"
   ]
}

Fields:
field Enabled: bool | None = True
field Name: str | None [Required]
field R1: float = 0.0
field R2: float = 0.0
field RC: float = 0.0
field Z1: float [Required]
field Z2: float [Required]
field ZC: float = 0.0
do_init(sep)
Parameters:

sep (Separatrix)

Return type:

None

pydantic model dipoleq.input.ShellIn

Bases: BaseModel

(Super) Conducting shell input.

Parameters:

data (Any)

Show JSON schema
{
   "title": "ShellIn",
   "description": "(Super) Conducting shell input.",
   "type": "object",
   "properties": {
      "Name": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "title": "Name"
      },
      "Enabled": {
         "anyOf": [
            {
               "type": "boolean"
            },
            {
               "type": "null"
            }
         ],
         "default": true,
         "title": "Enabled"
      },
      "NumSubShells": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "title": "Numsubshells"
      },
      "SubShells": {
         "items": {
            "$ref": "#/$defs/SubShellIn"
         },
         "title": "Subshells",
         "type": "array"
      }
   },
   "$defs": {
      "SubShellIn": {
         "description": "Subshell data.",
         "properties": {
            "Name": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Name"
            },
            "Current": {
               "default": 0.0,
               "title": "Current",
               "type": "number"
            },
            "R": {
               "title": "R",
               "type": "number"
            },
            "Z": {
               "title": "Z",
               "type": "number"
            }
         },
         "required": [
            "Name",
            "R",
            "Z"
         ],
         "title": "SubShellIn",
         "type": "object"
      }
   },
   "required": [
      "Name",
      "NumSubShells",
      "SubShells"
   ]
}

Fields:
field Enabled: bool | None = True
field Name: str | None [Required]
field NumSubShells: int | None [Required]
field SubShells: list[SubShellIn] [Required]
do_init(shell)
Parameters:

shell (Shell)

Return type:

None

pydantic model dipoleq.input.SubCoilIn

Bases: BaseModel

Subcoil input data.

Parameters:

data (Any)

Show JSON schema
{
   "title": "SubCoilIn",
   "description": "Subcoil input data.",
   "type": "object",
   "properties": {
      "Name": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Name"
      },
      "Fraction": {
         "title": "Fraction",
         "type": "number"
      },
      "R": {
         "title": "R",
         "type": "number"
      },
      "Z": {
         "title": "Z",
         "type": "number"
      }
   },
   "required": [
      "Fraction",
      "R",
      "Z"
   ]
}

Fields:
field Fraction: float [Required]
field Name: str | None = None
field R: float [Required]
field Z: float [Required]
do_init(scoil)
Parameters:

scoil (SubCoil)

Return type:

None

pydantic model dipoleq.input.SubShellIn

Bases: BaseModel

Subshell data.

Parameters:

data (Any)

Show JSON schema
{
   "title": "SubShellIn",
   "description": "Subshell data.",
   "type": "object",
   "properties": {
      "Name": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "title": "Name"
      },
      "Current": {
         "default": 0.0,
         "title": "Current",
         "type": "number"
      },
      "R": {
         "title": "R",
         "type": "number"
      },
      "Z": {
         "title": "Z",
         "type": "number"
      }
   },
   "required": [
      "Name",
      "R",
      "Z"
   ]
}

Fields:
field Current: float = 0.0
field Name: str | None [Required]
field R: float [Required]
field Z: float [Required]
do_init(sshell)
Parameters:

sshell (SubShell)

Return type:

None

dipoleq.input.model_type_literals(mts)

make a list of literals for the model types both name and value

Parameters:

mts (list[ModelType])

Return type:

TypeAlias