예제 #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
파일: openggcm.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]

        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'])