public StartAstrometricMeasurementsEventArgs(MeasurementContext context) { Context = context; }
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; }
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; }