In [ ]:
#for debugging
#import sys
#sys.path.append('../..')
In [ ]:
import pyotc
import matplotlib.pyplot as plt
plt.ion()
#%matplotlib inline
In [ ]:
from os.path import join
from os.path import expanduser
directory = '../exampleData/height_calibration_single_psds/'
#homefolder = expanduser('~')
#directory = join(homefolder,'')
In [ ]:
basename = 'B01_'
hc = pyotc.HeightCalibration()
hc.load_hc_data(basename, directory=directory)
In [ ]:
fig1 = hc.plot_pc_results()
In [ ]:
#hc.exclude_by_max_rel_drag(max_rel_drag=1.7)
hc.exclude_heights_outside(0.0, 3, reset=True)
#hc.exclude_height(0.0)
In [ ]:
hc.focal_shift = 0.67
In [ ]:
hc.fit_height_data(method='radius',
fit_drag_first=False,
fit_dissens_osci=True,
plot_fit=True, h0=-1.0)
In [ ]:
fig = hc.plot_results(plot_corrected=True)
pyotc.plt.show()
In [ ]:
names = hc.names
ex_axis = names[int(hc._arrays['ex_axis'][0])]
fig = hc.plot_dissens(name=ex_axis, showLegend=True)
ax = fig.axes[0]
hc.plot_dissens(name=ex_axis, plot_ac_data=False, axis=ax, plot_corrected=True, c='blue',
showLegend=True, title='Comp. active and corrected passive displacement sensitivity')
In [ ]:
hc.write_results_to_file()
In [ ]: