@pimms.calc('<STR_LIT>')<EOL>def calc_registrations(note, error, cortices, model, model_sym,<EOL>weight_min, scale, prior, max_out_eccen, max_steps, max_step_size,<EOL>radius_weight, field_sign_weight, resample, invert_rh_angle,<EOL>part_vol_correct):
rsamp = ('<STR_LIT>' if model_sym else '<STR_LIT>') if resample else False<EOL>res = {}<EOL>for (h,ctx) in six.iteritems(cortices):<EOL><INDENT>note('<STR_LIT>' % h.upper())<EOL>try:<EOL><INDENT>res[h] = register_retinotopy(ctx, model[h],<EOL>model_hemi='<STR_LIT>' if model_sym else h,<EOL>polar_angle='<STR_LIT>',<EOL>eccentricity='<STR_LIT>',<EOL>weight='<STR_LIT>',<EOL>weight_min=weight_min,<EOL>partial_voluming_correction=part_vol_correct,<EOL>field_sign_weight=field_sign_weight,<EOL>radius_weight=radius_weight,<EOL>scale=scale,<EOL>prior=prior,<EOL>resample=rsamp,<EOL>invert_rh_field_sign=invert_rh_angle,<EOL>max_steps=max_steps,<EOL>max_step_size=max_step_size,<EOL>yield_imap=True)<EOL><DEDENT>except Exception: <EOL><INDENT>raise<EOL><DEDENT><DEDENT>return {'<STR_LIT>': pyr.pmap(res)}<EOL>
calc_registrations is the calculator that performs the registrations for the left and right
hemisphere; these are returned as the immutable maps yielded from the register_retinotopy
command.