matRad additional Info - e0404/matRad GitHub Wiki
Always use white spaces before and after the "=" sign upon assigning new values to variables, e.g.
thisIsA = validAssignment;
matRad variable names start with a lower case letter. Concatenated variable names indicate a new word by an upper case letter e.g.
newVariableName = 42;
At some points there are issues with relative paths to matRad files which are annoying (e.g. within the unit testing). The problems occur when you run certain matRad functionality and are currently not in the matRad root directory. To avoid this, we should make sure, that
- all references to files should be absolute paths, which are created at runtime through locating the file that is executing the code (e.g. via
mfilename('fullpath')
). Alternatively,which
could be used. - if something needs to be executed within a directory, also use the absolute path to
cd
into the directory. But before, usepwd
to get the users directory and after the executioncd
back into it.