In [12]:
import pylab as pb
import time
In [13]:
pb.plot(pulsedmeasurement.signal_plot_x, pulsedmeasurement.signal_plot_y)
pb.show()
In [14]:
# multiply the x axis with whatever scaling factor you have coming from the pulsedmeasurement gui
scale = 10**6
freqs = pulsedmeasurement.signal_plot_x * scale
norm_vals = pulsedmeasurement.signal_plot_y
In [15]:
results = fitlogic.make_N14_fit(freqs, norm_vals)
In [16]:
results.params.pretty_print()
In [17]:
# values of the center peaks
results.params['l0_center'].value, results.params['l1_center'].value, results.params['l2_center'].value
Out[17]:
In [18]:
results.params.pretty_print()
In [19]:
a0 = results.params['offset'] + results.params['l0_amplitude']/(results.params['l0_sigma'] * np.pi)
a1 = results.params['offset'] + results.params['l1_amplitude']/(results.params['l1_sigma'] * np.pi)
a2 = results.params['offset'] + results.params['l2_amplitude']/(results.params['l2_sigma'] * np.pi)
In [20]:
pb.plot(freqs, pulsedmeasurement.signal_plot_y, 'o')
pb.plot(freqs, results.eval())
pb.plot([results.params['l0_center'].value, results.params['l0_center'].value], [a0, results.params['offset'].value], 'r')
pb.plot([results.params['l1_center'].value, results.params['l1_center'].value], [a1, results.params['offset'].value], 'b')
pb.plot([results.params['l2_center'].value, results.params['l2_center'].value], [a2, results.params['offset'].value], 'k')
pb.show()
In [21]:
# calculate sum of contrast
c0 = (results.params['offset'].value - a0) / results.params['offset']
c1 = (results.params['offset'].value - a1) / results.params['offset']
c2 = (results.params['offset'].value - a2) / results.params['offset']
c0, c1, c2
Out[21]:
In [11]:
# summed contrasts
c0 + c1 + c2
Out[11]:
In [ ]:
In [ ]: