Skip to content

Commit

Permalink
more info on output in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
pordyna committed Jun 26, 2020
1 parent 816380d commit 3c9727b
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion docs/source/usage/plugins/xrayScattering.rst
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,22 @@ Output

``<species>_xrayScatteringOutput.<backend-specific extension>``

Output file in the `openPMD` standard.
Output file in the `openPMD` standard. An example on how to access your data with the python reader:

.. code-block:: python

from picongpu.plugins.data import XrayScatteringData

simulation_path = '...' # dir containing simOutput, input, ..,
# Read output from the 0th step, for electrons, hdf5 backend.
data = XrayScatteringData( simulation_path, 'e', 'h5' )
amplitude = saxsData.get(iteration=0) * saxsData.get_unit()
del XrayScatteringData

When you don't want to use the python reader keep in mind that:
* All iterations are saved in a single file
* The mesh containing the output is called `'amplitude'`
* This mesh has 2 components, `'x'` is the real part and `'y'` is the imaginary part.
.. note::
The amplitude is not zeroed on ``outputPeriod`` so one has to subtract the output from the iteration one period before and then calculate :math:`\left|\Phi\right|^2` and sum it with the intensities from other coherence periods.

Expand Down

0 comments on commit 3c9727b

Please sign in to comment.