Skip to content

Project JSON Schema

The editor JSON is the central data format in YAPTIDE. The UI produces it, the converter consumes it, and the backend stores it. Understanding this schema is essential for working on any part of the system.

{
"project": { ... },
"beam": { ... },
"figureManager": { "figures": [ ... ] },
"zoneManager": { "zones": [ ... ], "worldZone": { ... } },
"materialManager": { "materials": [ ... ] },
"detectorManager": { "detectors": [ ... ] },
"scoringManager": { "outputs": [ ... ], "filters": [ ... ] },
"physic": { ... },
"specialComponentsManager": { ... }
}

Metadata about the simulation.

{
"project": {
"title": "My Simulation"
}
}

Particle source configuration.

FieldTypeDescription
idnumberParticle type ID (see SHIELD-HIT12A particle table)
energynumberKinetic energy
energyUnitstring"MeV" or "MeV/nucl"
energySpreadnumberEnergy spread (standard deviation)
numberOfParticlesnumberTotal primaries to simulate
position{x, y, z}Source position in cm
direction{x, y, z}Beam direction unit vector
sigma{x, y}Gaussian beam profile sigma
sad{x, y}Source-to-axis distance (for divergent beams)
sourceFileobject | nullExternal source definition file
{
"beam": {
"id": 2,
"energy": 150.0,
"energyUnit": "MeV",
"energySpread": 1.5,
"numberOfParticles": 10000,
"position": { "x": 0, "y": 0, "z": 0 },
"direction": { "x": 0, "y": 0, "z": 1 },
"sigma": { "x": 0.1, "y": 0.1 },
"sad": { "x": 0, "y": 0 }
}
}

3D geometric primitives. Each figure represents a solid shape in the scene.

FieldTypeDescription
typestring"BoxFigure", "CylinderFigure", or "SphereFigure"
namestringDisplay name
uuidstringUnique identifier
position{x, y, z}Center position in cm
rotation{x, y, z}Tait-Bryan rotation angles in radians
parametersobjectShape-specific dimensions

Box parameters: { xLength, yLength, zLength } (half-lengths in cm)

Cylinder parameters: { radius, height } (in cm, along Z-axis)

Sphere parameters: { radius } (in cm)

{
"type": "BoxFigure",
"name": "WaterPhantom",
"uuid": "abc-123",
"position": { "x": 0, "y": 0, "z": 15 },
"rotation": { "x": 0, "y": 0, "z": 0 },
"parameters": { "xLength": 10, "yLength": 10, "zLength": 20 }
}

CSG (Constructive Solid Geometry) zones define regions of space by combining figures through boolean operations. Each zone is assigned a material.

FieldTypeDescription
uuidstringUnique identifier
namestringDisplay name
materialUuidstringReference to a material in materialManager
unionOperationsarrayList of figure UUIDs included (union)
intersectionOperationsarrayList of figure UUIDs used for intersection
subtractionOperationsarrayList of figure UUIDs subtracted

The bounding world volume. Everything outside is treated as vacuum or a “black hole” (absorbing boundary).

{
"worldZone": {
"uuid": "world-001",
"figure": {
"type": "BoxFigure",
"parameters": { "xLength": 50, "yLength": 50, "zLength": 50 }
},
"materialUuid": "vacuum-uuid"
}
}

Material definitions based on ICRU identifiers.

FieldTypeDescription
uuidstringUnique identifier
namestringDisplay name (e.g., “Water”, “Air”, “Bone”)
icrunumberICRU material number
densitynumberOverride density (optional)
{
"uuid": "mat-001",
"name": "Water",
"icru": 276,
"density": 1.0
}

Scoring detector geometries. Detectors define where quantities are scored.

FieldTypeDescription
uuidstringUnique identifier
typestring"Cylinder", "Mesh", "Zone", or "All"
namestringDisplay name
geometryDataobjectType-specific geometry definition

Cylinder detector (cylindrical scoring mesh):

{
"type": "Cylinder",
"geometryData": {
"position": { "x": 0, "y": 0, "z": 15 },
"radius": { "min": 0, "max": 5, "bins": 1 },
"zAxis": { "min": 0, "max": 30, "bins": 300 }
}
}

Mesh detector (rectangular scoring grid):

{
"type": "Mesh",
"geometryData": {
"position": { "x": 0, "y": 0, "z": 15 },
"xAxis": { "min": -5, "max": 5, "bins": 100 },
"yAxis": { "min": -5, "max": 5, "bins": 100 },
"zAxis": { "min": 0, "max": 30, "bins": 1 }
}
}

Defines what quantities are scored and how results are filtered.

Each output links a detector to a set of quantities.

FieldTypeDescription
namestringOutput filename
detectorUuidstringReference to a detector
quantitiesarrayList of scored quantities
FieldTypeDescription
typestringQuantity keyword (e.g., "Dose", "Fluence", "LET", "dLET")
filterUuidstring | nullOptional reference to a particle filter
rescalenumberRescaling factor

Particle filters for conditional scoring.

FieldTypeDescription
uuidstringUnique identifier
namestringDisplay name
particleIdnumberParticle type ID to filter for
rulesarrayFilter rules (e.g., energy range, angular cuts)

Physics model configuration.

FieldTypeDescription
energyLossnumberEnergy loss model selection
nuclearReactionsnumberNuclear reactions toggle (-1 = off, 1 = on)
stragglingnumberStraggling model
multipleScatteringnumberMultiple scattering model
stoppingPowerFileobject | nullCustom stopping power file
stepLengthnumberMaximum step length (cm)

Optional special components such as beam modulators (SOBP wheel definitions) and CT data cubes.

{
"specialComponentsManager": {
"modulatorConfig": {
"enabled": true,
"fileName": "modulator.dat",
"zones": [ ... ]
}
}
}

The editor JSON format is versioned. The metadata.version field tracks the schema version. The UI handles backward compatibility for older project files by migrating them on load.