コード例 #1
0
        public ChartSizeDistribution(String _cruise,
                                     String _station,
                                     String _deployment,
                                     PicesClass _classToPlot,
                                     PicesClassList _classes,
                                     PicesClassList _activeClasses,
                                     String _rootDir
                                     )
        {
            cruise        = _cruise;
            station       = _station;
            deployment    = _deployment;
            classToPlot   = _classToPlot;
            classes       = _classes;
            activeClasses = _activeClasses;
            rootDir       = _rootDir;

            lastSaveDirectory = OSservices.AddSlash(PicesSipperVariables.PicesReportDir()) + "AbundanceReports";

            statusMsgs = new PicesMsgQueue("ChartSizeDistribution-StatusMsgs");
            msgQueue   = new PicesMsgQueue("ChartSizeDistribution-RunLog");
            runLog     = new PicesRunLog(msgQueue);

            mainWinConn = PicesDataBase.GetGlobalDatabaseManagerNewInstance(runLog);

            configFileName = OSservices.AddSlash(PicesSipperVariables.ConfigurationDirectory()) + "ChartSizeDistribution.cfg";

            InitializeComponent();
        }
コード例 #2
0
        public ChartAbundanceByDeployment(String _cruise,
                                          String _station,
                                          String _deployment,
                                          PicesClass _classToPlot,
                                          int _sizeMin,
                                          int _sizeMax,
                                          float _probMin,
                                          float _probMax,
                                          float _depthMin,
                                          float _depthMax,
                                          char _classKeyToUse,
                                          PicesClassList _classes,
                                          PicesClassList _activeClasses,
                                          String _rootDir
                                          )
        {
            cruise        = _cruise;
            station       = _station;
            deployment    = _deployment;
            classToPlot   = _classToPlot;
            sizeMin       = _sizeMin;
            sizeMax       = _sizeMax;
            probMin       = _probMin;
            probMax       = _probMax;
            depthMin      = _depthMin;
            depthMax      = _depthMax;
            classKeyToUse = _classKeyToUse;
            classes       = _classes;
            activeClasses = _activeClasses;
            rootDir       = _rootDir;

            if ((sizeMin > 0) && (sizeMax <= 0))
            {
                sizeMax = int.MaxValue;
            }
            if ((probMin >= 0.0f) && (probMax <= 0.0f))
            {
                probMax = 1.0f;
            }
            if ((depthMin > 0.0f) && (depthMax <= 0.0f))
            {
                depthMax = float.MaxValue;
            }

            filterSize  = (sizeMin > 0) || ((sizeMax > 0) && (sizeMax > sizeMin));
            filterProb  = ((probMin > 0.0f) || (probMax < 1.0f)) && (probMax > probMin);
            filterDepth = ((depthMax > 0) && (depthMax > depthMin));

            statusMsgs = new PicesMsgQueue("ChartAbundanceByDeployment-StatusMsgs");
            msgQueue   = new PicesMsgQueue("ChartAbundanceByDeployment-RunLog");
            runLog     = new PicesRunLog(msgQueue);

            mainWinConn = PicesDataBase.GetGlobalDatabaseManagerNewInstance(runLog);

            configFileName = OSservices.AddSlash(PicesSipperVariables.ConfigurationDirectory()) + "ChartAbundanceByDeployment.cfg";

            BuildCriteriaString();

            InitializeComponent();
        }
コード例 #3
0
        } /* ForceCancelation */

        private void  LogMessagesAdd(String msg)
        {
            if (logMessages == null)
            {
                logMessages = new PicesMsgQueue("TrainingModelStatus");
            }
            logMessages.AddMsg(msg);
        }
コード例 #4
0
        private List <String> imageFileErrorList = null;         // Will contain a list of Image File Names that could not be inserted.



        public ImportGroupAssignments()
        {
            runLogMsgQueue = new PicesMsgQueue("ImportGroupAssignemnts");
            runLog         = new PicesRunLog(runLogMsgQueue);
            mainWinConn    = PicesDataBase.GetGlobalDatabaseManagerNewInstance(runLog);

            InitializeComponent();

            SourceDirectory.Text = PicesSipperVariables.HomeDir();
        }
コード例 #5
0
        public SaveRawCTDData(String _sipperFileName)
        {
            sipperFileName = _sipperFileName;
            InitializeComponent();
            msgQueue = new PicesMsgQueue("SaveRawCtdData");
            runLog   = new PicesRunLog(msgQueue);

            SipperFileName.Text = sipperFileName;
            ctdFileName         = OSservices.RemoveExtension(sipperFileName) + "_ctdData.txt";
            CtdFileName.Text    = ctdFileName;
        }
コード例 #6
0
ファイル: ChartGPSByStation.cs プロジェクト: PalakDave/Pices
        public ChartGPSByStation(String _stationName)
        {
            stationName = _stationName;

            statusMsgs = new PicesMsgQueue("ChartGPSByStation-StatusMsgs");
            msgQueue   = new PicesMsgQueue("ChartGPSByStation-RunLog");
            runLog     = new PicesRunLog(msgQueue);

            mainWinConn = PicesDataBase.GetGlobalDatabaseManagerNewInstance(runLog);

            configFileName = OSservices.AddSlash(PicesSipperVariables.ConfigurationDirectory()) + "ChartGPSByStation.cfg";

            InitializeComponent();
        }
