Example #1
0
        public void MinApertureBestExitPupil()
        {
            var mabep = new MinApertureBestExitPupil
            {
                BkgndBrightEye = 21.5,
                ObjName        = "California Nebula",
                // change from 5 to 7 for purposes of the test
                ObjMag                 = 7,
                MaxObjArcmin           = 145,
                MinObjArcmin           = 40,
                ApparentFoV            = 100,
                DisplayConsoleMessages = true,
            };

            mabep.Calc();
            Assert.Equal(10, mabep.MinimumApertureIn);
            Assert.Equal(2, mabep.BestExitPupilmm);

            // test for not visible
            mabep.ObjMag = 15;
            mabep.Calc();
            Assert.Equal(0, mabep.MinimumApertureIn);
            Assert.Equal(0, mabep.BestExitPupilmm);

            // test where low and high apertures converge to same aperture that is not visible (a previous aperture was visible)
            mabep.ObjMag       = 12.9;
            mabep.MaxObjArcmin = 1.2;
            mabep.MinObjArcmin = 1.1;
            mabep.Calc();
            Assert.Equal(5, mabep.MinimumApertureIn);
            Assert.Equal(3, mabep.BestExitPupilmm);

            Assert.True(true);
        }
Example #2
0
        private void CalcAnAperture(DisplayRecord displayRecord)
        {
            IsVisibleHelper.Calc(displayRecord)
            .Then(() =>
            {
                MinApertureBestExitPupil.BkgndBrightEye = SkyBkgndBrightness;
                MinApertureBestExitPupil.ApparentFoV    = 100;

                MinApertureBestExitPupil.ObjMag       = IsVisibleHelper.ObjectMagnitude;
                MinApertureBestExitPupil.MaxObjArcmin = IsVisibleHelper.ObjectSize1;
                MinApertureBestExitPupil.MinObjArcmin = IsVisibleHelper.ObjectSize2;

                MinApertureBestExitPupil.Calc();
                (MinApertureBestExitPupil.MinimumApertureIn > 0)
                .Then(() => SetVisibleApertureDisplay(displayRecord));
            });
        }