示例#1
0
        public override enExperimentStatus Configure(IExperiment parent, string resultsFilePath)
        {
            FBC                    = new FeedbackController(log);
            FBC.Settings           = Settings.FeedbackController;
            FBC.FBPositionUpdated += FBC_FBPositionUpdated;

            if (!FBC.Initialize().HasFlag(enuFeedbackStatusFlags.Ready))
            {
                return(enExperimentStatus.Error);
            }
            this.parent     = parent;
            ResultsFilePath = resultsFilePath;
            string cords = "";
            ExperimentContainer container = parent as ExperimentContainer;

            this.parent = parent;

            if (container != null)
            {
                cords = container.ChildIndexer();
                if (cords != "")
                {
                    cords = " " + cords;
                }
            }

            ResultsFileName = "AutoapproachExperiment - " + Name + cords + ".dat";

            TransducerChannel signalChan = FBC.Settings.TransducerChannels[FBC.Settings.Channel];

            string headerString = "Experiment: AutoapproachExperiment - " + Name + "\r\n";

            string unit = (signalChan.Prefix == enuPrefix.none) ? signalChan.Unit : signalChan.Prefix + signalChan.Unit;

            string[] dataColumnHeaders = new string[] { "Z-Position [µm]", signalChan.Name + " [" + unit + "]" };

            headerString += "Positioner: " + FBC.Settings.Positioner + "\r\n";
            headerString += "Sensor: " + FBC.Settings.Channel + "\r\n";
            writeHeader(headerString, dataColumnHeaders.ToArray(), settingsObj: Settings, positionColumns: false, timeColumn: true);

            // Init ResultData
            experimentData = new Generic2DExperimentData();
            experimentData.axisNames.Add(new string[] { "Z-Position", signalChan.Name });
            experimentData.axisUnits.Add(new string[] { "µm", unit });
            experimentData.data.Add(new double[2][]);
            signalData   = new List <double>(128);
            positionData = new List <double>(128);
            experimentData.datasetNames.Add("Autoapproach");

            experimentData_PA = new Generic2DExperimentData();
            experimentData_PA.axisNames.Add(new string[] { "Time", signalChan.Name });
            experimentData_PA.axisUnits.Add(new string[] { "s", unit });
            experimentData_PA.data.Add(new double[2][]);
            signalData_PA = new List <double>(128);
            timeData_PA   = new List <double>(128);
            experimentData_PA.datasetNames.Add("Post approach");

            status = enExperimentStatus.Idle;
            return(status);
        }
示例#2
0
        public void MoveExperimentInScanMethodDecLevel(TreeNodeCollection addInMe, TreeNode expNode)
        {
            if ((expNode != null) && (expNode.Parent != null) &&
                (typeof(ExperimentContainer).IsAssignableFrom(expNode.Parent.Tag.GetType())))
            {
                // Inside a container
                ExperimentContainer container  = expNode.Parent.Tag as ExperimentContainer;
                TreeNode            parentNode = expNode.Parent;

                // Is level2 or higher?
                if ((parentNode.Parent != null) && (typeof(ExperimentContainer).IsAssignableFrom(parentNode.Parent.Tag.GetType())))
                {
                    ExperimentContainer ppContainer = parentNode.Parent.Tag as ExperimentContainer;
                    TreeNode            ppNode      = parentNode.Parent;

                    container.Remove(expNode.Tag as IExperiment);
                    ppContainer.Insert(parentNode.Index + 1, expNode.Tag as IExperiment);
                    parentNode.Nodes.Remove(expNode);
                    ppNode.Nodes.Insert(parentNode.Index + 1, expNode);
                }
                else
                {
                    container.Remove(expNode.Tag as IExperiment);
                    scanMethod.Insert(parentNode.Index + 1, expNode.Tag as IExperiment);
                    parentNode.Nodes.Remove(expNode);
                    addInMe.Insert(parentNode.Index + 1, expNode);
                }
            }
        }
