@pimms.calc('<STR_LIT>')<EOL>def calc_registration(preregistration_map, anchors,<EOL>max_steps=<NUM_LIT>, max_step_size=<NUM_LIT>, method='<STR_LIT>'):
<EOL>pmap = preregistration_map<EOL>if is_tuple(max_steps) or is_list(max_steps):<EOL><INDENT>(max_steps, stride) = max_steps<EOL>traj = [preregistration_map.coordinates]<EOL>x = preregistration_map.coordinates<EOL>for s in np.arange(<NUM_LIT:0>, max_steps, stride):<EOL><INDENT>x = mesh_register(<EOL>preregistration_map,<EOL>[['<STR_LIT>',      '<STR_LIT>',      '<STR_LIT>', <NUM_LIT:1.0>],<EOL>['<STR_LIT>',     '<STR_LIT>', '<STR_LIT>', <NUM_LIT:1.0>],<EOL>['<STR_LIT>', '<STR_LIT>'],<EOL>anchors],<EOL>initial_coordinates=x,<EOL>method=method,<EOL>max_steps=stride,<EOL>max_step_size=max_step_size)<EOL>traj.append(x)<EOL><DEDENT>pmap = pmap.with_meta(trajectory=np.asarray(traj))<EOL><DEDENT>else:<EOL><INDENT>x = mesh_register(<EOL>preregistration_map,<EOL>[['<STR_LIT>',      '<STR_LIT>',      '<STR_LIT>', <NUM_LIT:1.0>],<EOL>['<STR_LIT>',     '<STR_LIT>', '<STR_LIT>', <NUM_LIT:1.0>],<EOL>['<STR_LIT>', '<STR_LIT>'],<EOL>anchors],<EOL>method=method,<EOL>max_steps=max_steps,<EOL>max_step_size=max_step_size)<EOL><DEDENT>return pmap.copy(coordinates=x)<EOL>
calc_registration is a calculator that creates the registration coordinates.