The script GWAlpha_GPS.py uses a function where output file names are generated partly randomly. Subsequently, output is written to these files without checking whether the file already exists. This can silently overwrite existing files, which is undesirable behavior. If a unique name needs to be generated, a better option is to use one of the facilities in the built-in tempfile library.
(Other unique file naming algorithms can also be conceived (e.g. the epoch time plus an autoincrementing suffix while this thing already exists) but most of these suffer from possible race conditions.)
The script GWAlpha_GPS.py uses a function where output file names are generated partly randomly. Subsequently, output is written to these files without checking whether the file already exists. This can silently overwrite existing files, which is undesirable behavior. If a unique name needs to be generated, a better option is to use one of the facilities in the built-in
tempfilelibrary.(Other unique file naming algorithms can also be conceived (e.g. the epoch time plus an autoincrementing suffix while this thing already exists) but most of these suffer from possible race conditions.)