# here is what I first tried and what I believe I want as my diagnostic. When I plotted the diagnostic the density was zero everywhere def plasma(particles): weights = particles.weight px = particles.px weights[px<=1]=0 return weights DiagParticleBinning( name = "plasma_density", deposited_quantity = plasma, every = ndump, time_average = 1, species = ["electron"], axes = [ ["x", 0., Lsim[0], 2000], ["y", 0., Lsim[1], 2000], ] ) # so then I tried with just this but still I see nothing def plasma(particles): return particles.weight DiagParticleBinning( name = "plasma_density", deposited_quantity = plasma, every = ndump, time_average = 1, species = ["electron"], axes = [ ["x", 0., Lsim[0], 2000], ["y", 0., Lsim[1], 2000], ] )