radiasoft / sirepo

Sirepo is a framework for scientific cloud computing. Try it out!
https://sirepo.com
Apache License 2.0
63 stars 31 forks source link

SHADOW: Specify raw data output file format #917

Open messamer opened 6 years ago

messamer commented 6 years ago

What is the format of the raw data file (I would like to import the file to compare it to SHADOW 2 results)?

messamer commented 6 years ago

Per Paul M:

The raw data file is shadow's binary format. For histograms, it can be plotted using the python code below:

import Shadow beam = Shadow.Beam() beam.load('shadow-output.dat') Shadow.ShadowTools.histo1(beam, 6, nolost=1, nbins=100, ref=22) <<

And for a 2d plot:

import Shadow beam = Shadow.Beam() beam.load('shadow-output.dat') Shadow.ShadowTools.plotxy(beam, 1, 3, nbins=100, title="Real space", ref=22) <<

Some documentation on the histo1() and plotxy() methods are below:

https://github.com/srio/shadow3/blob/master/docs/README_PYTHON.txt

The meaning of the column numbers can be found in the shadow's python source (the readthedocs version is broken):

https://github.com/srio/shadow3/blob/882530f94ed3e419e114b12411ce941489da4369/Shadow/ShadowTools.py#L45