mirror of
https://gitlab.science.ru.nl/mthesis-edeboone/m-thesis-introduction.git
synced 2024-12-22 03:23:34 +01:00
ZH: only use Agg backend if no DISPLAY
This commit is contained in:
parent
730823f54d
commit
344cc4beea
4 changed files with 15 additions and 7 deletions
|
@ -17,6 +17,8 @@ if __name__ == "__main__":
|
|||
from os import path
|
||||
import sys
|
||||
import matplotlib
|
||||
import os
|
||||
if os.name == 'posix' and "DISPLAY" not in os.environ:
|
||||
matplotlib.use('Agg')
|
||||
|
||||
f_beacon_band = (49e-3,55e-3) #GHz
|
||||
|
|
|
@ -37,7 +37,9 @@ if __name__ == "__main__":
|
|||
from os import path
|
||||
import sys
|
||||
|
||||
import os
|
||||
import matplotlib
|
||||
if os.name == 'posix' and "DISPLAY" not in os.environ:
|
||||
matplotlib.use('Agg')
|
||||
|
||||
fname = "ZH_airshower/mysim.sry"
|
||||
|
|
|
@ -14,7 +14,9 @@ if __name__ == "__main__":
|
|||
from os import path
|
||||
import sys
|
||||
|
||||
import os
|
||||
import matplotlib
|
||||
if os.name == 'posix' and "DISPLAY" not in os.environ:
|
||||
matplotlib.use('Agg')
|
||||
|
||||
fname = "ZH_airshower/mysim.sry"
|
||||
|
|
|
@ -48,10 +48,10 @@ def find_best_sample_shifts_summing_at_location(test_loc, antennas, allowed_samp
|
|||
t_max = t__[-1]
|
||||
|
||||
# Interpolate and find best sample shift
|
||||
max_neg_shift = np.min(allowed_sample_shifts) * dt
|
||||
max_pos_shift = np.max(allowed_sample_shifts) * dt
|
||||
max_neg_shift = 0 #np.min(allowed_sample_shifts) * dt
|
||||
max_pos_shift = 0 #np.max(allowed_sample_shifts) * dt
|
||||
|
||||
t_sum = np.arange(t_min+1+max_neg_shift, t_max-1+max_pos_shift, dt)
|
||||
t_sum = np.arange(t_min+max_neg_shift, t_max+max_pos_shift, dt)
|
||||
a_sum = np.zeros(len(t_sum))
|
||||
|
||||
best_sample_shifts = np.zeros( (len(antennas)) ,dtype=int)
|
||||
|
@ -97,7 +97,9 @@ def find_best_sample_shifts_summing_at_location(test_loc, antennas, allowed_samp
|
|||
|
||||
if __name__ == "__main__":
|
||||
import sys
|
||||
import os
|
||||
import matplotlib
|
||||
if os.name == 'posix' and "DISPLAY" not in os.environ:
|
||||
matplotlib.use('Agg')
|
||||
|
||||
atm = AtmoCal()
|
||||
|
|
Loading…
Reference in a new issue