pint.toa.read_toa_file

pint.toa.read_toa_file(filename, process_includes=True, cdict=None, dir=None)[source]

Read TOAs from the given filename into a list.

Will process INCLUDEd files unless process_includes is False.

Parameters:
  • filename (str or file-like object) – The name of the file to open, or an open file to read from.

  • process_includes (bool, optional) – If true, obey INCLUDE directives in the file and read other files.

  • top (bool, optional) – If true, wipe this instance’s contents, otherwise append new TOAs. Used recursively; note that surprises may ensue if this function is called on an already existing and processed TOAs object.

  • dir (str or Path) – This is the directory where the TOA file is found. INCLUDE statements are relative to this directory. If None, it is assumed to be the directory part of filename, if that is a path rather than a file-like object. If None and filename is a file-like object, the directory is assumed to be the current directory.