Beispiel #1
0
        internal void PlotGaussian()
        {
            if (m_Gaussian == null)
            {
                return;
            }
            if (!m_Aperture.HasValue)
            {
                return;
            }

            Bitmap bmp = picTarget1PSF.Image as Bitmap;

            if (bmp != null)
            {
                Rectangle rect = new Rectangle(0, 0, bmp.Width, bmp.Height);

                using (Graphics g = Graphics.FromImage(bmp))
                {
                    m_Gaussian.DrawInternalPoints(g, rect, m_Aperture.Value, m_Brush, m_AstroImage.Pixelmap.BitPixCamera);
                    g.Save();
                }
            }


            lblFWHM1.Text =
                string.Format("{0} px = {1} FWHM", m_Aperture.Value.ToString("0.00"), (m_Aperture.Value / m_FWHM).ToString("0.00"));

            picTarget1PSF.Refresh();
        }
Beispiel #2
0
        internal void PlotGaussian()
        {
            if (m_Gaussian == null && m_DoubleGaussian == null)
            {
                return;
            }

            Bitmap bmp = picTarget1PSF.Image as Bitmap;

            if (bmp != null)
            {
                Rectangle rect = new Rectangle(0, 0, bmp.Width, bmp.Height);

                using (Graphics g = Graphics.FromImage(bmp))
                {
                    if (m_DoubleGaussian != null)
                    {
                        float aperture1 = m_Aperture1.HasValue ? m_Aperture1.Value : 0;
                        float aperture2 = m_Aperture2.HasValue ? m_Aperture2.Value : 0;
                        m_DoubleGaussian.DrawInternalPoints(g, rect, aperture1, aperture2, m_Brush, m_Brush2, m_AstroImage.Pixelmap.BitPixCamera);
                    }
                    else if (m_Gaussian != null)
                    {
                        float aperture = m_Aperture.HasValue ? m_Aperture.Value : 0;
                        m_Gaussian.DrawInternalPoints(g, rect, aperture, m_Brush, m_AstroImage.Pixelmap.BitPixCamera);
                    }
                    g.Save();
                }
            }

            if (rbTwoObjects.Checked)
            {
                if (m_Aperture1 != null)
                {
                    lblFWHM1.Text = string.Format("{0} px = {1} FWHM", m_Aperture1.Value.ToString("0.00"), (m_Aperture1.Value / m_FWHM1).ToString("0.00"));
                }

                if (m_Aperture2 != null)
                {
                    lblFWHM2.Text = string.Format("{0} px = {1} FWHM", m_Aperture2.Value.ToString("0.00"), (m_Aperture2.Value / m_FWHM2).ToString("0.00"));
                }
            }
            else
            {
                if (m_Aperture != null)
                {
                    lblFWHM1.Text = string.Format("{0} px = {1} FWHM", m_Aperture.Value.ToString("0.00"), (m_Aperture.Value / m_FWHM).ToString("0.00"));
                }
            }

            picTarget1PSF.Refresh();
        }