Example #1
0
        private List <TypeRaDec> CreateData2GridView(double[][] centerradac, double[][] RaDec, List <TypeKDTree> prediction, IDictionary <string, string> radec)
        {
            double ra   = Angle.FromHms(radec["OBJCTRA"]).Degs;
            double dec  = Angle.FromDms(radec["OBJCTDEC"]).Degs;
            var    list = new List <TypeRaDec>();

            for (int i = 0; i < centerradac.Length; i++)
            {
                //Console.WriteLine("[{0},{1}],", Math.Abs( centerradac[i][0] - 4096),Math.Abs( centerradac[i][1]- 4096));
                double[] xy = MethodStaticFomula.StandardCoordi(centerradac[i][0], centerradac[i][1], ra, dec);
                if (i < prediction.Count)
                {
                    list.Add(
                        new TypeRaDec()
                    {
                        X       = prediction[i].Nearest[0],
                        Y       = prediction[i].Nearest[1],
                        Ra      = RaDec[i][0],
                        Dec     = RaDec[i][1],
                        Distand = prediction[i].Distand
                    });
                }
            }



            return(list);
        }
Example #2
0
        private void PlatConstan()
        {
            int k = 0;

            double[] radecl = MethodStaticFomula.StandardCoordi(ra: RaDec[0][0], dec: RaDec[0][1], radec[0], radec[1]);
            PointRaDecPrediction = new double[result.Item5.Count][];
            test = new MathRaDec(predictresultxy);
            foreach (int[] i in result.Item5)
            {
                double[] re            = test.Tranfrom2invert(i);
                double[] resultPredict = MethodStaticFomula.InvertStandardCoordi(re[0], re[1], radec[0], radec[1]);
                PointRaDecPrediction[k] = resultPredict;
                k++;
            }
        }