get_id_to_intent_fn¶
- get_id_to_intent_fn(id_to_intent: dict[str, dict[int, str]]) Callable[source]¶
Return a function that can convert intent IDs to a string intent.
Takes a dict of dicts, first key mapping measurement set name and second key mapping numeric intent ID to string intent for that MS, e.g.
{'a.ms': {0: 'PHASE', 1: 'BANDPASS'}
- Parameters:
id_to_intent -- Dictionary mapping vis to a dictionary of intent ID: string intent.
- Returns:
Function that converts given intent IDs for given MS to set of intents.