Begin CalcDescriptors function.