示例#3
0
        public ReportDialog(ProjectContainer project, ExperimentContainer experiment,
                            ObservableCollection <ExperimentIndicatorContainer> expIndicatorList)
        {
            m_project          = project;
            m_experiment       = experiment;
            m_expIndicatorList = expIndicatorList;

            VM     = new ViewModel_ReportDialog();
            m_wgDB = new WaveguideDB();

            m_reportWriter = new ReportWriter(m_project, m_experiment);

            InitializeComponent();

            this.DataContext = VM;

            VM.Directory = GlobalVars.DefaultReportFileDirectory;

            VM.Filename = m_reportWriter.GetDefaultFilename();

            WaveGuideRB.IsChecked = true;
            VM.ReportFormat       = REPORT_FILEFORMAT.WAVEGUIDE;

            SetAnalysisList();


            bool ok = m_reportWriter.SuccessfullyInitialized();

            if (!ok)
            {
                string errMsg = m_reportWriter.GetLastErrorString();
                System.Windows.MessageBox.Show("Error initializing the Report Writer: " +
                                               errMsg, "Error", MessageBoxButton.OK, MessageBoxImage.Error);
            }
        }
示例#4
0
 public void MoveExperimentInScanMethodIncLevel(TreeNodeCollection addInMe, TreeNode expNode)
 {
     if ((expNode != null) && (expNode.Parent == null) && (expNode.Index > 0) &&
         (typeof(ExperimentContainer).IsAssignableFrom(addInMe[expNode.Index - 1].Tag.GetType())))
     {
         // Not in container and below a container item
         ExperimentContainer newContainer = addInMe[expNode.Index - 1].Tag as ExperimentContainer;
         TreeNode            newParent    = addInMe[expNode.Index - 1];
         scanMethod.Remove(expNode.Tag as IExperiment);
         newContainer.Add(expNode.Tag as IExperiment);
         addInMe.Remove(expNode);
         newParent.Nodes.Add(expNode);
     }
     else if ((expNode != null) && (expNode.Parent != null) && (typeof(ExperimentContainer).IsAssignableFrom(expNode.Parent.Tag.GetType())) &&
              (expNode.Index > 0) &&
              (typeof(ExperimentContainer).IsAssignableFrom(expNode.Parent.Nodes[expNode.Index - 1].Tag.GetType())))
     {
         // in container and below a container item
         ExperimentContainer newContainer = expNode.Parent.Nodes[expNode.Index - 1].Tag as ExperimentContainer;
         TreeNode            newParent    = expNode.Parent.Nodes[expNode.Index - 1];
         ((ExperimentContainer)expNode.Parent.Tag).Remove(expNode.Tag as IExperiment);
         newContainer.Add(expNode.Tag as IExperiment);
         expNode.Parent.Nodes.Remove(expNode);
         newParent.Nodes.Add(expNode);
     }
 }
