Open kmilo9999 opened 3 months ago
```python def conj_prod(x, y, key): prod = x * y.conj() return prod.real if key.startswith("P") else prod.imag keys = ["P11", "P22", "P33", "Q12", "Q13", "Q23", "P13", "P12", "P23"] index_pairs = [ (0, 0), (1, 1), (2, 2), (0, 1), (0, 2), (1, 2), (0, 2), (0, 1), (1, 2), ] mom = { key: conj_prod(X[i, 1:], X[j, 1:], key) for key, (i, j) in zip(keys, index_pairs) }
_Originally posted by @cpaniaguam in https://github.com/brown-ccv/icesat2waves/pull/131#discussion_r1517936436_
_Originally posted by @cpaniaguam in https://github.com/brown-ccv/icesat2waves/pull/131#discussion_r1517936436_