(log, start_time)
return info
Parse logs in the format from monitor.py

    Args:
        log        : String containing the logged line.
        start_time : Log file's starting time.

    Returns:
        Dictionary with the receiver metrics.
Parse logs in the format from monitor.py
Parse logs in the format from monitor . py
def _parse(log, start_time):
    """Parse logs in the format from monitor.py

    Args:
        log        : String containing the logged line.
        start_time : Log file's starting time.

    Returns:
        Dictionary with the receiver metrics.

    """
    log_time = _get_time(log)
    info = {'date': log_time, 'time': (log_time - start_time).total_seconds()}
    for entry in log[19:-1].split(";"):
        key, val = entry.split("=")
        key = key.strip()
        val = val.strip()

        if (key == "Lock"):
            val = "Locked" if val == "True" else "Unlocked"  # categorial plot
        elif (key == "Level" or key == "SNR"):
            unit = re.sub('[0-9.-]', '', val)
            val = val.replace(unit, '')
            # The logs from the S400 could return NaN, in which case "val" is
            # empty here. Skip these values.
            if (val == ''):
                continue
            val = float(val)
        elif (key == "BER" or key == "Packet Errors"):
            val = float(val)
        else:
            raise ValueError("Unknown key")

        info[key] = val

    return info
def _parse ( log , start_time ) : log_time = _get_time ( log ) info = { 'date' : log_time , 'time' : ( log_time - start_time ) . total_seconds ( ) } for entry in log [ 19 : - 1 ] . split ( ";" ) : key , val = entry . split ( "=" ) key = key . strip ( ) val = val . strip ( ) if ( key == "Lock" ) : val = "Locked" if val == "True" else "Unlocked" # categorial plot elif ( key == "Level" or key == "SNR" ) : unit = re . sub ( '[0-9.-]' , '' , val ) val = val . replace ( unit , '' ) # The logs from the S400 could return NaN, in which case "val" is # empty here. Skip these values. if ( val == '' ) : continue val = float ( val ) elif ( key == "BER" or key == "Packet Errors" ) : val = float ( val ) else : raise ValueError ( "Unknown key" ) info [ key ] = val return info