示例#5
0
        public void Configure(ImagingParameters iParams, ProjectContainer project, PlateContainer plate, ExperimentContainer experiment,
                              MethodContainer method,
                              MaskContainer mask, PlateTypeContainer plateType,
                              ObservableCollection <ExperimentIndicatorContainer> indicatorList,
                              ObservableCollection <ExperimentCompoundPlateContainer> compoundPlateList,
                              ObservableCollection <Tuple <int, int> > controlSubtractionWellList,
                              int numFoFrames,
                              ExperimentIndicatorContainer dynamicRatioNumerator,
                              ExperimentIndicatorContainer dynamicRatioDenominator)
        {
            m_iParams                    = iParams;
            m_project                    = project;
            m_experimentPlate            = plate;
            m_experiment                 = experiment;
            m_method                     = method;
            m_mask                       = mask;
            m_plateType                  = plateType;
            m_indicatorList              = indicatorList;
            m_compoundPlateList          = compoundPlateList;
            m_controlSubtractionWellList = controlSubtractionWellList;
            m_numFoFrames                = numFoFrames;
            m_dynamicRatioNumerator      = dynamicRatioNumerator;
            m_dynamicRatioDenominator    = dynamicRatioDenominator;


            m_vworksProtocolFilename = m_method.BravoMethodFile;

            ChartArray.BuildChartArray(mask.Rows, mask.Cols, m_iParams.HorzBinning, m_iParams.VertBinning, m_indicatorList);

            Dictionary <int, ImageDisplay> idDictionary = ChartArray.GetImageDisplayDictionary();

            m_displayPipeline = m_imager.CreateDisplayPipeline(m_uiTask, idDictionary);


            m_storagePipeline = m_imager.CreateImageStoragePipeline(GlobalVars.CompressionAlgorithm, m_iParams.imageWidth, m_iParams.imageHeight);

            int numerID = 0;
            int denomID = 0;

            if (m_dynamicRatioNumerator != null)
            {
                numerID = m_dynamicRatioNumerator.ExperimentIndicatorID;
            }
            if (m_dynamicRatioDenominator != null)
            {
                denomID = m_dynamicRatioDenominator.ExperimentIndicatorID;
            }

            m_analysisPipeline = m_imager.CreateAnalysisPipeline(ChartArray, m_mask, m_iParams.imageWidth,
                                                                 m_iParams.imageHeight, m_iParams.HorzBinning, m_iParams.VertBinning,
                                                                 m_iParams.ExperimentIndicatorID, m_controlSubtractionWellList, m_numFoFrames,
                                                                 numerID, denomID);


            if (m_histogram != null)
            {
                m_histogramPipeline = m_imager.CreateHistogramPipeline(m_uiTask, m_histogram);
            }
        }
示例#6
0
        private void BuildMethodTree(IExperiment exp, TreeNodeCollection addInMe)
        {
            TreeNode curNode = new TreeNode(((ParametrizableObject)exp).Name);

            curNode.Tag = exp;
            addInMe.Add(curNode);

            if (typeof(ExperimentContainer).IsAssignableFrom(exp.GetType()))
            {
                ExperimentContainer container = exp as ExperimentContainer;
                foreach (IExperiment subexp in container)
                {
                    BuildMethodTree(subexp, curNode.Nodes);
                }
            }
        }
        public override enExperimentStatus Configure(IExperiment parent, string resultsFilePath)
        {
            // get Reference to HW from Store
            if (!HWStore.ContainsKey(Settings.HwName))
            {
                log.Error("No HW with Name: " + Settings.HwName);
                return(enExperimentStatus.Error);
            }
            hw = (PS_PalmSens)HWStore[Settings.HwName];

            ConfigureOpenCircuitPotentiometryMethod();

            // Setup Results File
            ResultsFilePath = resultsFilePath;
            string cords = "";
            ExperimentContainer container = parent as ExperimentContainer;

            this.parent = parent;

            if (container != null)
            {
                cords = container.ChildIndexer();
                if (cords != "")
                {
                    cords = " " + cords;
                }
            }

            ResultsFileName = "OpenCircuitPotentiometryExperiment - " + Name + cords + ".dat";

            string headerString = "Experiment: OpenCircuitPotentiometryExperiment - " + Name + cords + "\r\n";

            if (Settings.BiPotSettings.RecordExtraValue == ExtraValueMask.None)
            {
                // 2 columns
                writeHeader(headerString, new string[] { "Time [s]", "Potential [V]" }, settingsObj: Settings, positionColumns: false);
            }
            else
            {
                // 4 columns
                writeHeader(headerString, new string[] { "Time [s]", "Potential [V]", "Time [s]", "WE2 Potential [V]" }, settingsObj: Settings, positionColumns: false);
            }


            status = enExperimentStatus.Idle;
            return(status);
        }
