TG43
Class defining the TG43 simulation based on the selected brachy seed
Source code in pygrpm/tg43/seed.py
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 |
|
__init__(dirname)
Construct a TG43 source object.
The two top level functions are line
and point
that implement the
line-formalism and point-formalism TG43.
Some sources are already defined in the sources.py file. A new source can be initialized with the datafile, the source length and the dose rate constant.
dirname
: the datafile directory name
Source code in pygrpm/tg43/seed.py
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 |
|
dose(r, theta)
Returns the dose for each given point. If multiple points of r and theta are provided all cross values wil be returned.
:param Union[Sequence, float] r: A sequence or scalar of radius values :param Union[Sequence, float] theta: A sequence or scalar of angle values
:return DataArray: A DataArray of doses for each provided points
Source code in pygrpm/tg43/seed.py
155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 |
|
get_F(array, R)
Obtain the Anisotropic function in terms of angles for a given radius R. Values are normalized by F(r, theta=90) :param DataArray array: DataArray representing the dosimetric grid, such as that obtained from Seed.grid() :param float R: Radius value for the anisotropic function :return DataArray: Anisotropic function in terms of theta (0 to 180)
Source code in pygrpm/tg43/seed.py
305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 |
|
get_calibration(array, significant_figures=5)
Returns the calibration factor based on internal or provided Lambda values. Function returns Lambda divided by the mean value of array at r=1 to the specified amount of significant figures :param DataArray array: DataArray representing the dosimetric grid, such as that obtained from Seed.grid() :param float significant_figures: Desired significant figures for returned value :return float: The calibration factor to apply to the provided grid
Source code in pygrpm/tg43/seed.py
327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 |
|
get_cv(array)
For a given dosimetric grid, obtain an array of coefficients of variation values along the radius :param DataArray array: DataArray representing the dosimetric grid, such as that obtained from Seed.grid() :return DataArray: Standard deviation of dose value for values of radius
Source code in pygrpm/tg43/seed.py
268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 |
|
get_gL(array)
For a given dosimetric grid, obtain an array of Geometry function (for line source) values along the radius :param DataArray array: DataArray representing the dosimetric grid, such as that obtained from Seed.grid() :return DataArray: Standard deviation of dose value for values of radius
Source code in pygrpm/tg43/seed.py
287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 |
|
get_mean(array)
For a given dosimetric grid, obtain an array of mean values along the radius :param DataArray array: DataArray representing the dosimetric grid, such as that obtained from Seed.grid() :return DataArray: Mean dose value for values of radius
Source code in pygrpm/tg43/seed.py
236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 |
|
get_std(array)
For a given dosimetric grid, obtain an array of standard deviation values along the radius :param DataArray array: DataArray representing the dosimetric grid, such as that obtained from Seed.grid() :return DataArray: Standard deviation of dose value for values of radius
Source code in pygrpm/tg43/seed.py
252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 |
|
grid(boxmin=-10, boxmax=10, voxsize=0.1, sourcepos=0, orientation=(0, 0, 1))
Method to compute a 3D dosimetric grid for this brachy seed
:param Union[Sequence, float] boxmin: Minimum coordinate value (along all axes) of the container box :param Union[Sequence, float] boxmax: Maximum coordinate value (along all axes) of the container box :param float voxsize: Voxel size of the container box :param Union[Sequence, float] sourcepos: Position of the source within the container box :param Sequence orientation: Sequence of float detailing source orientation in the box
:return DataArray: A dataArray with the 3D dosimetric grid information
Source code in pygrpm/tg43/seed.py
175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 |
|