docs: def handle_options():
      '''Handle options.
      '''
      parser = OptionParser()
      parser.set_defaults(cmaglin=False)
      parser.set_defaults(single=False)
      parser.set_defaults(aniso=False)
      parser.set_defaults(hlam=False)
      parser.set_defaults(alpha_cov=False)
      # general options
      parser.add_option("--single",
                        action="store_true",
                        dest="single",
                        help="plot each value into a separate file",
                        )
      parser.add_option("--aniso",
                        action="store_true",
                        dest="aniso",
                        help="plot anisotropic xyz",
                        )
      parser.add_option("--hlam",
                        action="store_true",
                        dest="hlam",
                        help="plot anisotropic hor/ver",
                        )
      parser.add_option('--no_elecs',
                        action='store_true',
                        dest='no_elecs',
                        help='Plot no electrodes (default: false)',
                        default=False,
                        )
      parser.add_option('--title',
                        dest='title',
                        type='string',
                        help='Global override for title',
                        default=None,
                        )
      parser.add_option("--alpha_cov",
                        action="store_true",
                        dest="alpha_cov",
                        help="use coverage for transparency",
                        )
      parser.add_option('-c',
                        '--column',
                        dest='column',
                        help='column to plot of input file',
                        type='int',
                        default=2,
                        )
      parser.add_option("--cmaglin",
                        action="store_true",
                        dest="cmaglin",
                        help="linear colorbar for magnitude",
                        )
      # geometric options
      parser.add_option('-x',
                        '--xmin',
                        dest='xmin',
                        help='Minium X range',
                        type='float',
                        )
      parser.add_option('-X',
                        '--xmax',
                        dest='xmax',
                        help='Maximum X range',
                        type='float',
                        )
      parser.add_option('-z',
                        '--zmin',
                        dest='zmin',
                        help='Minium Z range',
                        type='float',
                        )
      parser.add_option('-Z',
                        '--zmax',
                        dest='zmax',
                        help='Maximum Z range',
                        type='float',
                        )
      parser.add_option('-u',
                        '--unit',
                        dest='unit',
                        help='Unit of length scale, typically meters (m) ' +
                        'or centimeters (cm)',
                        metavar='UNIT',
                        type='str',
                        default='m',
                        )
      # options for colorbars
      parser.add_option('--cov_cbtiks',
                        dest='cov_cbtiks',
                        help="Number of CB tiks for coverage",
                        type=int,
                        metavar="INT",
                        default=3,
                        )
      parser.add_option('--cov_vmin',
                        dest='cov_vmin',
                        help='Minium of colorbar',
                        type='float',
                        )
      parser.add_option('--cov_vmax',
                        dest='cov_vmax',
                        help='Maximum of colorbar',
                        type='float',
                        )
      parser.add_option('--mag_cbtiks',
                        dest='mag_cbtiks',
                        help="Number of CB tiks for magnitude",
                        type=int,
                        metavar="INT",
                        default=3,
                        )
      parser.add_option('--mag_vmin',
                        dest='mag_vmin',
                        help='Minium of colorbar',
                        type='float',
                        )
      parser.add_option('--mag_vmax',
                        dest='mag_vmax',
                        help='Maximum of colorbar',
                        type='float',
                        )
      parser.add_option('--pha_cbtiks',
                        dest='pha_cbtiks',
                        help="Number of CB tiks for phase",
                        type=int,
                        metavar="INT",
                        default=3,
                        )
      parser.add_option('--pha_vmin',
                        dest='pha_vmin',
                        help='Minium of colorbar',
                        type='float',
                        )
      parser.add_option('--pha_vmax',
                        dest='pha_vmax',
                        help='Maximum of colorbar',
                        type='float',
                        )
      parser.add_option('--real_cbtiks',
                        dest='real_cbtiks',
                        help="Number of CB tiks for real part",
                        type=int,
                        metavar="INT",
                        default=3,
                        )
      parser.add_option('--real_vmin',
                        dest='real_vmin',
                        help='Minium of colorbar',
                        type='float',
                        )
      parser.add_option('--real_vmax',
                        dest='real_vmax',
                        help='Maximum of colorbar',
                        type='float',
                        )
      parser.add_option('--imag_cbtiks',
                        dest='imag_cbtiks',
                        help="Number of CB tiks for imag part",
                        type=int,
                        metavar="INT",
                        default=3,
                        )
      parser.add_option('--imag_vmin',
                        dest='imag_vmin',
                        help='Minium of colorbar',
                        type='float',
                        )
      parser.add_option('--imag_vmax',
                        dest='imag_vmax',
                        help='Maximum of colorbar',
                        type='float',
                        )
      parser.add_option('--rat_vmin',
                        dest='rat_vmin',
                        help='Minium of colorbar',
                        type='float',
                        )
      parser.add_option('--rat_vmax',
                        dest='rat_vmax',
                        help='Maximum of colorbar',
                        type='float',
                        )
  
      (options, args) = parser.parse_args()
      return options