pytrip.utils.gd2dat module

Reads .gd files and can convert them into (xmgrace readable) ascii data.

Can be used in the command line

Mandatory arguments: Name Type Default Description filename STRING “” File name of .gd file, should be first.

Optional arguments: Name Type Default Description exp STRING “exp” if “exp”: Export data of .gd into a .dat file agr STRING “” if “agr”: Export data of .gd into a .agr file LET STRING “LET” if “LET”: Export also data entitled “DoseLET”

Example: 1) reading the file foo.gd and exporting it as ascii file foo.dat python gd2dat.py foo.gd

2) reading the file foo.gd and exporting it as xmgrace file foo.agr python gd2dat.py foo.gd agr

class pytrip.utils.gd2dat.ReadGd(gd_filename, exp=False, agr=False, let=False)[source]

Bases: object

This class reads .gd files.

export(out_file_name=None)[source]

Export data to out_file_name :params str out_file_name: full path to output file including file extension

read()[source]

Reads the filename set when constructing the ReadGd class

pytrip.utils.gd2dat.main(args=['-T', '-E', '-b', 'readthedocs', '-d', '_build/doctrees-readthedocs', '-D', 'language=en', '.', '_build/html'])[source]