snippet_jupiter.sample_conv_portΒΆ

This script is to demonstrate the bug in the kk_2009_port.

''' This script is to demonstrate the bug in the kk_2009_port.
'''
from irfpy.jupiter.kk_2009_port import *

def main():

    print_global()
    
    ctime = ctimer(1994, 8, 21, 3, 0, 0)
    #        self.assertAlmostEqual(903668400.000, ctime, 1)
    print_global()
    
    vecin = [1., 0, 0]
    vecout = jrot('s3c', 'jss', vecin, ctime)
    #        self.assertAlmostEqualVector([-0.87623097, -0.48189136, 0.0000000], vecout, 5)
    print(vecout)
    
    vecin = [0., 1, 0]
    vecout = jrot('s3c', 'jss', vecin, ctime)
    #        self.assertAlmostEqualVector([0.48189136, -0.87623097, 0.0000000], vecout, 5)
    print(vecout)
    
    vecin = [0., 0, 1]
    vecout = jrot('s3c', 'jss', vecin, ctime)
    #        self.assertAlmostEqualVector([0, 0, 1], vecout, 5)
    print(vecout)
    
    print_global()
    print(kk_2009(ctimer(2000, 6, 1, 10, 32, 17), 30.00, np.deg2rad(86.88), np.deg2rad(157.94)))
    print_global()
    
    ctime = ctimer(1994, 8, 21, 3, 0, 0)
    #        self.assertAlmostEqual(903668400.000, ctime, 1)
    
    print_global()
    
    vecin = [1., 0, 0]
    vecout = jrot('s3c', 'jss', vecin, ctime)
    #        self.assertAlmostEqualVector([-0.87623097, -0.48189136, 0.0000000], vecout, 5)
    print(vecout)
    
    vecin = [0., 1, 0]
    vecout = jrot('s3c', 'jss', vecin, ctime)
    #        self.assertAlmostEqualVector([0.48189136, -0.87623097, 0.0000000], vecout, 5)
    print(vecout)
    
    vecin = [0., 0, 1]
    vecout = jrot('s3c', 'jss', vecin, ctime)
    #        self.assertAlmostEqualVector([0, 0, 1], vecout, 5)
    print(vecout)
    
    
    print_global()


if __name__ == '__main__':
    main()