get_filename#

VSPEC.helpers.get_filename(N: int, n_zfill: int, ext: str)#

Get the filename that a PSG output is written to. This function unifies all of the filename handling to a single piece of code.

Parameters:
  • N (int) – The ‘phase number’ of the file. Represents the iteration of the simulation.

  • n_zfill (int) – The zfill() convention to use for zero-padding the phase number.

  • ext (str) – The file extension, such as '.rad' for rad files.

Returns:

The filename

Return type:

str

Warns:

RuntimeWarning – If N has more digits than n_zfill can accommodate.