示例#8
0
        public bool GetExperimentList(int plateID)
        {
#if (SIMULATE)
            m_vm.experiments.Clear();
            ExperimentContainer experiment = new ExperimentContainer();
            experiment.Description  = "experiment 1";
            experiment.ExperimentID = 1;
            experiment.HorzBinning  = 4;
            experiment.MethodID     = 1;
            experiment.PlateID      = 1;
            experiment.ROI_Height   = 256;
            experiment.ROI_Origin_X = 0;
            experiment.ROI_Origin_Y = 0;
            experiment.ROI_Width    = 256;
            experiment.TimeStamp    = DateTime.Now;
            experiment.VertBinning  = 4;
            m_vm.experiments.Add(experiment);

            experiment              = new ExperimentContainer();
            experiment.Description  = "experiment 2";
            experiment.ExperimentID = 2;
            experiment.HorzBinning  = 4;
            experiment.MethodID     = 2;
            experiment.PlateID      = 2;
            experiment.ROI_Height   = 256;
            experiment.ROI_Origin_X = 0;
            experiment.ROI_Origin_Y = 0;
            experiment.ROI_Width    = 256;
            experiment.TimeStamp    = DateTime.Now;
            experiment.VertBinning  = 4;
            m_vm.experiments.Add(experiment);

            return(true);
#else
            bool success = true;
            ObservableCollection <ExperimentContainer> experimentList;
            if (m_db.GetAllExperimentsForPlate(plateID, out experimentList))
            {
                m_vm.experiments = experimentList;
            }
            else
            {
                success = false;
            }
            return(success);
#endif
        }
示例#9
0
        public ReportWriter(ProjectContainer project, ExperimentContainer experiment)
        {
            m_initializationSuccess = false;
            m_lastErrorString       = "";

            m_waveguideReportDirectory = GlobalVars.DefaultWaveGuideReportFileDirectory;
            m_format = REPORT_FILEFORMAT.EXCEL;

            m_wgDB       = new WaveguideDB();
            m_project    = project;
            m_experiment = experiment;


            bool success = m_wgDB.GetMethod(m_experiment.MethodID, out m_method);

            if (m_method == null)
            {
                success = false;
            }
            if (success)
            {
                success = m_wgDB.GetPlate(m_experiment.PlateID, out m_plate);
                if (m_plate == null)
                {
                    success = false;
                }
                if (success)
                {
                    success = m_wgDB.GetUser(m_plate.OwnerID, out m_user);
                    if (m_user == null)
                    {
                        success = false;
                    }
                    if (success)
                    {
                        success = m_wgDB.GetPlateType(m_plate.PlateTypeID, out m_plateType);
                        if (m_plateType == null)
                        {
                            success = false;
                        }
                    }
                }
            }

            m_initializationSuccess = success;
        }
示例#10
0
    public void InitializeBlockPrefabs(ConfigurationUIManager manager, ExperimentContainer expContainer)
    {
        this.expContainer = expContainer;
        this.uiManager    = manager;

        for (int i = 0; i < Blocks.Count; i++)
        {
            Destroy(Blocks[i]);
        }

        Blocks.Clear();
        SelectedBlocks.Clear();

        List <object> per_block_type = expContainer.Data["per_block_type"] as List <object>;

        for (int i = 0; i < per_block_type.Count; i++)
        {
            GameObject g = Instantiate(BlockPrefab, Content.transform);
            g.name = "Block " + i;

            BlockComponent blckCmp = g.GetComponent <BlockComponent>();

            blckCmp.Block.GetComponentInChildren <Text>().text =
                g.name + "\n" + Convert.ToString(per_block_type[i]);

            g.transform.position = new Vector3(
                INITIAL_OFFSET + (i * BLOCK_SPACING), 0f, 0f) + transform.position;

            blckCmp.BlockController = this;
            blckCmp.BlockID         = i;

            Blocks.Add(g);

            blckCmp.Block.GetComponent <Button>().onClick.AddListener(
                () => { uiManager.OnClickBlock(g); });

            blckCmp.Block.GetComponent <Button>().onClick.AddListener(
                () => { OnClickBlock(g); });

            blckCmp.Notch.GetComponent <Button>().onClick.AddListener(
                () => { OnNotchPress(blckCmp.Notch); });
        }
    }
