示例#1
0
文件: athena.py 项目: jobejen/Viscid
 def _get_psi(self):
     B = self['b']
     # try to guess if a dim of a 3D field is invariant
     if B.nr_sdims > 2:
         slcs = [slice(None)] * B.nr_sdims
         for i, nxi in enumerate(B.sshape):
             if nxi <= 2:
                 slcs[i] = 0
         B = B[slcs]
     return plasma.calc_psi(B)
示例#2
0
    def _get_psi(self):
        B = self['b']
        # try to guess if a dim of a 3D field is invariant
        if B.nr_sdims > 2:
            slcs = [slice(None)] * B.nr_sdims
            for i, nxi in enumerate(B.sshape):
                if nxi <= 2:
                    slcs[i] = 0
            B = B[slcs]

        rev = True if B.meta["crd_system"] == "gse" else False
        psi = plasma.calc_psi(B, reversed=rev)
        return psi
示例#3
0
    def _get_psi(self):
        B = self['b']

        rev = True if B.find_info("crd_system", None) == "gse" else False
        psi = plasma.calc_psi(B, rev=rev)
        return psi
示例#4
0
 def _get_psi(self):
     return plasma.calc_psi(self['b'])
示例#5
0
 def _get_psi(self):
     return plasma.calc_psi(self['b'])