internal MarshalByRefLightCurveDataProvider(ILightCurveDataProvider localProvider)
        {
            m_DelegatedLocalProvider = localProvider;

            FileName = localProvider.FileName;
            NumberOfMeasuredComparisonObjects = localProvider.NumberOfMeasuredComparisonObjects;
            CameraCorrectionsHaveBeenApplied  = localProvider.CameraCorrectionsHaveBeenApplied;
            HasEmbeddedTimeStamps             = localProvider.HasEmbeddedTimeStamps;
            VideoCameraName         = localProvider.VideoCameraName;
            VideoSystem             = localProvider.VideoSystem;
            NumberIntegratedFrames  = localProvider.NumberIntegratedFrames;
            MinFrameNumber          = localProvider.MinFrameNumber;
            MaxFrameNumber          = localProvider.MaxFrameNumber;
            m_TangraDrawingSettings = localProvider.GetTangraDrawingSettings();

            CurrentlySelectedFrameNumber = localProvider.CurrentlySelectedFrameNumber;
            HasReliableTimeBase          = localProvider.HasReliableTimeBase;
            m_TargetMeasurements         = localProvider.GetTargetMeasurements();
            if (NumberOfMeasuredComparisonObjects > 0)
            {
                m_Comp1Measurements = localProvider.GetComparisonObjectMeasurements(0);
            }
            if (NumberOfMeasuredComparisonObjects > 1)
            {
                m_Comp2Measurements = localProvider.GetComparisonObjectMeasurements(1);
            }
            if (NumberOfMeasuredComparisonObjects > 2)
            {
                m_Comp3Measurements = localProvider.GetComparisonObjectMeasurements(2);
            }
            localProvider.GetIntegrationRateAndFirstFrame(out m_IntegrationRate, out m_FirstIntegratingFrame);
        }
        internal MarshalByRefLightCurveDataProvider(ILightCurveDataProvider localProvider)
        {
            m_DelegatedLocalProvider = localProvider;

            FileName = localProvider.FileName;
            NumberOfMeasuredComparisonObjects = localProvider.NumberOfMeasuredComparisonObjects;
            CameraCorrectionsHaveBeenApplied = localProvider.CameraCorrectionsHaveBeenApplied;
            HasEmbeddedTimeStamps = localProvider.HasEmbeddedTimeStamps;
            VideoCameraName = localProvider.VideoCameraName;
            VideoSystem = localProvider.VideoSystem;
            NumberIntegratedFrames = localProvider.NumberIntegratedFrames;
            MinFrameNumber = localProvider.MinFrameNumber;
            MaxFrameNumber = localProvider.MaxFrameNumber;
            m_TangraDrawingSettings = localProvider.GetTangraDrawingSettings();

            CurrentlySelectedFrameNumber = localProvider.CurrentlySelectedFrameNumber;
            HasReliableTimeBase = localProvider.HasReliableTimeBase;
            m_TargetMeasurements = localProvider.GetTargetMeasurements();
            if (NumberOfMeasuredComparisonObjects > 0)
                m_Comp1Measurements = localProvider.GetComparisonObjectMeasurements(0);
            if (NumberOfMeasuredComparisonObjects > 1)
                m_Comp2Measurements = localProvider.GetComparisonObjectMeasurements(1);
            if (NumberOfMeasuredComparisonObjects > 2)
                m_Comp3Measurements = localProvider.GetComparisonObjectMeasurements(2);
            localProvider.GetIntegrationRateAndFirstFrame(out m_IntegrationRate, out m_FirstIntegratingFrame);
        }
