helper module
Define some common helpers for loading data.
- read_header(filepath: str | Path, sep: str = '\t', comment: str = '#') tuple[list[str], int]
Get the line describing columns content.
It is the first line of the files that does not start with a comment character. Header of first column can be anything. Header of following columns must hold incidence angle and be convertable to a float.
- Parameters:
filepath – Path to file holding data under study.
sep – Column delimiter.
comment – Comment character.
- Returns:
list[str] – Columns descriptors. First column is
Energy [eV]. Following is/aretheta [deg], wherethetais the value of the incidence angle.int – Number of comment lines before the header.