コード例 #7
0
        public GetRunTimeParameters()
        {
            msgQueue = new PicesMsgQueue("GradeTrainingModel");
            runLog   = new PicesRunLog(msgQueue);

            InitializeComponent();
            noAgreementClass = PicesClassList.GetUniqueClass("NoAgreement", "");

            configFileName = OSservices.AddSlash(PicesSipperVariables.ConfigurationDirectory()) + "GradeTrainingModel.txt";

            LoadTrainingModelComboBox();
            InitializeTrainAndPredLevelFields();
            EnableComponentsForParameterEntry();
        }
コード例 #8
0
        } /* ReadNextScanLine */

        public void  SaveRawCtdData(StreamWriter sw,
                                    PicesMsgQueue msgQueue,
                                    ref bool successful
                                    )
        {
            ulong  bytesRead    = 0;
            ulong  bytesWritten = 0;
            ushort rec          = GetNextRecord();

            ulong tenMeg = 10 * 1024 * 1024;

            while (!eof)
            {
                bytesRead += 2;

                if ((msgQueue != null) && ((bytesRead % tenMeg) == 0))
                {
                    msgQueue.AddMsg("Bytes Read: " + bytesRead.ToString("##,###,###,##0") + "\t" +
                                    "Ctd-Data-Written: " + bytesWritten.ToString("##,###,###,##0")
                                    );
                }

                //if  (bytesRead >=  377711000)
                {
                    Sipper3DecodeRec dr = decodeRecs[rec];
                    if (!dr.ImageData())
                    {
                        byte deviceId = dr.SensorNum();
                        if ((deviceId == 16) && dr.Text())
                        {
                            sw.Write(dr.SensorData());
                            ++bytesWritten;
                        }
                    }
                }
                rec = GetNextRecord();
            }

            if (msgQueue != null)
            {
                msgQueue.AddMsg("");
                msgQueue.AddMsg("Done Scanning");
                msgQueue.AddMsg("Bytes Read: " + bytesRead.ToString("##,###,###,##0") + "\t" +
                                "Ctd-Data-Written: " + bytesWritten.ToString("##,###,###,##0")
                                );
            }

            successful = true;
        } /* SaveRawCtdData */
コード例 #9
0
        public ImportImagesIntoDeployment(String _cruiseName,
                                          String _stationName,
                                          String _deploymentNum
                                          )
        {
            msgQueue = new PicesMsgQueue("ImportImagesIntoDeployment");
            runLog   = new PicesRunLog(msgQueue);

            cruiseName    = _cruiseName;
            stationName   = _stationName;
            deploymentNum = _deploymentNum;

            mainWinConn = PicesDataBase.GetGlobalDatabaseManagerNewInstance(runLog);

            unknownClass = GetClassFromName(mainWinConn, "UnKnown");

            configFileName = OSservices.AddSlash(PicesSipperVariables.ConfigurationDirectory()) + "ImportImagesIntoDeployment.cfg";

            InitializeComponent();
            //SourceDirectory.Text = PicesSipperVariables.HomeDir ();
        }
コード例 #10
0
ファイル: Harvester.cs プロジェクト: PalakDave/Pices
        public Harvester(String _cruise,
                         String _station,
                         String _deployment,
                         String _sipperFileName,
                         PicesClass _selClass,
                         char _classKeyToUse,
                         int _sizeMin,
                         int _sizeMax
                         )
        {
            cruise         = (_cruise == null) ? "" : _cruise;
            station        = (_station == null) ? "" : _station;
            deployment     = (_deployment == null) ? "" : _deployment;
            sipperFileName = (_sipperFileName == null) ? "" : _sipperFileName;
            classKeyToUse  = _classKeyToUse;
            selClass       = _selClass;

            sizeMin = _sizeMin;
            sizeMax = _sizeMax;

            runLogMsgQueue = new PicesMsgQueue("Harvester");
            runLog         = new PicesRunLog(runLogMsgQueue);

            mainWinConn = PicesDataBase.GetGlobalDatabaseManagerNewInstance(runLog);

            InitializeComponent();

            if (String.IsNullOrEmpty(cruise))
            {
                DateTime d = DateTime.Now;
                groupName = "Created_" + d.Year.ToString("0000") + "-" + d.Month.ToString("00") + "-" + d.Day.ToString("00") + "_" +
                            d.Hour.ToString("00") + "-" + d.Minute.ToString("00");
            }
            else
            {
                groupName = "Cruise-" + cruise;
                if (!String.IsNullOrEmpty(station))
                {
                    groupName += "_Station-" + station;
                }
                if (!String.IsNullOrEmpty(deployment))
                {
                    groupName += "_Deployment-" + deployment;
                }
                if (!String.IsNullOrEmpty(sipperFileName))
                {
                    groupName += "_SipperFile-" + sipperFileName;
                }
            }

            if (selClass != null)
            {
                if (String.IsNullOrEmpty(groupName))
                {
                    groupName = selClass.Name;
                }
                else
                {
                    groupName += "_Class-" + selClass.Name;
                }
            }

            String sizeMaxStr = sizeMax.ToString();

            if (sizeMax == 0)
            {
                sizeMaxStr = infinityStr;
            }

            Cruise.Text         = cruise;
            Station.Text        = station;
            Deployment.Text     = deployment;
            SipperFileName.Text = sipperFileName;
            MinimumDepth.Text   = minimumDepth.ToString("##0.00");
            GroupName.Text      = groupName;
            SizeRange.Text      = sizeMin.ToString() + " - " + sizeMaxStr;

            if (selClass != null)
            {
                SelectedClass.Text = selClass.Name;
            }

            UpdateCriteriaFields();
        }