scan: Add stepper_tweaks (--no-stepper-tweaks) to UnfoldScanner.run()
[unfold-protein.git] / unfold.py
index 951ad336683084b41779a2602297cd1a622b2698..142aea09192f8e96b19d2a7be3a313859718183c 100755 (executable)
--- a/unfold.py
+++ b/unfold.py
@@ -40,6 +40,11 @@ if __name__ == '__main__':
     parser.add_argument(
         '-s', '--song',
         help='Path to a song to play when the experiment is complete')
+    parser.add_argument(
+        '-S', '--no-stepper-tweaks', dest='stepper_tweaks',
+        action='store_const', const=False, default=True,
+        help=("Don't move the stepper except for the initial approach "
+              "and final retraction"))
 
     args = parser.parse_args()
 
@@ -61,7 +66,7 @@ if __name__ == '__main__':
         afm.piezo.zero()
         unfolder = Unfolder(config=unfold_config, afm=afm)
         scanner = UnfoldScanner(config=scan_config, unfolder=unfolder)
-        scanner.run()
+        scanner.run(stepper_tweaks=args.stepper_tweaks)
     finally:
         afm.move_away_from_surface()
         afm.piezo.zero()