Beispiel #1
0
        public void GetP_0()
        {
            var man = new HealpixManager(0);

            Assert.AreEqual(1, man.GetP(1, 2));
            Assert.AreEqual(5, man.GetP(2, 2));
            Assert.AreEqual(10, man.GetP(3, 3));
        }
Beispiel #2
0
        public void Basin()
        {
            Data = new BasinData(HealpixManager, false, false
                                 //       , -7000d
                                 )
            {
                NoIntegrationFinish = true,
                //Visual = basin => basin.WaterHeight
            };

            var p     = HealpixManager.GetP(HealpixManager.Nside - 1, HealpixManager.Nside * 1);
            var basin = Data.PixMan.Pixels[p];

            basin.Depth = -500;
            basin.hOQ   = 10000;

            var framesCountBy2 = 300;

            Data.Cycle(delegate(int step)
            {
                Data.Draw(Bmp, 0, null, YResolution, Scale);
                SaveBitmap(step);
                return(1);
            }, framesCountBy2);
        }
Beispiel #3
0
        public void Water_Gradient()
        {
            Data = new BasinData(HealpixManager, false, false //true for sphere
                                 , -200d                      //, 2000d
                                 );

            var p     = HealpixManager.GetP(HealpixManager.Nside - 1, HealpixManager.Nside * 1);
            var basin = Data.PixMan.Pixels[p];

            basin.Delta_g_meridian = -.2;

            p = HealpixManager.GetP(HealpixManager.Nside * 2, HealpixManager.Nside * 2);
            Data.PixMan.Pixels[p].Delta_g_meridian = .2;

            p = HealpixManager.GetP(HealpixManager.Nside * 3, HealpixManager.Nside * 2);
            Data.PixMan.Pixels[p].Delta_g_meridian = .2;

            p = HealpixManager.GetP(HealpixManager.Nside + 5, HealpixManager.Nside * 2);
            Data.PixMan.Pixels[p].Delta_g_traverse = .2;


            var framesCountBy2 = 15;

            Data.Cycle(delegate(int step)
            {
                Data.Draw(Bmp, 0, null, YResolution, Scale);
                Circle(basin);
                SaveBitmap(step);
                return(1);
            }, framesCountBy2);
        }
Beispiel #4
0
        public void Water_HighBasin()
        {
            Data = new BasinData(HealpixManager, false, true //true for sphere
                                 , -20d                      //, 200d
                                 );

            var h      = 500d;
            var p      = HealpixManager.GetP(HealpixManager.Nside + 5, HealpixManager.Nside * 2);
            var basin3 = Data.PixMan.Pixels[p];

            basin3.hOQ = h;
            Data.PixMan.Pixels[HealpixManager
                               .GetP(HealpixManager.Nside, (int)(HealpixManager.Nside * 2.5))].hOQ = h;

            var framesCountBy2 = 10;

            Data.Cycle(delegate(int step)
            {
                Data.Draw(Bmp, 0, null, YResolution, Scale);
                Circle(basin3);
                SaveBitmap(step);
                return(1); //240 for k8, 150 for k7, 100 for k6
            }, framesCountBy2);
        }
Beispiel #5
0
        public void GetP_2()
        {
            var man = new HealpixManager(2);

            Assert.AreEqual(31, man.GetP(4, 8));
            Assert.AreEqual(47, man.GetP(5, 8));
            Assert.AreEqual(63, man.GetP(6, 8));
            Assert.AreEqual(79, man.GetP(7, 8));
            Assert.AreEqual(77, man.GetP(7, 6));
            Assert.AreEqual(95, man.GetP(8, 8));

            Assert.AreEqual(72, man.GetP(7, 1));
            Assert.AreEqual(87, man.GetP(7, 16));
            Assert.AreEqual(88, man.GetP(8, 1));
            Assert.AreEqual(103, man.GetP(8, 16));
            Assert.AreEqual(104, man.GetP(9, 1));
            Assert.AreEqual(118, man.GetP(9, 15));
            Assert.AreEqual(119, man.GetP(9, 16));
            Assert.AreEqual(120, man.GetP(10, 1));
            Assert.AreEqual(135, man.GetP(10, 16));
            Assert.AreEqual(136, man.GetP(11, 1));
            Assert.AreEqual(137, man.GetP(11, 2));
            Assert.AreEqual(151, man.GetP(11, 16));
            Assert.AreEqual(152, man.GetP(12, 1));
        }
Beispiel #6
0
        public void GetP_1()
        {
            var man = new HealpixManager(1);

            Assert.AreEqual(23, man.GetP(4, 4));
        }