from __future__ import print_function
from numpy import *
from matplotlib.pyplot import *

# load the data
import gzip, pickle
datafile = gzip.open('ws6.pkl.gz')
radar, simulation = pickle.load(datafile)

# Task 6.2: Radar Signals
ts, signal1, ref1, signal2, ref2 = radar

figure()
title('Reflected signals 1')
xlabel('Time $t$')
plot(ts, ref1, '.')

# Task 6.3: Simulation Data
ts, n1, n2, n3 = simulation

figure()
title('Simulation data')
xlabel('Time $t$')
plot(ts, n1, '.', label='$N_{+3}$')
plot(ts, n2, '.', label='$N_{-1}$')
plot(ts, n3, '.', label='$N_{+1}$')
legend(loc='best')

show()
