basedata

Functions for loading and managing machine base data used in dose calculation.

matRad_loadMachine(pln)
matRad_loadMachine load a machine base data file from pln struct.

Looks for the machine file from pln in the basedata folder and in the provided user folders.

call

machine = matRad_loadMachine(pln)

Input:

pln – matRad plan meta information struct

Output:

machine – matRad machine struct

References


Copyright 2022-2026 the matRad development team.

This file is part of the matRad project. It is subject to the license terms in the LICENSE file found in the top-level directory of this distribution and at https://github.com/e0404/matRad/LICENSE.md. No part of the matRad project, including this file, may be copied, modified, propagated, or distributed except according to the terms contained in the LICENSE file.


class matRad_MCemittanceBaseData(machine, stf)

matRad_MCemmitanceBaseData This is the superclass for MonteCarlo base data calculation

References


Copyright 2020-2026 the matRad development team.

This file is part of the matRad project. It is subject to the license terms in the LICENSE file found in the top-level directory of this distribution and at https://github.com/e0404/matRad/LICENSE.md. No part of the matRad project, including this file, may be copied, modified, propagated, or distributed except according to the terms contained in the LICENSE file.


matRad_MCsquareBaseData construct an instance of the MCsquare Base data format using a focus index

Property Summary
machine

matRad base data machine struct

bdl_path = ''

stores path to generated file

nozzleToIso

Nozzle to Isocenter Distance

smx

Scanning magnet X to isocenter Distance

smy

Scanning magnet y to isocenter Distance

monteCarloData

MC Phase space data struct

selectedFocus

array containing selected focus indices per energy

defaultRelativeEnergySpread = 0

default energy spread

matRad_cfg

matRad config

rangeShifters

Stores range shifters

fitWithSpotSizeAirCorrection = true

air correction in beam optics approximation

fitCorrectDoubleGaussian = true
forceSpectrumApproximation = false

To force the phase space approximation even if we have the data

forceEmittanceApproximation = false
forceFixedMU = true
stfCompressed

measure whether function has additional info about

problemSigma

the stf

energyIndex

Indices of calculated energies

Method Summary
fitPhaseSpaceForEnergy(energyIx)

function to calculate mean energy and energy spread used by mcSquare for given energy

fitBeamOpticsForEnergy(energyIx, focusIndex)

function to calculate beam optics used by mcSquare for given energy

saveMatradMachine(name)

save previously calculated monteCarloData in new baseData file with given name

getRangeShiftersFromStf(stf)
static spotSizeAirCorrection(radiationMode, E, d, sigma, method)

performs a rudimentary correction for additional scattering in air not considered by the courant snyder equation

matRad_getAvailableMachines(modalities)
matRad_loadMachine load a machine base data file from pln struct.

Looks for the machine fileuct. in the basedata folder and in the provided user folders.

call

machine = matRad_loadMachine(pln)

Input:

pln – matRad plan meta information struct

Output:

machine – matRad machine struct

References


Copyright 2024-2026 the matRad development team.

This file is part of the matRad project. It is subject to the license terms in the LICENSE file found in the top-level directory of this distribution and at https://github.com/e0404/matRad/LICENSE.md. No part of the matRad project, including this file, may be copied, modified, propagated, or distributed except according to the terms contained in the LICENSE file.