We may modify the parameter dict later during the command's execution,
and we want future runs via the command stack to replicate the first
run from the raw initial parameters. If you don't do this, you'll get
errors like
$ ./bin/hk.py
-c 'load_playlist test/data/vclamp_picoforce/playlist'
-c 'start_command_capture'
-c 'zero_surface_contact_point --block approach'
-c 'zero_surface_contact_point --block retract'
-c 'stop_command_capture'
-c 'apply_command_stack_to_playlist --enable-evaluate'
-c 'flat_filter_playlist --block retract --min_points 1'
Success
...
Failure
Expected a list of Peaks, not <class 'hooke.command.Failure'>:
surface distance (m) not in retract (['z piezo (m)', 'deflection (m)',
'surface distance (m) (m)', 'surface deflection (m) (m)']):...
where the units '(m)' were appended twice, once during the initial
command run, and again during the reload's command stack exectution.
pass # no need to place duplicate calls on the stack.
else:
curve.command_stack.append(CommandMessage(
- self.name, params))
+ self.name, dict(params)))
class BlockCommand (CurveCommand):