示例#11
0
 public void MoveExperimentInScanMethodDown(TreeNodeCollection addInMe, TreeNode expNode)
 {
     if ((expNode != null) && (expNode.Parent == null) && (expNode.Index < (scanMethod.Count - 1)))
     {
         // Not in container and Index > 0
         scanMethod.Remove(expNode.Tag as IExperiment);
         scanMethod.Insert(expNode.Index + 1, expNode.Tag as IExperiment);
         addInMe.Remove(expNode);
         addInMe.Insert(expNode.Index + 1, expNode);
     }
     else if ((expNode != null) && (expNode.Parent != null) && (typeof(ExperimentContainer).IsAssignableFrom(expNode.Parent.Tag.GetType())) && (expNode.Index < (expNode.Parent.GetNodeCount(false) - 1)))
     {
         ExperimentContainer container = expNode.Parent.Tag as ExperimentContainer;
         TreeNode            parent    = expNode.Parent;
         container.Remove(expNode.Tag as IExperiment);
         container.Insert(expNode.Index + 1, expNode.Tag as IExperiment);
         parent.Nodes.Remove(expNode);
         parent.Nodes.Insert(expNode.Index + 1, expNode);
     }
 }
示例#12
0
        /////////////////////////////
        // Private Constructor
        private ExperimentParams()
        {
            _numFoFrames                  = 5;
            _experimentPlate              = new PlateContainer();
            _experiment                   = new ExperimentContainer();
            _compoundPlateList            = new System.Collections.ObjectModel.ObservableCollection <ExperimentCompoundPlateContainer>();
            _controlSubtractionWellList   = new System.Collections.ObjectModel.ObservableCollection <Tuple <int, int> >();
            _indicatorList                = new System.Collections.ObjectModel.ObservableCollection <ExperimentIndicatorContainer>();
            _experimentRunPlateCount      = 2;
            _experimentCurrentPlateNumber = 0;

            _writeExcelReport     = true;
            _writeWaveguideReport = true;

            m_wgDB = new WaveguideDB();
            bool success = m_wgDB.GetCameraSettingsDefault(out _cameraSettings);

            if (!success)
            {
                _cameraSettings = new CameraSettingsContainer();
            }
        }
示例#13
0
        public override enExperimentStatus Configure(IExperiment parent, string resultsFilePath)
        {
            // get Reference to HW from Store
            if (!HWStore.ContainsKey(Settings.HwName))
            {
                log.Error("No HW with Name: " + Settings.HwName);
                return(enExperimentStatus.Error);
            }
            hw = (PS_PalmSens)HWStore[Settings.HwName];

            ConfigureImpedimetricMethod();

            // Setup Results File
            ResultsFilePath = resultsFilePath;
            string cords = "";
            ExperimentContainer container = parent as ExperimentContainer;

            this.parent = parent;

            if (container != null)
            {
                cords = container.ChildIndexer();
                if (cords != "")
                {
                    cords = " " + cords;
                }
            }

            ResultsFileName = "ImpedanceSpectroscopyExperiment - " + Name + cords + ".dat";

            string headerString = "Experiment: ImpedanceSpectroscopyExperiment - " + Name + cords + "\r\n";

            // 2 columns
            writeHeader(headerString, new string[] { /*"Time [s]", "Current [µA]"*/ }, settingsObj: Settings, positionColumns: false);

            status = enExperimentStatus.Idle;
            return(status);
        }
