Beispiel #1
0
        public ImagePixel GetPSFFit(int x, int y, int fitMatrixSize, PSFFittingMethod method, out PSFFit psfFit)
        {
            psfFit = new PSFFit(x, y);
            psfFit.FittingMethod = method;

            int dimention = 2 * (fitMatrixSize / 2) + 1;

            uint[,] data = new uint[dimention, dimention];
            int halfWidth = dimention / 2;

#if ASTROMETRY_DEBUG
            Trace.Assert(2 * halfWidth + 1 == dimention);
#endif

            PixelAreaOperation2(x, y, halfWidth,
                                delegate(int x1, int y1, uint z)
            {
                data[x1 - x + halfWidth, y1 - y + halfWidth] = z;
            });

            psfFit.Fit(data);
            if (psfFit.IsSolved)
            {
                ImagePixel psfPixel = new ImagePixel((int)Math.Min(m_Pixelmap.MaxSignalValue, (uint)Math.Round(psfFit.IMax)), psfFit.XCenter, psfFit.YCenter);
                psfPixel.SignalNoise = psfFit.Certainty;
                return(psfPixel);
            }

            return(null);
        }
Beispiel #2
0
        public ImagePixel GetPSFFit(int x, int y, PSFFittingMethod method, out PSFFit psfFit)
        {
            StarMapFeature feature   = GetFeatureInRadius(x, y, 5);
            int            dimention = 9;

            if (CoreAstrometrySettings.Default.SearchAreaAuto)
            {
                if (feature != null)
                {
                    if (feature.PixelCount > 25)
                    {
                        dimention = 9;
                    }
                    if (feature.PixelCount > 40)
                    {
                        dimention = 11;
                    }
                    if (feature.PixelCount > 60)
                    {
                        dimention = 13;
                    }
                    if (feature.PixelCount > 80)
                    {
                        dimention = 15;
                    }
                }
            }
            else
            {
                dimention = 2 * ((int)Math.Round(CoreAstrometrySettings.Default.SearchArea) / 2) + 1;
            }

            return(GetPSFFit(x, y, dimention, method, out psfFit));
        }
Beispiel #3
0
        public ImagePixel GetPSFFit(int x, int y, PSFFittingMethod method)
        {
            PSFFit psfFit;

            return(GetPSFFit(x, y, method, out psfFit));
        }
Beispiel #4
0
        public ImagePixel GetPSFFit(int x, int y, int fitMatrixSize, PSFFittingMethod method, out PSFFit psfFit)
        {
            psfFit = new PSFFit(x, y);
            psfFit.FittingMethod = method;

            int dimention = 2 * (fitMatrixSize / 2) + 1;

            uint[,] data = new uint[dimention, dimention];
            int halfWidth = dimention / 2;

            #if ASTROMETRY_DEBUG
            Trace.Assert(2 * halfWidth + 1 == dimention);
            #endif

            PixelAreaOperation2(x, y, halfWidth,
               delegate(int x1, int y1, uint z)
               {
                   data[x1 - x + halfWidth, y1 - y + halfWidth] = z;
               });

            psfFit.Fit(data);
            if (psfFit.IsSolved)
            {
                ImagePixel psfPixel = new ImagePixel((int)Math.Min(m_Pixelmap.MaxSignalValue, (uint)Math.Round(psfFit.IMax)), psfFit.XCenter, psfFit.YCenter);
                psfPixel.SignalNoise = psfFit.Certainty;
                return psfPixel;
            }

            return null;
        }
Beispiel #5
0
        public ImagePixel GetPSFFit(int x, int y, PSFFittingMethod method, out PSFFit psfFit)
        {
            StarMapFeature feature = GetFeatureInRadius(x, y, 5);
            int dimention = 9;
            if (CoreAstrometrySettings.Default.SearchAreaAuto)
            {
                if (feature != null)
                {
                    if (feature.PixelCount > 25) dimention = 9;
                    if (feature.PixelCount > 40) dimention = 11;
                    if (feature.PixelCount > 60) dimention = 13;
                    if (feature.PixelCount > 80) dimention = 15;
                }
            }
            else
                dimention = 2 * ((int)Math.Round(CoreAstrometrySettings.Default.SearchArea) / 2) + 1;

            return GetPSFFit(x, y, dimention, method, out psfFit);
        }
Beispiel #6
0
 public ImagePixel GetPSFFit(int x, int y, PSFFittingMethod method)
 {
     PSFFit psfFit;
     return GetPSFFit(x, y, method, out psfFit);
 }