code: def rasterPlot(spikeTrain, model):
    
    nTrials = np.shape(spikeTrain)[0]
    spikes = []
    for i in range(nTrials):
      spikes.append(spikeTrain[i].nonzero()[0].tolist())
    plt.figure()
    ax = raster(spikes)
    plt.xlabel('Time')
    plt.ylabel('Neuron')
    # plt.show()
    plt.savefig("raster" + str(model))
    plt.close()
docs: Plots raster and saves figure in working directory
    
    @param spikeTrain (array) matrix of spike trains
    @param model (string) string specifying the name of the origin of the spike trains
           for the purpose of concatenating it to the filename (either TM or Poisson)