code: def logCellActivity_varyNumColumns(noiseSigma, noiseEverywhere):
    
    noiseLevels = [0.30, 0.40, 0.45, 0.50, 0.55, 0.60, 0.65, 0.70, 0.75, 0.80, 0.85, 0.90]
    l2Overrides = {"sampleSizeDistal": 20}
    columnCounts = [1, 2, 3, 4, 5]
  
    results = defaultdict(list)
  
    for trial in xrange(1):
      print "trial", trial
      objectDescriptions = createRandomObjectDescriptions(10, 10)
  
      for numColumns in columnCounts:
        print "numColumns", numColumns
        for noiseLevel in noiseLevels:
          r = doExperiment(numColumns, l2Overrides, objectDescriptions,
                           noiseLevel, noiseSigma, numInitialTraversals=6,
                           noiseEverywhere=noiseEverywhere)
          results[(numColumns, noiseLevel)].extend(r)
  
    d = []
    for (numColumns, noiseLevel), cellCounts in results.iteritems():
      d.append({"numColumns": numColumns,
                "noiseLevel": noiseLevel,
                "results": cellCounts})
  
    filename = os.path.join("plots",
                            "varyColumns_sigma%.2f_%s.json"
                            % (noiseSigma, time.strftime("%Y%m%d-%H%M%S")))
    with open(filename, "w") as fout:
      json.dump(d, fout)
  
    print "Wrote to", filename
    print "Visualize this file at: http://numenta.github.io/htmresearch/visualizations/grid-of-scatterplots/L2-columns-with-noise.html"
docs: Run the experiment, varying the column counts, and save each
      [# correctly active cells, # incorrectly active cells]
    pair to a JSON file that can be visualized.