How can I get C4 with full polarization data?

I have been using SNAP to get C4 matrix,which is as follows:

where <.> indicates temporal or spatial ensemble averaging.
I can obtain the elements by Complex number operations.But what is the averaging operation.What’s the formula when I caculate by script? Thanks.