def main(argv): parser = argparse.ArgumentParser( description= 'spectrum analyser emulation based on RTCE log file playback. Creates a series of png' ) parser.add_argument('-p', '--path', help='path to sbc_rtce_monitor.csv', required=False) parser.add_argument('-c', '--columns', help='path to sbc_rtce_monitor.headers', required=False) parser.add_argument('-b', '--beginTime', help='begin time eg 2018-01-15T11:23:59', required=False) parser.add_argument('-e', '--endTime', help='end time eg 2018-01-15T12:23:59', required=False) args = vars(parser.parse_args()) path = args['path'] header_path = args['columns'] startDateTime = args['beginTime'] stopDateTime = args['endTime'] if path is None: path = "./sbc_rtce_monitor.csv" if header_path is None: header_path = "../tests/sbc_rtce_monitor.headers" if startDateTime is None: startDateTime = "1977-06-02T13:45:30" if stopDateTime is None: stopDateTime = "2200-06-15T13:45:30" df = rtce.load_rtce_log(rtce_path=path, rtce_header_path=header_path) df.pipe(rtce.plot_spectrum, startDateTime, stopDateTime)
def main(argv): parser = argparse.ArgumentParser(description='get overview of logon attempts for terminals') parser.add_argument('-p','--path', help='path to sbc_rtce_monitor.csv', required=False) parser.add_argument('-c','--columns', help='path to sbc_rtce_monitor.headers', required=False) args = vars(parser.parse_args()) path = args['path'] header_path = args['columns'] if path is None: path="./sbc_rtce_monitor.csv" if header_path is None: header_path="../tests/sbc_rtce_monitor.headers" df = rtce.load_rtce_log(path, header_path) # filter to display terminals only when they are logging on df = df.pipe(rtce.filter_loggingon) df = df.reset_index() # print the logon attempts vs time, for all terminal id's df.pipe(hrc.plot_str_utc_sof,'name') id_list = df['id'].unique() print(str(len(id_list)) + " unique terminal id\'s in log:") print(id_list)
def main(argv): parser = argparse.ArgumentParser(description='check variuous power control related parameters') parser.add_argument('-t','--terminal_id', help='for terminal_123 the required id to be passed as argument is 123', required=False) parser.add_argument('-p','--path', help='path to sbc_rtce_monitor.csv', required=False) parser.add_argument('-c','--columns', help='path to sbc_rtce_monitor.headers', required=False) args = vars(parser.parse_args()) idsubstring = args['terminal_id'] print(idsubstring) path = args['path'] header_path = args['columns'] if idsubstring is None: idsubstring = "15843" if path is None: path="../tests/sbc_rtce_monitor.csv" if header_path is None: header_path="../tests/sbc_rtce_monitor.headers" # replace path to appropriate location for your analysis df = rtce.load_rtce_log(path, header_path) # filter on a terminal df = df.pipe(rtce.filter_name, idsubstring).pipe(rtce.filter_loggedon) print(df.head()) print(df.info()) # gives an idea what can be asked to plot df.pipe(hrc.plot_utc_sof,'Next.TxPSD','txPsdLimit') plt.title('applied TX PSD and TX PSD limit imposed by API with BC',y=1.1) plt.show() df.pipe(hrc.plot_utc_sof,'fbRequestedPower','fbAppliedPower','reportedPuSat') plt.title('requested power by hub, applied power by terminal and saturated power according to API with BC',y=1.1) plt.show() df.pipe(hrc.plot_utc_sof,'MCD.Co','STA.BepdClrSky','STA.AvgNo') plt.title('RX PSD, RX BEPD calibration and RX noise',y=1.1) plt.show() df.pipe(hrc.plot_utc_sof,'MCD.EsNo') df.pipe(hrc.plot_utc_sof,'STA.G','fbRequestedPower') plt.title('path gain (between TX PSD and RX PSD)',y=1.1) plt.show() df.pipe(hrc.plot_utc_sof,'STA.G','STA.AcmMrg','STA.AcmMarginForEirpPsdLimitVariation') plt.title('path gain (between TX PSD and RX PSD) and ACM margin',y=1.1) plt.show() df.pipe(hrc.plot_xcor,'fbAppliedPower','STA.G') plt.title('applied Tx power vs measured path gain',y=1.1) plt.show() df.pipe(hrc.plot_utc_sof,'reportedPuSat','STA.PuSat') plt.title('power control API saturated power field vs own saturated power estimate',y=1.1) plt.show()
# -*- coding: utf-8 -*- """ Created on Sat Jan 13 23:53:29 2018 @author: aro """ import os import sys sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) import hrclogutils.rtce as rtce df = rtce.load_rtce_log() dfpivot = df.pipe(rtce.terminal_averages, 'fbAppliedPower', 'reportedPuSat') print(dfpivot)