示例#14
0
        void LoadSimulationConfiguration()
        {
            //  m_iParams = iParams;
            //  m_project = project;
            //  m_experimentPlate = plate;
            //  m_method = method;
            //  m_mask = mask;
            //  m_plateType = plateType;
            //  m_indicatorList = indicatorList;
            //  m_compoundPlateList = compoundPlateList;
            //  m_controlSubtractionWellList = controlSubtractionWellList;
            //m_numFoFrames = numFoFrames;
            //m_dynamicRatioNumerator = dynamicRatioNumerator;
            //m_dynamicRatioDenominator = dynamicRatioDenominator;

            //ChartArray.BuildChartArray(mask.Rows, mask.Cols, m_indicatorList);

            ////////////////////////
            // set up project
            m_project = null;
            bool success = m_wgDB.GetAllProjects(false);

            foreach (ProjectContainer project in m_wgDB.m_projectList)
            {
                if (project.Description.Equals("Debug", StringComparison.OrdinalIgnoreCase))
                {
                    m_project = project;
                    break;
                }
            }
            if (m_project == null) // not found in database, so create it
            {
                m_project             = new ProjectContainer();
                m_project.Description = "Debug";
                m_project.TimeStamp   = DateTime.Now;
                m_project.Archived    = false;
                success = m_wgDB.InsertProject(ref m_project);
            }


            ////////////////////////
            // set up plateType
            m_plateType = null;
            success     = m_wgDB.GetAllPlateTypes();
            if (m_wgDB.m_plateTypeList.Count() > 0)
            {
                m_plateType = m_wgDB.m_plateTypeList.ElementAt(0);
            }
            else
            {
                // create a new plateType
                m_plateType             = new PlateTypeContainer();
                m_plateType.Cols        = 24;
                m_plateType.Description = "Debug";
                m_plateType.IsDefault   = false;
                m_plateType.Rows        = 16;
                success = m_wgDB.InsertPlateType(ref m_plateType);
            }



            ////////////////////////
            // set up experiment plate
            m_experimentPlate = null;
            success           = m_wgDB.GetAllPlatesForProject(m_project.ProjectID);
            if (m_wgDB.m_plateList.Count() > 0)
            {
                m_experimentPlate = m_wgDB.m_plateList.ElementAt(0);
            }
            else
            {
                // create a new plate
                m_experimentPlate             = new PlateContainer();
                m_experimentPlate.Barcode     = "12345678";
                m_experimentPlate.Description = "Debug";
                m_experimentPlate.IsPublic    = true;
                m_experimentPlate.OwnerID     = GlobalVars.UserID;
                m_experimentPlate.PlateTypeID = m_plateType.PlateTypeID;
                m_experimentPlate.ProjectID   = m_project.ProjectID;

                success = m_wgDB.InsertPlate(ref m_experimentPlate);
            }



            ////////////////////////
            // set up method
            m_method = null;
            success  = m_wgDB.GetAllMethodsForUser(GlobalVars.UserID);
            foreach (MethodContainer method in m_wgDB.m_methodList)
            {
                if (method.Description.Equals("Debug", StringComparison.OrdinalIgnoreCase))
                {
                    m_method = method;
                    break;
                }
            }
            if (m_method == null)
            {
                m_method = new MethodContainer();
                m_method.BravoMethodFile = "";
                m_method.Description     = "Debug";
                m_method.IsPublic        = true;
                m_method.OwnerID         = GlobalVars.UserID;
                success = m_wgDB.InsertMethod(ref m_method);
            }
            success = m_wgDB.GetAllIndicatorsForMethod(m_method.MethodID);
            if (m_wgDB.m_indicatorList.Count < 1)
            {
                // create indicators for this new method
                IndicatorContainer ind = new IndicatorContainer();
                ind.Description              = "Debug";
                ind.EmissionsFilterPosition  = 6;
                ind.ExcitationFilterPosition = 4;
                ind.MethodID   = m_method.MethodID;
                ind.SignalType = SIGNAL_TYPE.UP;
                success        = m_wgDB.InsertIndicator(ref ind);
            }



            ////////////////////////
            // set up experiment
            m_experiment = null;
            ObservableCollection <ExperimentContainer> expList;

            success = m_wgDB.GetAllExperimentsForPlate(m_experimentPlate.PlateID, out expList);
            if (expList.Count() > 0)
            {
                m_experiment = expList.ElementAt(0);
            }
            else
            {
                m_experiment              = new ExperimentContainer();
                m_experiment.Description  = "Debug";
                m_experiment.HorzBinning  = 1;
                m_experiment.MethodID     = m_method.MethodID;
                m_experiment.PlateID      = m_experimentPlate.PlateID;
                m_experiment.ROI_Height   = GlobalVars.PixelHeight;
                m_experiment.ROI_Width    = GlobalVars.PixelWidth;
                m_experiment.ROI_Origin_X = 1;
                m_experiment.ROI_Origin_Y = 1;
                m_experiment.TimeStamp    = DateTime.Now;
                m_experiment.VertBinning  = 1;
                success = m_wgDB.InsertExperiment(ref m_experiment);
            }


            ////////////////////////
            // set up mask
            m_mask  = null;
            success = m_wgDB.GetAllMasksForPlateType(m_experimentPlate.PlateTypeID);
            if (m_wgDB.m_maskList.Count() > 0)
            {
                m_mask = m_wgDB.m_maskList.ElementAt(0);
            }
            else
            {
                // create a new mask
                m_mask                    = new MaskContainer();
                m_mask.Angle              = 0.0;
                m_mask.Cols               = 24;
                m_mask.Description        = "Debug";
                m_mask.IsDefault          = false;
                m_mask.NumEllipseVertices = 24;
                m_mask.PlateTypeID        = m_experimentPlate.PlateTypeID;
                m_mask.ReferenceImageID   = 0;
                m_mask.Rows               = 16;
                m_mask.Shape              = 0;
                m_mask.XOffset            = 28;
                m_mask.XSize              = 28;
                m_mask.XStep              = 41.522;
                m_mask.YOffset            = 190;
                m_mask.YSize              = 28;
                m_mask.YStep              = 41.467;
                success                   = m_wgDB.InsertMask(ref m_mask);
            }



            ////////////////////////////////////
            // setup test indicator(s)
            m_indicatorList = new ObservableCollection <ExperimentIndicatorContainer>();
            ObservableCollection <ExperimentIndicatorContainer> expIndList;

            success = m_wgDB.GetAllExperimentIndicatorsForExperiment(m_experiment.ExperimentID, out expIndList);
            if (expIndList.Count > 0)
            {
                foreach (ExperimentIndicatorContainer ex in expIndList)
                {
                    m_indicatorList.Add(ex);
                }
            }
            else
            {
                success = m_wgDB.GetAllIndicatorsForMethod(m_method.MethodID);
                foreach (IndicatorContainer ind in m_wgDB.m_indicatorList)
                {
                    ExperimentIndicatorContainer exInd = new ExperimentIndicatorContainer();
                    exInd.Description = ind.Description;

                    FilterContainer filter;
                    success = m_wgDB.GetExcitationFilterAtPosition(ind.ExcitationFilterPosition, out filter);
                    exInd.ExcitationFilterDesc = filter.Description;
                    success = m_wgDB.GetEmissionFilterAtPosition(ind.EmissionsFilterPosition, out filter);
                    exInd.EmissionFilterDesc = filter.Description;

                    exInd.EmissionFilterPos   = ind.EmissionsFilterPosition;
                    exInd.ExcitationFilterPos = ind.ExcitationFilterPosition;
                    exInd.ExperimentID        = m_experiment.ExperimentID;
                    exInd.Exposure            = 150;
                    exInd.Gain       = 5;
                    exInd.MaskID     = m_mask.MaskID;
                    exInd.SignalType = SIGNAL_TYPE.UP;
                    exInd.Verified   = true;
                    success          = m_wgDB.InsertExperimentIndicator(ref exInd);
                    m_indicatorList.Add(exInd);
                }
            }


            ////////////////////////////////////
            // compound plates
            m_compoundPlateList = new ObservableCollection <ExperimentCompoundPlateContainer>();


            ////////////////////////////////////
            // control subtraction well list
            m_controlSubtractionWellList = new ObservableCollection <Tuple <int, int> >();
            // all wells in last row = control wells
            for (int c = 0; c < m_mask.Cols; c++)
            {
                m_controlSubtractionWellList.Add(Tuple.Create(m_mask.Rows - 1, c));
            }

            ////////////////////////////////////
            //m_numFoFrames = numFoFrames;
            m_numFoFrames = 5;


            if (m_indicatorList.Count() > 1)
            {
                ////////////////////////////////////
                //m_dynamicRatioNumerator = dynamicRatioNumerator;
                m_dynamicRatioNumerator = m_indicatorList.ElementAt(0);
                ////////////////////////////////////
                //m_dynamicRatioDenominator = dynamicRatioDenominator;
                m_dynamicRatioDenominator = m_indicatorList.ElementAt(1);
            }
            else
            {
                m_dynamicRatioNumerator = new ExperimentIndicatorContainer();
                m_dynamicRatioNumerator.ExperimentIndicatorID = 0;
                m_dynamicRatioDenominator = new ExperimentIndicatorContainer();
                m_dynamicRatioDenominator.ExperimentIndicatorID = 0;
            }


            if (m_iParams == null)
            {
                m_iParams = new ImagingParameters();
            }


            m_iParams.maxPixelValue               = GlobalVars.MaxPixelValue;
            m_iParams.imageWidth                  = GlobalVars.PixelWidth;
            m_iParams.imageHeight                 = GlobalVars.PixelHeight;
            m_iParams.Image_StartCol              = 1;
            m_iParams.Image_EndCol                = GlobalVars.PixelWidth;
            m_iParams.Image_StartRow              = 1;
            m_iParams.Image_EndRow                = GlobalVars.PixelHeight;
            m_iParams.BravoMethodFilename         = "";
            m_iParams.CameraTemperature           = GlobalVars.CameraTargetTemperature;
            m_iParams.HorzBinning                 = 1;
            m_iParams.VertBinning                 = 1;
            m_iParams.EmissionFilterChangeSpeed   = GlobalVars.FilterChangeSpeed;
            m_iParams.ExcitationFilterChangeSpeed = GlobalVars.FilterChangeSpeed;
            m_iParams.LightIntensity              = 100;
            m_iParams.NumImages     = 1000000; // artificial limit on number of images
            m_iParams.NumIndicators = m_indicatorList.Count;
            m_iParams.SyncExcitationFilterWithImaging = true;

            m_iParams.CycleTime             = new int[m_indicatorList.Count];
            m_iParams.EmissionFilter        = new byte[m_indicatorList.Count];
            m_iParams.ExcitationFilter      = new byte[m_indicatorList.Count];
            m_iParams.Exposure              = new float[m_indicatorList.Count];
            m_iParams.Gain                  = new int[m_indicatorList.Count];
            m_iParams.ExperimentIndicatorID = new int[m_indicatorList.Count];
            m_iParams.IndicatorName         = new string[m_indicatorList.Count];
            m_iParams.LampShutterIsOpen     = new bool[m_indicatorList.Count];


            int i = 0;

            foreach (ExperimentIndicatorContainer ind in m_indicatorList)
            {
                m_iParams.CycleTime[i]             = 1000;
                m_iParams.EmissionFilter[i]        = (byte)ind.EmissionFilterPos;
                m_iParams.ExcitationFilter[i]      = (byte)ind.ExcitationFilterPos;
                m_iParams.Exposure[i]              = (float)ind.Exposure / 1000;
                m_iParams.Gain[i]                  = ind.Gain;
                m_iParams.ExperimentIndicatorID[i] = 0; // created by the RunExperiment object when the experiment is run
                m_iParams.IndicatorName[i]         = ind.Description;
                m_iParams.LampShutterIsOpen[i]     = true;
                m_iParams.ExperimentIndicatorID[i] = ind.ExperimentIndicatorID;

                i++;
            }
        }