예제 #1
0
        internal ucCalibrationPanel(AstrometryController astrometryController, VideoController videoController, IPlateCalibrationTool configTool)
        {
            InitializeComponent();

            m_AstrometryController = astrometryController;
            m_VideoController = videoController;
            m_CalibrationTool = configTool;
            m_CalibrationTool.AreaChanged += m_CalibrationTool_AreaChanged;

            pnlDebugFits.Visible = false;

            m_AstrometryController.RegisterCalibrationRunner(this);

            rbIdentify3Stars.Checked = true;
            UpdateEnabledStateOfScrollControls();

            m_InitialPixelmap = m_VideoController.GetCurrentAstroImage(false).Pixelmap;
            m_VideoController.ApplyDisplayModeAdjustments(m_InitialPixelmap.DisplayBitmap, false, m_InitialPixelmap);

            m_CalibrationTool.ActivateOsdAreaSizing();

            rbInclusion.Checked = TangraConfig.Settings.PlateSolve.SelectedScopeRecorderConfig.IsInclusionArea;
        }
        internal frmRunMultiFrameMeasurements(
			VideoController videoController, 
            AstrometryController astrometryController,
            AddinsController addinsController, 
            VideoAstrometryOperation astrometry, 
            MeasurementContext measurementContext, 
            FieldSolveContext fieldSolveContext,
            out List<ITangraAddinAction> astrometryAddinActions, 
            out List<ITangraAddin> astrometryAddins)
        {
            InitializeComponent();

            pboxAperturePreview.Image = new Bitmap(pboxAperturePreview.Width, pboxAperturePreview.Height, PixelFormat.Format24bppRgb);

            m_VideoController = videoController;
            m_AddinsController = addinsController;
            m_AstrometryController = astrometryController;

            m_VideoAstrometry = astrometry;
            m_MeasurementContext = measurementContext;
            m_FieldSolveContext = fieldSolveContext;

            SyncTimeStampControlWithExpectedFrameTime();
            nudMinStars.SetNUDValue(TangraConfig.Settings.Astrometry.MinimumNumberOfStars);

            m_MeasurementContext.MaxMeasurements = 200;

            #region Configure the Reduction Settings. The same must be done in the frmConfigureReprocessing and frmSelectReductionType
            // Removes the Background Gradient
            cbxBackgroundMethod.Items.RemoveAt(2);
            #endregion

            SetComboboxIndexFromPhotometryReductionMethod(TangraConfig.Settings.LastUsed.AstrometryPhotometryReductionMethod);
            SetComboboxIndexFromBackgroundMethod(TangraConfig.Settings.LastUsed.AstrometryPhotometryBackgroundMethod);
            cbxFitMagnitudes.Checked = TangraConfig.Settings.LastUsed.AstrometryFitMagnitudes;

            if (TangraConfig.Settings.LastUsed.AstrometryMagFitAperture.HasValue &&
                TangraConfig.Settings.LastUsed.AstrometryMagFitGap.HasValue &&
                TangraConfig.Settings.LastUsed.AstrometryMagFitAnnulus.HasValue)
            {
                nudAperture.ValueChanged -= nudAperture_ValueChanged;
                try
                {
                    nudAperture.SetNUDValue(TangraConfig.Settings.LastUsed.AstrometryMagFitAperture.Value);
                    nudGap.SetNUDValue(TangraConfig.Settings.LastUsed.AstrometryMagFitGap.Value);
                    nudAnnulus.SetNUDValue(TangraConfig.Settings.LastUsed.AstrometryMagFitAnnulus.Value);
                }
                finally
                {
                    nudAperture.ValueChanged += nudAperture_ValueChanged;
                }
            }
            else
                ResetAperture();

            cbxOutputMagBand.SelectedIndex = (int)TangraConfig.Settings.Astrometry.DefaultMagOutputBand;

            lblCatBand.Text = string.Format("Magnitude Band for Photometry (from {0})", m_FieldSolveContext.StarCatalogueFacade.CatalogNETCode);
            cbxCatalogPhotometryBand.Items.Clear();
            cbxCatalogPhotometryBand.Items.AddRange(m_FieldSolveContext.StarCatalogueFacade.CatalogMagnitudeBands);
            CatalogMagnitudeBand defaultBand = cbxCatalogPhotometryBand.Items.Cast<CatalogMagnitudeBand>().FirstOrDefault(e => e.Id == TangraConfig.Settings.StarCatalogue.CatalogMagnitudeBandId);
            if (defaultBand != null)
                cbxCatalogPhotometryBand.SelectedItem = defaultBand;
            else
                cbxCatalogPhotometryBand.SelectedIndex = 0;

            cbxExpectedMotion.SelectedIndex = 1;
            cbxSignalType.Visible = false;
            cbxSignalType.SelectedIndex = 0;
            cbxFrameTimeType.SelectedIndex = 0;
            pnlIntegration.Visible = false;
            cbxInstDelayUnit.SelectedIndex = 0;

            m_AstrometryAddinActions = m_AddinsController.GetAstrometryActions(out m_AstrometryAddins);

            foreach (ITangraAddinAction action in m_AstrometryAddinActions)
            {
                clbAddinsToRun.Items.Add(new AddinActionEntry(action));
            }
            astrometryAddinActions = m_AstrometryAddinActions;
            astrometryAddins = m_AstrometryAddins;

            cbxInstDelayCamera.Items.Clear();
            cbxInstDelayCamera.Items.Add(string.Empty);
            cbxInstDelayCamera.Items.AddRange(InstrumentalDelayConfigManager.GetAvailableCameras().ToArray());

            m_Initialised = true;
        }
