docs: def calc_arguments(args):
      '''
      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.
      '''
      (args, opts) = _retinotopy_parser(args)
      # We do some of the options right here...
      if opts['help']:
          print(info, file=sys.stdout)
          sys.exit(1)
      # and if we are verbose, lets setup a note function
      verbose = opts['verbose']
      def note(s):
          if verbose:
              print(s, file=sys.stdout)
              sys.stdout.flush()
          return verbose
      def error(s):
          print(s, file=sys.stderr)
          sys.stderr.flush()
          sys.exit(1)
      if len(args) < 1: error('subject argument is required')
      # Add the subjects directory, if there is one
      if 'subjects_dir' in opts and opts['subjects_dir'] is not None:
          add_subject_path(opts['subjects_dir'])
      # Get the subject now
      try: sub = subject(args[0])
      except Exception: error('Failed to load subject %s' % args[0])
      # and the model
      if len(args) > 1:       mdl_name = args[1]
      elif opts['model_sym']: mdl_name = 'schira'
      else:                   mdl_name = 'benson17'
      try:
          if opts['model_sym']:
              model = {h:retinotopy_model(mdl_name).persist() for h in ['lh', 'rh']}
          else:
              model = {h:retinotopy_model(mdl_name, hemi=h).persist() for h in ['lh', 'rh']}
      except Exception: error('Could not load retinotopy model %s' % mdl_name)
  
      # Now, we want to run a few filters on the options
      # Parse the simple numbers
      for o in ['weight_min', 'scale', 'max_step_size', 'max_out_eccen',
                'max_in_eccen', 'min_in_eccen', 'field_sign_weight', 'radius_weight']:
          opts[o] = float(opts[o])
      opts['max_steps'] = int(opts['max_steps'])
      # Make a note:
      note('Processing subject: %s' % sub.name)
      del opts['help']
      del opts['verbose']
      del opts['subjects_dir']
      # That's all we need!
      return pimms.merge(opts,
                         {'subject': sub.persist(),
                          'model':   pyr.pmap(model),
                          'options': pyr.pmap(opts),
                          'note':    note,
                          'error':   error})