/// <summary>
        /// Create a DiffusionParameters object from OpticalProperties object and a ForwardModel
        /// choice.
        /// </summary>
        /// <param name="op">OpticalProperties object</param>
        /// <param name="fm">ForwardModel enum</param>
        /// <returns>new DiffusionParameters object</returns>
        public static DiffusionParameters Create(OpticalProperties op, ForwardModel fm)
        {
            var    mua   = op.Mua;
            var    mutr  = op.Mua + op.Musp;
            var    cn    = GlobalConstants.C / op.N;
            var    D     = 1 / (3 * mutr);
            var    A     = CalculatorToolbox.GetCubicAParameter(op.N);
            var    mueff = Math.Sqrt(3 * op.Mua * mutr);
            var    zb    = 2 / (3 * mutr) * A;
            double musTilde;
            double gTilde;

            switch (fm)
            {
            case ForwardModel.SDA:
            default:
                musTilde = op.Musp;
                gTilde   = op.G;
                break;

            case ForwardModel.DeltaPOne:
                musTilde = op.Musp * (1 - op.G * op.G) / (1 - op.G);
                gTilde   = op.G / (op.G + 1);
                break;
            }
            var mutTilde = op.Mua + musTilde;
            var zp       = 1 / mutTilde;

            return(new DiffusionParameters(A, mueff, zb, zp, mutTilde, musTilde, mutr, gTilde, D, cn, mua));
        }
        /// <summary>
        /// Modulation frequency-dependent reflectance. Modified from Pham et al, Appl. Opt. Sept 2000
        /// to include spatial modulation, as described in Cuccia et al, J. Biomed. Opt. March/April 2009
        /// </summary>
        /// <param name="op">optical properties of the medium</param>
        /// <param name="fx">spatial frequency</param>
        /// <param name="ft">modulation frequency (GHz)</param>
        /// <returns></returns>
        public override Complex ROfFxAndFt(OpticalProperties op, double fx, double ft)
        {
            double  A      = CalculatorToolbox.GetCubicAParameter(op.N);
            double  wOverC = Math.PI * ft * op.N / GlobalConstants.C;
            double  mutr   = op.Mua + op.Musp;
            Complex D      = 1 / (3 * mutr * (1.0 + Complex.ImaginaryOne * wOverC / mutr));
            Complex mueff  =
                (
                    3.0 * op.Mua * mutr -
                    3.0 * wOverC * wOverC +
                    Complex.ImaginaryOne * (1 + op.Mua / mutr) * 3.0 * mutr * wOverC +
                    4.0 * Math.PI * Math.PI * fx * fx
                ).SquareRoot();

            Complex temp = mueff * D;

            return(3 * A * op.Musp * D / (temp + 1.0 / 3.0) / (temp + A));
        }