edges.io.ants11

Functions for dealing with antenna S11 files.

edges.io.ants11.get_antenna_s11_paths(s11_path: str | Path | tuple | list, time: Time | datetime | None = None, fileglob: str = '*_input*.s1p', dateformat: str = '%Y_%j_%H', date_slice: slice = slice(None, None, None), ignore_files=None)[source]

Given an s11_path, return list of paths for each of the four standards.

In general, the antenna S11 is defined – like all calibration loads – by four calkit readings (short open load external). This function finds the four files associated with these readings in a unified interface. One of several modes can be used:

  1. s11_path is a list of four files. In this case, the four files are simply returned.

  2. s11_path is a glob pattern with a format-specified “{load}” in it. In this case, the pattern will be searched, with “{load}” replaced by ?. This must result in 4 files.

  3. s11_path is a directory, in which case the directory will be searched for all files matching the fileglob, and each will be parsed for a datetime using the dateformat specifier. The four files with matching times closest to time will be returned.

  4. s11_path is a single file whose suffix is not .s1p. In this case, a list of just that file will be returned, under the assumption that the file represents a pre-calibrated S11.