# opal AT lists.psi.ch

**Subject:**
The OPAL Discussion Forum

## List archive

**From**: Nicole Neveu <nneveu AT hawk.iit.edu>**To**: opal <opal AT lists.psi.ch>**Subject**: [Opal] Correlation term**Date**: Mon, 31 Oct 2016 14:50:55 -0500

Hi OPAL'ers,

What is the equation for xpx (column 21) in the stat file?

When I calculate xrms and pxrms, (using the h5 file and math definitions), the numbers match exactly.

I thought the calculation would be similar for the correlation term. Something like:

**correlation = ( (np.sum(x*px)/npt) - (np.sum(x)/npt)*(np.sum(px)/npt) )**

However, when I do this calculation, it does not match the xpx value listed in the stat file.

Do I need to divide by xrms? What part of the equation am I missing?

Thanks!

Nicole

**[Opal] Correlation term**,*Nicole Neveu, 10/31/2016*

Archive powered by MHonArc 2.6.19.