Code Monkey home page Code Monkey logo

Comments (2)

mccoys avatar mccoys commented on May 27, 2024

It depends actually (and it is true that the documentation is lacking some explanation).

In Smilei, each macro-particle has a (statistical) weight that is initialized as its species' number density in the cell where it is born, divided by the initial number of macro-particles in that cell. Thus the weight has the dimension of a density. The ParticleBinning diagnostic collects and sums the weights of macro-particle in some user-defined binning. This means that the data written in the ParticleBinning*.h5 files has the dimension of a density, which is the sum of each macro-particle contribution.

However, as the size of a bin is not the same size as a PIC grid cell, there is some adjustment needed. This is done in happi when using the ParticleBinning python function. This function returns the particle binning data corrected so that the result is really the plasma number density. If your binning axes are not only x, y or z, then happi also divides by the bin size so that the result can be interpreted as a distribution. For instance, a phase-space binning (x, px) will have the dimension of a number density divided by m_e * c.

What is important to recall here is that the raw data in the ParticleBining*.h5 files is not the same as that analysed by happi. There is some correction applied.

from smilei.

MickaelGrech avatar MickaelGrech commented on May 27, 2024

@phyax hi!
did @mccoys' answer worked for you?
If so, think about closing the issue ;)

from smilei.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.