Exemplo n.º 3
0
        private void frmConfigureRun_Load(object sender, EventArgs e)
        {
            ITangraDrawingSettings settings = DataProvider.GetTangraDrawingSettings();

            m_Target1Color = settings.Target1Color;
            m_Target2Color = settings.Target2Color;
            m_Target3Color = settings.Target3Color;
            m_Target4Color = settings.Target4Color;
            m_Target1Brush = new SolidBrush(m_Target1Color);
            m_Target2Brush = new SolidBrush(m_Target2Color);
            m_Target3Brush = new SolidBrush(m_Target3Color);
            m_Target4Brush = new SolidBrush(m_Target4Color);

            pb1.BackColor  = m_Target1Color;
            pb2.BackColor  = m_Target2Color;
            pb3.BackColor  = m_Target3Color;
            pb4.BackColor  = m_Target4Color;
            pb1c.BackColor = m_Target1Color;
            pb2c.BackColor = m_Target2Color;
            pb3c.BackColor = m_Target3Color;
            pb4c.BackColor = m_Target4Color;

            if (NumStars == 2)
            {
                rbComp3.Visible = false;
                rbComp4.Visible = false;
                rbVar3.Visible  = false;
                rbVar4.Visible  = false;
                pb3.Visible     = false;
                pb3c.Visible    = false;
                pb4.Visible     = false;
                pb4c.Visible    = false;
            }
            else if (NumStars == 3)
            {
                rbComp4.Visible = false;
                rbVar4.Visible  = false;
                pb4.Visible     = false;
                pb4c.Visible    = false;
            }

            tbarFrom.Minimum = FromFrameNo;
            tbarFrom.Maximum = ToFrameNo;
            tbarFrom.Value   = FromFrameNo;

            tbarTo.Minimum = FromFrameNo;
            tbarTo.Maximum = ToFrameNo;
            tbarTo.Value   = ToFrameNo;

            m_DisplayData = TargetData.Where(x => x.IsSuccessful).Select(x => x.Measurement).ToArray();

            IncludeDataFrom = 0;
            IncludeDataTo   = m_DisplayData.Length - 1;

            rb1000.Checked = TargetData.Length > 15000;
            DrawLightCurve();
        }
Exemplo n.º 4
0
        private void frmResults_Load(object sender, EventArgs e)
        {
            ILightCurveDataProvider dataProvider = TangraHost.GetLightCurveDataProvider();

            if (dataProvider != null)
            {
                ITangraDrawingSettings settings = dataProvider.GetTangraDrawingSettings();

                Color targetColor = settings.Target1Color;
                if (TargetId == 0)
                {
                    targetColor = settings.Target1Color;
                }
                else if (TargetId == 1)
                {
                    targetColor = settings.Target2Color;
                }
                else if (TargetId == 2)
                {
                    targetColor = settings.Target3Color;
                }
                else if (TargetId == 3)
                {
                    targetColor = settings.Target4Color;
                }

                m_TargetBrush = new SolidBrush(targetColor);
            }
            else
            {
                m_TargetBrush = Brushes.DeepSkyBlue;
            }

            if (Results.Success)
            {
                tbxErrorMessage.Visible = false;
                picGraph.Visible        = true;
            }
            else
            {
                tbxErrorMessage.Text    = Results.ErrorMessage;
                tbxErrorMessage.Visible = true;
                picGraph.Visible        = false;
            }

            // 1E-6 days is a precision of 0.08 sec - good enough for our purposes
            tbxT0JD.Text             = Results.Time_Of_Minimum_JD.ToString("0.000000");
            tbxT0UT.Text             = AstroUtilities.JDToDateTimeUtc(Results.Time_Of_Minimum_JD).ToString("dd MMM yyyy, HH:mm:ss.fff");
            tbxT0Uncertainty.Text    = Results.Time_Of_Minimum_Uncertainty.ToString("0.000000");
            tbxT0.Text               = Results.T0.ToString("0.000000");
            tbxTotalObs.Text         = Results.NumberObservations.ToString();
            tbxIncludedObs.Text      = Results.IncludedObservations.ToString() + "%";
            tbxUncertaintyInSec.Text = (Results.Time_Of_Minimum_Uncertainty * 86400.0).ToString("0.0");

            PlotKweeVanWoerden();


            if (PolyResults != null)
            {
                tbxT0JD_CF.Text = PolyResults.Time_Of_Minimum_JD.ToString("0.000000");
                tbxT0UT_CF.Text = AstroUtilities.JDToDateTimeUtc(PolyResults.Time_Of_Minimum_JD).ToString("dd MMM yyyy, HH:mm:ss.fff");

                nudM0.Value = (decimal)PolyResults.M0;
                nudC.Value  = (decimal)PolyResults.C;
                nudD.Value  = (decimal)PolyResults.D;
                nudG.Value  = (decimal)PolyResults.G;

                PlotPolyFit();
            }
        }