qtest.py 373 Bytes
from __future__ import absolute_import, print_function

import sys
import numpy as np
from libquans import CAddedQuantity

################################################################################

def calcQtst(b, grid):
    newb = grid.data[b,:,:,:,grid.qIdx["dens"]]**2
    return newb

qtst = CAddedQuantity("qtst")
qtst.deps = ["dens", ]
qtst.calc = calcQtst