metadata module
Helper functions to parse sources of truth metadata from telmodel.
- class aiv_utils.metadata.FibreMapping(sb, fem, has_antenna, fem_sn, tail, fibre, tpm, masked)
A dataclass to represent a mapping of a fibre to a TPM.
- aiv_utils.metadata.get_antenna_locations(station)
Return the antenna locations for a given station.
- aiv_utils.metadata.get_static_delays_from_file(station_name, static_delays_file)
Returns static delays in SpsStation ordering for the given station and file.
- aiv_utils.metadata.get_station_location(station)
Return the station location (lat, long and elevation) for a given station.
- aiv_utils.metadata.get_station_preadu_attenuations(station, default_atten=20.0)
Fetch platform spec station preadu attenuation values.
- aiv_utils.metadata.get_station_rotation(station)
Return the station rotation for a given station.
- aiv_utils.metadata.get_station_static_delays(station)
Fetch platform spec file for given station and return static delays per TPM.
- aiv_utils.metadata.load_tmdata(*args, **kwargs)
Wrap TMData with backoff to handle flaky networks.
Arguments are as for TMData.__init__().
- Return type:
- Returns:
A TMData object.
- aiv_utils.metadata.parse_platform_spec(station_name)
Parse the platform spec file and return a list of FibreMapping objects.
- aiv_utils.metadata.parse_tsv(tsv_path)
Parse a TSV file and return a list of FibreMapping objects.
- aiv_utils.metadata.smartbox_ports_masked(station)
Returns a list of lists indicating which ports should be disabled for each smartbox.
This takes into account both the “masked” flag in the station spec, and the fact that not all ports have an antenna connected to them.
- aiv_utils.metadata.station_id_from_label(station_label)
Returns the station ID for a given station label.
- Return type: