code: def process_command(self, command, save_name='custom', index=None):
          
          if index is not None:
              elev_source_files = [self.elev_source_files[index]]
          else:
              elev_source_files = self.elev_source_files
          save_root = os.path.join(self.save_path, save_name)
          if not os.path.exists(save_root):
              os.makedirs(save_root)
  
          for i, esfile in enumerate(elev_source_files):
              try:
                  status = 'Success'  # optimism
                  # Check if file is locked
                  lckfn = _get_lockfile_name(esfile)
                  coords = parse_fn(esfile)
                  fn = get_fn_from_coords(coords, save_name)
                  fn = os.path.join(save_root, fn)
                  if os.path.exists(lckfn):  # another process is working on it
                      print fn, 'is locked'
                      status = 'locked'
                  elif os.path.exists(fn):
                      print fn, 'already exists'
                      status = 'cached'
                  else:  # lock this tile
                      print fn, '... calculating ', save_name
                      fid = file(lckfn, 'w')
                      fid.close()
  
                      # Calculate the custom process for this tile
                      status = command(esfile, fn)
  
                      os.remove(lckfn)
  
                  if index is None:
                      self.custom_status[i] = status
                  else:
                      self.custom_status[index] = status
              except:
                  lckfn = _get_lockfile_name(esfile)
                  try:
                      os.remove(lckfn)
                  except:
                      pass
                  traceback.print_exc()
                  print traceback.format_exc()
                  if index is None:
                      self.custom_status[i] = "Error " + traceback.format_exc()
                  else:
                      self.custom_status[index] = "Error " + traceback.format_exc()
docs: Processes the hillshading
  
          Parameters
          -----------
          index : int/slice (optional)
              Default: None - process all tiles in source directory. Otherwise,
              will only process the index/indices of the files as listed in
              self.elev_source_files