import argparse as _argparse
import time as _time
-from calibcant.calibrate import Calibrator as _Calibrator
+import h5py as _h5py
from pyafm.storage import load_afm as _load_afm
+
+from calibcant.calibrate import Calibrator as _Calibrator
import calibcant.config as _config
calibrator.setup_config()
deflection = afm.piezo.read_deflection()
try:
- afm.stepper_approach(target_deflection=deflection + 1e3)
+ position,deflection = afm.stepper_approach(
+ target_deflection=deflection + 1e3, record_data=True)
+ with _h5py.File(filename) as f:
+ f['/approach/position'] = position
+ f['/approach/deflection'] = deflection
if insufficient_calibration_data:
data = calibrator.acquire(filename=filename)
else: