code: def cleanup(workdir, fileroot, scans=[]):
      
  
      os.chdir(workdir)
  
      # merge cands/noise files per scan
      for scan in scans:
          merge_segments(fileroot, scan, cleanup=True, sizelimit=2.)
docs: Cleanup up noise and cands files.
      Finds all segments in each scan and merges them into single cand/noise file per scan.