@pimms.calc('<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT:error>',<EOL>'<STR_LIT>',     <EOL>'<STR_LIT>',    <EOL>'<STR_LIT>',     <EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',  <EOL>'<STR_LIT>',     <EOL>'<STR_LIT>',     <EOL>'<STR_LIT>',     <EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',     <EOL>'<STR_LIT>',     <EOL>'<STR_LIT>',     <EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',        <EOL>'<STR_LIT>',             <EOL>'<STR_LIT>',         <EOL>'<STR_LIT>',     <EOL>'<STR_LIT>',             <EOL>'<STR_LIT>',    <EOL>'<STR_LIT>',     <EOL>'<STR_LIT>',      <EOL>'<STR_LIT>',       <EOL>'<STR_LIT>',         <EOL>'<STR_LIT>',         <EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>', <EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>')<EOL>def calc_arguments(args):
(args, opts) = _retinotopy_parser(args)<EOL>if opts['<STR_LIT>']:<EOL><INDENT>print(info, file=sys.stdout)<EOL>sys.exit(<NUM_LIT:1>)<EOL><DEDENT>verbose = opts['<STR_LIT>']<EOL>def note(s):<EOL><INDENT>if verbose:<EOL><INDENT>print(s, file=sys.stdout)<EOL>sys.stdout.flush()<EOL><DEDENT>return verbose<EOL><DEDENT>def error(s):<EOL><INDENT>print(s, file=sys.stderr)<EOL>sys.stderr.flush()<EOL>sys.exit(<NUM_LIT:1>)<EOL><DEDENT>if len(args) < <NUM_LIT:1>: error('<STR_LIT>')<EOL>if '<STR_LIT>' in opts and opts['<STR_LIT>'] is not None:<EOL><INDENT>add_subject_path(opts['<STR_LIT>'])<EOL><DEDENT>try: sub = subject(args[<NUM_LIT:0>])<EOL>except Exception: error('<STR_LIT>' % args[<NUM_LIT:0>])<EOL>if len(args) > <NUM_LIT:1>:       mdl_name = args[<NUM_LIT:1>]<EOL>elif opts['<STR_LIT>']: mdl_name = '<STR_LIT>'<EOL>else:                   mdl_name = '<STR_LIT>'<EOL>try:<EOL><INDENT>if opts['<STR_LIT>']:<EOL><INDENT>model = {h:retinotopy_model(mdl_name).persist() for h in ['<STR_LIT>', '<STR_LIT>']}<EOL><DEDENT>else:<EOL><INDENT>model = {h:retinotopy_model(mdl_name, hemi=h).persist() for h in ['<STR_LIT>', '<STR_LIT>']}<EOL><DEDENT><DEDENT>except Exception: error('<STR_LIT>' % mdl_name)<EOL>for o in ['<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>']:<EOL><INDENT>opts[o] = float(opts[o])<EOL><DEDENT>opts['<STR_LIT>'] = int(opts['<STR_LIT>'])<EOL>note('<STR_LIT>' % sub.name)<EOL>del opts['<STR_LIT>']<EOL>del opts['<STR_LIT>']<EOL>del opts['<STR_LIT>']<EOL>return pimms.merge(opts,<EOL>{'<STR_LIT>': sub.persist(),<EOL>'<STR_LIT>':   pyr.pmap(model),<EOL>'<STR_LIT>': pyr.pmap(opts),<EOL>'<STR_LIT>':    note,<EOL>'<STR_LIT:error>':   error})<EOL>
calc_arguments is a calculator that parses the command-line arguments for the registration
command and produces the subject, the model, the log function, and the additional options.