addstats2img

xpolbeamline.sitkconverter.addstats2img(filename, statfile, rename=True)[source]

Update header information in a fits image from the stats file

Parameters:

filename : string

Filename (incl path if not in the current working directory)

statfile : string or None

Path and filename to a stats file or path to a directory of statsfiles. In the second case, this function will look for a file following the naming convention stats_MM_DD_YY.txt in the given directory. If such a file does not exist, all files with names starting with stats_ will be searched for overlap with the exposure.

rename : bool

If true “_NoStats” is removed from the filename.