def _labels_to_state(scan_label, compscan_label):
    """Use scan and compscan labels to derive basic state of antenna."""
    if not scan_label or scan_label == 'slew':
        return 'slew'
    if scan_label == 'cal':
        return 'track'
    return 'track' if compscan_label == 'track' else 'scan'