Exemplo n.º 1
0
        public frmLightCurve(LightCurveController controller, AddinsController addinsController)
        {
            InitializeComponent();

            m_LightCurveController = controller;
            m_AddinsController = addinsController;

            // Not implemented yet, may be one day ...
            miFullReprocess.Visible = false;

            m_DisplaySettings.Load();
            m_DisplaySettings.Initialize();

            picTarget1Pixels.Image = new Bitmap(34, 34);
            picTarget2Pixels.Image = new Bitmap(34, 34);
            picTarget3Pixels.Image = new Bitmap(34, 34);
            picTarget4Pixels.Image = new Bitmap(34, 34);
            picTarget1PSF.Image = new Bitmap(34, 34);
            picTarget2PSF.Image = new Bitmap(34, 34);
            picTarget3PSF.Image = new Bitmap(34, 34);
            picTarget4PSF.Image = new Bitmap(34, 34);

            miIncludeObject.Image = new Bitmap(15, 15);
            m_SmallGraph = null;

            pnlChart.Paint += new PaintEventHandler(pnlChart_Paint);
            pnlSmallGraph.Paint += new PaintEventHandler(pnlSmallGraph_Paint);

            Text = "Light Curves";

            Top = 100; Left = 100; // Default values for the very first time

            PositionMemento.LoadControlPosition(this);

            miAddins.Visible = false;
            miAddins.DropDownItems.Clear();
        }
Exemplo n.º 2
0
        internal frmLightCurve(LightCurveController controller, AddinsController addinsController, LCFile lcFile, string lcFilePath)
            : this(controller, addinsController)
        {
            m_LCFile = lcFile;
            m_LCFilePath = lcFilePath;
            m_Header = lcFile.Header;
            m_Header.LcFile = lcFile;
            m_Footer = lcFile.Footer;
            m_FrameTiming = lcFile.FrameTiming;

            Text = "Light Curves - " + Path.GetFileName(lcFilePath);

            OnNewLCFile();
        }
Exemplo n.º 3
0
        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);
        }
Exemplo n.º 4
0
        internal ReduceLightCurveOperation(LightCurveController lightCurveController, bool debugMode)
        {
            m_LightCurveController = lightCurveController;
            m_DebugMode = debugMode;

            m_DisplaySettings = new TangraConfig.LightCurvesDisplaySettings();
            m_DisplaySettings.Load();
            m_DisplaySettings.Initialize();
        }
Exemplo n.º 5
0
        internal frmZoomedPixels(LightCurveContext context, LCFile lcFile, TangraConfig.LightCurvesDisplaySettings displaySettings, LightCurveController lightcurveController)
        {
            InitializeComponent();

            m_Context = context;
            m_LCFile = lcFile;
            m_DisplaySettings = displaySettings;
            m_LightcurveController = lightcurveController;

            m_Saturation = TangraConfig.Settings.Photometry.Saturation.GetSaturationForBpp(context.BitPix, context.MaxPixelValue);

            picTarget1Pixels.Image = new Bitmap(picTarget1Pixels.Width, picTarget1Pixels.Height);
            picTarget2Pixels.Image = new Bitmap(picTarget2Pixels.Width, picTarget2Pixels.Height);
            picTarget3Pixels.Image = new Bitmap(picTarget3Pixels.Width, picTarget3Pixels.Height);
            picTarget4Pixels.Image = new Bitmap(picTarget4Pixels.Width, picTarget4Pixels.Height);

            m_AllObjectsPeak = 0;

            if (lcFile.Footer.ReductionContext.BitPix <= 8)
            {
                lblDisplayBandTitle.Text = "Displayed Band:";
                lblDisplayedBand.Text = lcFile.Footer.ReductionContext.ColourChannel.ToString();
            }
            else
            {
                lblDisplayBandTitle.Text = "Digital Video";
                lblDisplayedBand.Text = "";
            }

            m_TargetBoxes = new PictureBox[] { picTarget1Pixels, picTarget2Pixels, picTarget3Pixels, picTarget4Pixels };

            for (int i = 0; i < m_TargetBoxes.Length; i++)
            {
                warningProvider.SetIconAlignment(m_TargetBoxes[i], ErrorIconAlignment.TopLeft);
                warningProvider.SetIconPadding(m_TargetBoxes[i], -17-16);

                infoProvider.SetIconAlignment(m_TargetBoxes[i], ErrorIconAlignment.TopLeft);
                infoProvider.SetIconPadding(m_TargetBoxes[i], -17);
            }

            for (int i = 0; i < m_LCFile.Footer.TrackedObjects.Count; i++)
            {
                TrackedObjectConfig cfg = m_LCFile.Footer.TrackedObjects[i];

                m_ObjectinGroup[i] = cfg.GroupId >=0 && m_LCFile.Footer.TrackedObjects.Count(x => x.GroupId == cfg.GroupId) > 1;

                switch(cfg.TrackingType)
                {
                    case TrackingType.OccultedStar:
                        m_ObjectTitles.Add(i, "Occulted");
                        break;

                    case TrackingType.GuidingStar:
                        m_ObjectTitles.Add(i, "Guiding");
                        break;

                    case TrackingType.ComparisonStar:
                        m_ObjectTitles.Add(i, "No Guiding");
                        break;
                }
            }
        }