Exemple #1
0
        private InnerResult CalculateForE(AuxContainerFast c, ICalculatorU u)
        {
            var e    = new ResultE();
            var zeta = _model.Section1D.GetAllSection1DZeta();

            c.Eta = CalculateEta(_planItem.Lambdas);
            c.Exp = CalculateExp(c.Eta);

            c.P = CalculateP1(c.Eta, c.Exp);
            c.Q = CalculateQ1(c.Eta, c.Exp);
            c.A = CalculateA1(c);

            u.PreCalculate();

            e.U1 = _planItem.CalculateI1 ? u.CalculateU1() : new Complex[0];

            c.P = CalculatePSigma(zeta, c.Eta, c.Exp);
            c.Q = CalculateQSigma(c.Eta, c.Exp);

            c.A = CalculateASigma(c);

            e.U2 = _planItem.CalculateI2 ? u.CalculateU2() : new Complex[0];
            e.U3 = _planItem.CalculateI3 ? u.CalculateU3() : new Complex[0];
            e.U4 = _planItem.CalculateI4 ? u.CalculateU4() : new Complex[0];
            e.U5 = _planItem.CalculateI5 ? u.CalculateU5(_planItem.Lambdas) : new Complex[0];

            var result = ScalarMathUtils.NormalizeAndPerformHankelFast(e, _planItem, _model, c.CorrBackgroundRc);

            return(result);
        }
Exemple #2
0
        private InnerResult CalculateForH(AuxContainerFast c, ICalculatorU u)
        {
            var h = new ResultH();

            var zeta = _model.Section1D.GetAllSection1DZeta();

            c.Eta = CalculateEta(_planItem.Lambdas);
            c.Exp = CalculateExp(c.Eta);

            c.P   = CalculateP1(c.Eta, c.Exp);
            c.Q   = CalculateQ1(c.Eta, c.Exp);
            c.A   = CalculateA1(c);
            h.U11 = _planItem.CalculateI4 ? u.CalculateU1() : new Complex[0];
            h.U31 = _planItem.CalculateI1 ? u.CalculateU3() : new Complex[0];

            c.P       = CalculatePSigma(zeta, c.Eta, c.Exp);
            c.Q       = CalculateQSigma(c.Eta, c.Exp);
            c.A       = CalculateASigma(c);
            h.U1Sigma = _planItem.CalculateI3 ? u.CalculateU1() : new Complex[0];
            h.U4Sigma = _planItem.CalculateI2 ? u.CalculateU4() : new Complex[0];

            var result = ScalarMathUtils.NormalizeAndPerformHankelFast(h, _planItem);

            return(result);
        }
Exemple #3
0
        private InnerResult CalculateForE(AuxContainer c, ICalculatorU u)
        {
            var e      = InitResultE(_planItem);
            var zeta   = _model.Section1D.GetAllSection1DZeta();
            var length = _planItem.Lambdas.Length;

            for (int i = 0; i < length; i++)
            {
                var lambda = _planItem.Lambdas[i];

                c.Eta = CalculateEta(_model, lambda);
                c.Exp = CalculateExp(_model, c.Eta);

                if (_planItem.CalculateI1)
                {
                    c.P     = CalculateP1(_alphaBeta, c.Eta, c.Exp);
                    c.Q     = CalculateQ1(_alphaBeta, c.Eta, c.Exp);
                    c.A     = CalculateA1(_model, c);
                    e.U1[i] = u.CalculateU1();
                }

                c.P = CalculatePSigma(zeta, c.Eta, c.Exp);
                c.Q = CalculateQSigma(c.Eta, c.Exp);
                c.A = CalculateASigma(_model, c);

                if (_planItem.CalculateI2)
                {
                    e.U2[i] = u.CalculateU2();
                }
                if (_planItem.CalculateI3)
                {
                    e.U3[i] = u.CalculateU3();
                }
                if (_planItem.CalculateI4)
                {
                    e.U4[i] = u.CalculateU4();
                }
                if (_planItem.CalculateI5)
                {
                    e.U5[i] = u.CalculateU5(lambda);
                }
            }

            var result = ScalarMathUtils.NormalizeAndPerformHankel(e, _planItem, _model, c.CorrBackgroundRc);

            return(result);
        }
Exemple #4
0
        private InnerResult CalculateForH(AuxContainer c, ICalculatorU u)
        {
            var h      = InitResultH(_planItem);
            var zeta   = _model.Section1D.GetAllSection1DZeta();
            var length = _planItem.Lambdas.Length;

            for (int i = 0; i < length; i++)
            {
                c.Eta = CalculateEta(_model, _planItem.Lambdas[i]);
                c.Exp = CalculateExp(_model, c.Eta);

                c.P = CalculateP1(_alphaBeta, c.Eta, c.Exp);
                c.Q = CalculateQ1(_alphaBeta, c.Eta, c.Exp);
                c.A = CalculateA1(_model, c);
                if (_planItem.CalculateI4)
                {
                    h.U11[i] = u.CalculateU1();
                }
                if (_planItem.CalculateI1)
                {
                    h.U31[i] = u.CalculateU3();
                }

                c.P = CalculatePSigma(zeta, c.Eta, c.Exp);
                c.Q = CalculateQSigma(c.Eta, c.Exp);
                c.A = CalculateASigma(_model, c);
                if (_planItem.CalculateI3)
                {
                    h.U1Sigma[i] = u.CalculateU1();
                }
                if (_planItem.CalculateI2)
                {
                    h.U4Sigma[i] = u.CalculateU4();
                }
            }

            var result = ScalarMathUtils.NormalizeAndPerformHankel(h, _planItem);

            return(result);
        }