public frm2DPeakProcessing()
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            //
            // TODO: Add any constructor code after InitializeComponent call
            //
            mobj_raw_data = null;
            Init();
        }
Exemple #2
0
 private void Init()
 {
     try
     {
         var shape = new PNNL.Controls.DiamondShape(3, false);
         mobj_tic_plt_params       = new PNNL.Controls.clsPlotParams(shape, Color.Red, false, true, true);
         mobj_bpi_plt_params       = new PNNL.Controls.clsPlotParams(shape, Color.Blue, false, true, true);
         m_tic_chart_data_provider = new PNNL.Controls.ArrayChartDataProvider();
         m_bpi_chart_data_provider = new PNNL.Controls.ArrayChartDataProvider();
         mobjRawData = new DeconToolsV2.Readers.clsRawData();
     }
     catch (Exception ex)
     {
         MessageBox.Show(this, ex.Message);
     }
 }
        private void LinkRawFile()
        {
            var selectRawFile = new frmSelectRaw();

            if (mobj_results.FileType != DeconToolsV2.Readers.FileType.UNDEFINED)
            {
                selectRawFile.FileType = mobj_results.FileType;
                selectRawFile.FileName = mobj_results.FileName;
            }
            selectRawFile.Text = "Please Select a Raw File";
            if (selectRawFile.ShowDialog() == DialogResult.Cancel)
            {
                return;
            }
            mobj_raw_data         = new DeconToolsV2.Readers.clsRawData(selectRawFile.FileName, selectRawFile.FileType);
            mctl_spectrum.RawData = mobj_raw_data;
        }
Exemple #4
0
        private void Init()
        {
            try
            {
                mctl_spectrum      = new ctlMassSpectrum();
                mctl_spectrum.Dock = DockStyle.Fill;
                panel1.Controls.Add(mctl_spectrum);
                mctl_spectrum.Mediator          = mMediator;
                mctl_spectrum.mevntScanChanged += new Decon2LS.ctlMassSpectrum.ScanChangedEventHandler(mctl_spectrum_mevntScanChanged);

                marr_tic_values = new float[1];
                marr_scan_times = new float[1];

                this.m_tic_current_scan_pen_provider      = new PenProvider();
                m_tic_current_scan_pen_provider.DashStyle = System.Drawing.Drawing2D.DashStyle.Dash;

                var shape = new PNNL.Controls.DiamondShape(3, false);
                mobj_tic_plt_params = new PNNL.Controls.clsPlotParams(shape, Color.DarkSlateGray, false, true, true);

                this.KeyDown               += new KeyEventHandler(frmSpectra_KeyDown);
                this.mctl_tic.KeyDown      += new KeyEventHandler(frmSpectra_KeyDown);
                this.mctl_spectrum.KeyDown += new KeyEventHandler(frmSpectra_KeyDown);

                mint_spectrum_num = -1;

                this.m_tic_chart_data_provider = new ArrayChartDataProvider();
                this.mobj_tic_series           = new clsSeries(this.m_tic_chart_data_provider, this.mobj_tic_plt_params);
                this.mctl_tic.SeriesCollection.Add(mobj_tic_series);

                // Set category info
                this.Category        = new CategoryInfo[] { frmSpectra.MainCategory, new CategoryInfo("Unopened") };
                this.CategorizedText = "Unopened";

                mobjRawData = new DeconToolsV2.Readers.clsRawData();

                mctl_tic.DefaultZoomHandler.SingleClickNoZoomPerformed += new SingleClickNoZoomHandler(TicDefaultZoomHandler_SingleClickNoZoomPerformed);

                this.frmSpectra_Resize(this, null);
            }
            catch (Exception ex)
            {
                MessageBox.Show(this, ex.Message);
            }
        }
Exemple #5
0
        public BrukerV2Run(string folderName)
            : this()
        {
            validateSelectionIsFolder(folderName);
            DatasetFileOrDirectoryPath = folderName;

            var serFileInfo = findSerFile();
            var fidFileInfo = findFIDFile();

            string filePathForDeconEngine;

            if (serFileInfo == null && fidFileInfo == null)
            {
                throw new FileNotFoundException("Run initialization problem. Could not find a 'ser' or 'fid' file within the directory structure.");
            }

            //if there is a ser file, 'fid' files will be ignored.
            if (serFileInfo != null)
            {
                filePathForDeconEngine = serFileInfo.FullName;
            }
            else if (serFileInfo == null && fidFileInfo != null)
            {
                filePathForDeconEngine = fidFileInfo.FullName;
            }
            else
            {
                throw new FileNotFoundException("Run initialization problem. Could not find a 'ser' or 'fid' file within the directory structure.");
            }

            var settingsfileInfo = findSettingsFile();

            if (settingsfileInfo == null)
            {
                throw new FileNotFoundException("Run initialization problem. Could not find the settings file ('apexAcquisition.method') within the directory structure.");
            }

            SettingsFilePath = settingsfileInfo.FullName;

            DatasetName          = GetDatasetName(DatasetFileOrDirectoryPath);
            DatasetDirectoryPath = GetDatasetFolderName(DatasetFileOrDirectoryPath);

            loadSettings(SettingsFilePath);

            try
            {
                rawData = new DeconToolsV2.Readers.clsRawData();
                rawData.LoadFile(filePathForDeconEngine, DeconToolsV2.Readers.FileType.BRUKER);
            }
            catch (Exception ex)
            {
                throw new Exception("ERROR:  Couldn't open the file.  Details: " + ex.Message);
            }

            Check.Ensure(rawData != null, "Run initialization problem. Details:  DeconEngine tried to load the file but failed.");

            applySettings();
            Check.Ensure(rawData != null, "Run initialization problem. Details:  Run was loaded but after FFT settings were applied, there was a problem.");


            MinLCScan = GetMinPossibleLCScanNum();        //  remember that DeconEngine is 1-based
            MaxLCScan = GetMaxPossibleLCScanNum();

            Check.Ensure(MaxLCScan != 0, "Run initialization problem. Details:  When initializing the run, the run's maxScan was determined to be '0'. Probably a run accessing error.");
        }