Beispiel #1
0
    x[i], y[i] = array(data[i][:,0]), array(data[i][:,1])

# <codecell>

def center(x_values, y_values):
	y_values = list(y_values)
	maximum_index 	= y_values.index(max(y_values))	
	centerfreq	= x_values[maximum_index]
	return centerfreq

# <codecell>

figure()
subplot(121)
p.grey_title("Data on Linear Scale")
p.colorcycle(len_files)
for i in arange(0, len_files):
    plot(x[i], y[i], label = str(i))
p.scale_xaxis(subplot(121),1e-6)
xlabel(r'Frequency [MHz]')
ylabel(r'Amplitude [dB]')

subplot(122)
p.grey_title("Data on Log Scale")
p.colorcycle(len_files)
for i in arange(0, len_files):
    plot(x[i]-center(x[i],y[i]), y[i], label = 'RBW='+str(RBW[i]))
xscale("log")
xlabel(r'Offset Frequency [Hz]')
ylabel(r'Amplitude [dB]')
leg = legend()
Beispiel #2
0
tight_layout()
show()

# <headingcell level=2>

# Approximation as Second Order System

# <headingcell level=3>

# I) Second Order System Parameters from Step Response

# <codecell>

figure("AOM Response")
ax = subplot(111)
p.colorcycle(3)
p.grey_title("Measured System Step Response")

ax.yaxis.set_major_locator(MultipleLocator(0.2))
ax.yaxis.set_minor_locator(MultipleLocator(0.1))
ax.xaxis.set_minor_locator(MultipleLocator(0.25e-6))
ax.xaxis.set_major_locator(MultipleLocator(1e-6))

#fill_between(tDDS, 0.99, 1.01, color = 'grey', alpha = 0.75)
amp = linspace(0,1,10)
time = linspace(-1.4e-6, 6.4e-6, 10)
plot([0.260e-6]*len(amp), amp, '--', lw = 1.5, color = 'grey')
plot([0.520e-6]*len(amp), amp, '--', lw = 1.5, color = 'grey')
plot([2e-6]*len(amp), amp, '--', lw = 1.5, color = 'grey')
plot(time , [1.43]*len(time), '--', lw = 1.5, color = 'grey')
Beispiel #3
0
# <codecell>

n = p.number_of_files()

# integration limits: see footnote in text
xmin = 1.2 # Hz
xmax = 1e6 # Hz

x, y, y_lin, start, stop, phi = [0]*n,[0]*n,[0]*n,[0]*n,[0]*n,[0]*n

# <codecell>

########## Step 1: plot all found input data ############
figure(1)
p.colorcycle(n+1)
for i in arange(0,n): 
	plot(p.x[i], p.y[i], label = str(i))

plot(x_res, y_res, label = r"$S_\phi\ [dB rad^2/Hz]$")

legend()
xlabel("offset frequency [Hz]") 
ylabel("amplitude [dBm/Hz]")
p.grey_title("comparison_step_1_plot_input_data")
savefig("comparison_step_1_plot_input_data.png")
show()

# <codecell>

######### Step 2: find integration limits ############