File indexing completed on 2026-05-27 07:24:18
0001
0002
0003
0004
0005
0006
0007
0008
0009 """Schema of a homogeneous material file"""
0010
0011 homogeneous_material_schema = {
0012 "type": "object",
0013 "properties": {
0014 "header": {
0015 "type": "object",
0016 "description": "File header section with important IO metadata",
0017 "properties": {
0018 "common": {
0019 "type": "object",
0020 "description": "General metadata",
0021 "properties": {
0022 "version": {
0023 "type": "string",
0024 "description": "detray version this file was created with",
0025 },
0026 "detector": {
0027 "type": "string",
0028 "description": "Name of the detector",
0029 },
0030 "date": {
0031 "type": "string",
0032 "description": "Time stamp (file creation)",
0033 },
0034 "tag": {
0035 "type": "string",
0036 "description": "Type of data",
0037 "enum": ["homogeneous_material"],
0038 },
0039 },
0040 "required": ["version", "detector", "tag"],
0041 },
0042 "slab_count": {
0043 "type": "integer",
0044 "description": "Number of material slabs in the detector",
0045 "minimum": 0,
0046 },
0047 "rod_count": {
0048 "type": "integer",
0049 "description": "Number of material rods in the detector",
0050 "minimum": 0,
0051 },
0052 },
0053 "required": ["common"],
0054 },
0055 "data": {
0056 "type": "object",
0057 "description": "Homogeneous material data (volume-by-volume)",
0058 "properties": {
0059 "volumes": {
0060 "type": "array",
0061 "minitems": 1,
0062 "items": {
0063 "type": "object",
0064 "description": "Material data of a single volume",
0065 "properties": {
0066 "volume_link": {
0067 "type": "integer",
0068 "description": "The volume index",
0069 },
0070 "material_slabs": {
0071 "type": "array",
0072 "minitems": 1,
0073 "items": {
0074 "type": "object",
0075 "description": "The material slab",
0076 "properties": {
0077 "type": {
0078 "type": "integer",
0079 "description": "Material type ID",
0080 "enum": [5],
0081 },
0082 "surface_idx": {
0083 "type": "integer",
0084 "description": "Volume-local index of the surface the slab belongs to",
0085 "minimum": 0,
0086 },
0087 "thickness": {
0088 "type": "number",
0089 "description": "Thickness of the slab",
0090 "minimum": 0,
0091 },
0092 "index_in_coll": {
0093 "type": "integer",
0094 "description": "Volume-local sorting index",
0095 "minimum": 0,
0096 },
0097 "material": {
0098 "type": "object",
0099 "properties": {
0100 "params": {
0101 "type": "array",
0102 "description": "Material parameters",
0103 "minitems": 7,
0104 "maxItems": 7,
0105 "items": {"type": "number"},
0106 }
0107 },
0108 "required": ["params"],
0109 },
0110 },
0111 "required": [
0112 "type",
0113 "surface_idx",
0114 "thickness",
0115 "material",
0116 ],
0117 },
0118 },
0119 "material_rods": {
0120 "type": "array",
0121 "minitems": 1,
0122 "items": {
0123 "type": "object",
0124 "description": "The material rods",
0125 "properties": {
0126 "type": {
0127 "type": "integer",
0128 "description": "Material type ID",
0129 "enum": [6],
0130 },
0131 "surface_idx": {
0132 "type": "integer",
0133 "description": "Volume-local index of the surface the slab belongs to",
0134 "minimum": 0,
0135 },
0136 "thickness": {
0137 "type": "number",
0138 "description": "Radius of the rod",
0139 "minimum": 0,
0140 },
0141 "index_in_coll": {
0142 "type": "integer",
0143 "description": "Volume-local sorting index",
0144 "minimum": 0,
0145 },
0146 "material": {
0147 "type": "object",
0148 "properties": {
0149 "params": {
0150 "type": "array",
0151 "description": "Material parameters",
0152 "minitems": 7,
0153 "maxItems": 7,
0154 "items": {"type": "number"},
0155 }
0156 },
0157 "required": ["params"],
0158 },
0159 },
0160 "required": [
0161 "type",
0162 "surface_idx",
0163 "thickness",
0164 "material",
0165 ],
0166 },
0167 },
0168 },
0169 "required": ["volume_link", "material_slabs"],
0170 },
0171 }
0172 },
0173 "required": ["volumes"],
0174 },
0175 },
0176 "required": ["header", "data"],
0177 }