Exemplo n.º 1
0
        /// <summary>
        /// Function for looking up the names of objects.
        /// </summary>
        /// <param name="ArcLengthSec">Lookup radius.</param>
        private void SkyBotLookupNames(double ArcLengthSec)
        {
            lock (m_tracklets)
            {
                foreach (IO.Image img in OriginalImageCube)
                {
                    SkyBotImageData skid = img.GetProperty <SkyBotImageData>();

                    foreach (Tracklet tk in CurrentTracklets)
                    {
                        skid.TryPair(tk, ArcLengthSec);
                    }
                }

                for (int i = 0; i < m_tracklets.Count; i++)
                {
                    for (int j = 0; j < m_tracklets[i].Count; j++)
                    {
                        Tracklet       tk = m_tracklets[i][j];
                        ObjectIdentity objid;
                        if (!tk.TryFetchProperty(out objid))
                        {
                            objid = new ObjectIdentity();
                        }
                        objid.ComputeNamescoreWithDefault(tk, null, ReportFieldName, CCDNumbers[i], j);
                        tk.SetResetProperty(objid);
                    }
                }
            }
            this.Invoke((Action)RefreshTrackletList);
        }
Exemplo n.º 2
0
        private void PairSkyBot(List <Tracklet> Tracklets, double ArcLengthSec, string ReportFieldName, int CCDNumber, FitsImage[] ImageSet, Step.StepPipeline Pipeline)
        {
            foreach (Image img in ImageSet)
            {
                SkyBotImageData skid = img.GetProperty <SkyBotImageData>();
                //skid.RetrieveObjects(ObservatoryCode);

                foreach (Tracklet tk in Tracklets)
                {
                    skid.TryPair(tk, ArcLengthSec);
                }

                var unp = skid.GetUnpaired();
                if (unp.Count != 0)
                {
                    Logger("SkyBoT: Unpaired objects left: ");
                    foreach (var o in unp)
                    {
                        string     SkData = "SkyBoT: " + ExtraIO.EquatorialPointStringFormatter.FormatToString(o, ExtraIO.EquatorialPointStringFormatter.Format.MPC);
                        PixelPoint pp     = img.Transform.GetPixelPoint(o);
                        SkData += ";" + pp.ToString();
                        Logger(SkData);
                        var    Reasons = Pipeline.QueryWhyNot(o, 5);
                        string LRs     = "Reasons: ";
                        foreach (string x in Reasons)
                        {
                            LRs += x + ";";
                        }
                        if (Reasons.Count == 0)
                        {
                            Logger("Not found in removal log, so not detected.");
                        }
                        else
                        {
                            Logger(LRs);
                        }
                    }
                }
            }

            for (int i = 0; i < Tracklets.Count; i++)
            {
                Tracklet tk = Tracklets[i];
                if (!tk.TryFetchProperty(out ObjectIdentity objid))
                {
                    objid = new ObjectIdentity();
                }
                objid.ComputeNamescoreWithDefault(tk, null, ReportFieldName, CCDNumber, i);
                tk.SetResetProperty(objid);
            }
        }