Skip to content

Commit

Permalink
fix plotfile for ubuntu24, another sideeffet of the batch plotting is…
Browse files Browse the repository at this point in the history
…sues
  • Loading branch information
teuben committed Nov 4, 2024
1 parent e8fa271 commit e2ae82b
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions bin/badlags.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@
# 2022-05-18: also flag when rms < bc_lo
# 2023-02-02: implemented proper flags using docopt
# 2023-02-22: --plotmax
# 2024-11-04: fix plotting (and missing the badlags file in pipeline)
#
#

_version = "1-aug-2023"
_version = "4-nov-2024"

_help = """Usage: badlags.py [options] OBSNUM
Expand Down Expand Up @@ -59,7 +60,7 @@
import glob
import numpy as np
from docopt import docopt
from matplotlib import pyplot as pl
# from matplotlib import pyplot as pl
# dreampy3 is loaded below after commandline parser did its job

def rmsdiff(data, robust=True):
Expand Down Expand Up @@ -229,9 +230,22 @@ def rmsdiff(data, robust=True):

# make plot and report results
#pl.ion()
pl.figure(num=1,figsize=(12,8))
#pl.figure(num=1,figsize=(12,8))
#pl.clf()

import matplotlib
if plotfile == None:
matplotlib.use('qt5agg')
else:
# if the next statement was not used on unity, occasionally it would fine Qt5Agg, and thus fail
# this else clause is NOT used in rsr_tsys.py, which has the same patters as this routine, and
# never failed making a Tsys plot, go figure unity!
matplotlib.use('agg')
import matplotlib.pyplot as pl
print('mpl backend spectra',matplotlib.get_backend())

pl.figure(num=1,figsize=(12,8))


print(' ')
print('Bad Channel High Threshold = %6.1f'%(bc_hi))
Expand Down

0 comments on commit e2ae82b

Please sign in to comment.