Example #1
0
 def testSanity(self):
     """cigaxg(cxgaig(n))==n for all n"""
     for name, proj, dims, xg, ig in self.knownValues:
         xgout = rmn.cigaxg(proj, ig[0], ig[1], ig[2], ig[3])
         igout = rmn.cxgaig(proj, xgout[0], xgout[1], xgout[2], xgout[3])
         self.assertEqual(igout, ig,
                          name + igout.__repr__() + xgout.__repr__())
Example #2
0
 def testCigaxgKnownValues(self):
     """Cigaxg should give known result with known input"""
     for name,proj,dims,xg,ig in self.knownValues:
         xgout = rmn.cigaxg(proj,ig[0],ig[1],ig[2],ig[3])
         self.assertAlmostEqual(xgout[0],xg[0],1,name+'[0]'+xgout.__repr__())
         self.assertAlmostEqual(xgout[1],xg[1],1,name+'[1]'+xgout.__repr__())
         self.assertAlmostEqual(xgout[2],xg[2],1,name+'[2]'+xgout.__repr__())
         self.assertAlmostEqual(xgout[3],xg[3],1,name+'[3]'+xgout.__repr__())
Example #3
0
def cigaxg(grtyp, ig1, ig2, ig3, ig4):
    """Decode grid descriptors (Interface to cigaxg)
    (xg1, xg2, xg3, xg4) = Fstdc.cigaxg(grtyp, ig1, ig2, ig3, ig4)
    @param ...TODO...
    @return (xg1, xg2, xg3, xg4)
    @exception TypeError
    @exception Fstdc.error
    """
    try:
        return _rmn.cigaxg(grtyp, ig1, ig2, ig3, ig4)
    except:
        raise error("")
Example #4
0
def cigaxg(grtyp, ig1, ig2, ig3, ig4):
    """Decode grid descriptors (Interface to cigaxg)
    (xg1, xg2, xg3, xg4) = Fstdc.cigaxg(grtyp, ig1, ig2, ig3, ig4)
    @param ...TODO...
    @return (xg1, xg2, xg3, xg4)
    @exception TypeError
    @exception Fstdc.error
    """
    try:
        return _rmn.cigaxg(grtyp, ig1, ig2, ig3, ig4)
    except:
        raise error("")