예제 #3
0
 internal FastAsteroidTracker(AstrometryController astrometryController, MeasurementContext measurementContext)
 {
     m_AstrometryController = astrometryController;
     m_MeasurementContext = measurementContext;
 }
 public SelectAstrometricObjectTool(AstrometryController astrometryController, VideoController videoController)
 {
     m_AstrometryController = astrometryController;
     m_VideoController = videoController;
 }
예제 #5
0
        public ucAstrometryObjectInfo(AstrometryController astrometryController, VideoController videoController)
        {
            InitializeComponent();

            m_AstrometryController = astrometryController;
            m_VideoController = videoController;

            m_AstrometryController.Subscribe(this, typeof(OperationNotifications));

            pbPSFFit.Image = new Bitmap(pbPSFFit.Width, pbPSFFit.Height);
            m_FullRect = new Rectangle(0, 0, pbPSFFit.Width, pbPSFFit.Height);

            m_RAImage = new Bitmap(pnlRASeries.Width, pnlRASeries.Height);
            m_DEImage = new Bitmap(pnlDESeries.Width, pnlDESeries.Height);

            m_AstrometricState = AstrometricState.EnsureAstrometricState();

            m_CurrentReportFile = AstrometryContext.Current.CurrentReportFile;

            btnResolveObjects.Visible = false;
            btnSaveUnitTestData.Visible = false;

            #if GET_UNIT_TEST_DATA
            btnResolveObjects.Visible = true;
            btnSaveUnitTestData.Visible = true;
            #endif
        }
예제 #6
0
 protected CalibrationToolBase(AstrometryController astrometryController, VideoController videoController)
 {
     m_AstrometryController = astrometryController;
     m_VideoController = videoController;
 }
예제 #7
0
파일: frmMain.cs 프로젝트: hpavlov/tangra3
        public frmMain()
        {
            InitializeComponent();

            TangraConfig.Load(ApplicationSettingsSerializer.Instance);

            m_VideoFileView = new VideoFileView(this);
            m_ImageToolView = new ImageToolView(this);
            m_ZoomedImageView = new ZoomedImageView(zoomedImage, this);

            m_VideoController = new VideoController(this, m_VideoFileView, m_ZoomedImageView, m_ImageToolView, pnlControlerPanel);
            m_AddinsController = new AddinsController(this, m_VideoController);
            m_VideoController.OcrExtensionManager = new OcrExtensionManager(m_AddinsController);

            m_LongOperationsManager = new LongOperationsManager(this, m_VideoController);

            m_LightCurveController = new LightCurveController(this, m_VideoController, m_AddinsController);
            m_MakeDarkFlatController = new DarkFlatFrameController(this, m_VideoController);
            m_ConvertVideoToFitsController = new ConvertVideoToFitsController(this, m_VideoController);
            m_ConvertVideoToAavController = new ConvertVideoToAavController(this, m_VideoController);
            m_AstrometryController = new AstrometryController(m_VideoController, m_LongOperationsManager);
            m_SpectroscopyController = new SpectroscopyController(this, m_VideoController);
            m_AutoUpdatesController = new AutoUpdatesController(this, m_VideoController);

            NotificationManager.Instance.SetVideoController(m_VideoController);

            m_VideoController.SetLightCurveController(m_LightCurveController);
            m_VideoController.SetAddinsController(m_AddinsController);

            BuildRecentFilesMenu();

            m_AddinsController.LoadAddins();

            #if !WIN32
            miVideoModelling.Visible = false;
            #endif
            m_AutoUpdatesController.CheckForUpdates(false);
        }
예제 #8
0
        internal PlateCalibrationTool(AstrometryController astrometryController, VideoController videoController, bool debugMode)
            : base(astrometryController, videoController)
        {
            m_AstrometryController.Subscribe(this, typeof(OperationNotifications));
            m_State = FittingsState.Configuring;

            m_DebugMode = debugMode;

            m_OSDExcluderTool = new OSDExcluder(videoController);
            m_OSDExcluderTool.AreaChanged += m_OSDExcluderTool_AreaChanged;

            if (m_PlatesolveController == null)
                m_PlatesolveController = new ucCalibrationPanel(astrometryController, videoController, this);
        }