From d9d038b4aa3dd13cb5d0914e04744fb51a6f8ba2 Mon Sep 17 00:00:00 2001 From: 0xCoto Date: Tue, 3 Mar 2020 01:50:12 +0200 Subject: [PATCH] Update rfi_plotter.py --- rfi_plotter.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rfi_plotter.py b/rfi_plotter.py index d5e1ca4..cb9de01 100644 --- a/rfi_plotter.py +++ b/rfi_plotter.py @@ -77,7 +77,10 @@ try: ax1.ticklabel_format(useOffset=False) ax1.set_xlabel("Frequency (MHz)", labelpad=25) ax1.set_ylabel("Relative Power (dB)", labelpad=25) - ax1.set_title("\nAveraged RFI Spectrum", pad=25) + try: + ax1.set_title("\nAveraged RFI Spectrum", pad=25) + except: + ax1.set_title("\nAveraged RFI Spectrum") ax1.annotate('Frequency range scanned: '+str(float(fminimum)/1000000)+'-'+str(float(fmaximum)/1000000)+' MHz ($\\Delta\\nu$ = '+str(float((fmaximum)-float(fminimum))/1000000)+' MHz)\nBandwidth per spectrum: '+str(float(samp_rate)/1000000)+' MHz\nIntegration time per spectrum: '+str(dur)+" sec\nNumber of channels per spectrum (FFT size): "+str(nchan), xy=(17, 1179), xycoords='axes points', size=32, ha='left', va='top', color='brown') ax1.grid()