Coder Social home page Coder Social logo

Comments (1)

kklmn avatar kklmn commented on May 27, 2024

A typical way to extract ray distributions is described here, and an example can be found in
examples/withRaycing/01_SynchrotronSources/synchrotronSources.py. In that example, we pickle some values and arrays to be used elsewhere but you can directly do plotting in the function afterScript.

For the energy distribution, you need plot.caxis.binEdges and plot.caxis.total1D. The sum under the curve is the number of good rays within the specified energy limits. If you want it in ph/s, normalize it to plot.flux.

It is also possible to extract some values and arrays from plot pickles if you store them. Because pickling requires serialization, a plot pickle is not the same as its corresponding plot itself. The data structure there is different. From a plot pickle you need to extract ebinEdges, etotal1D and flux is calculated as
flux = float(intensity) / nRaysAll * nRaysSeededI / nRaysSeeded,
where all these variables are present in the pickle.

In the GitHub version, I've now included flux into plot pickles to facilitate its possible future usage.

from xrt.

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.