Ejemplo n.º 1
0
        public TrialTable(List <Variable> allData, ExperimentDesign design, BlockTable baseBlockTable, bool shuffleBaseTrialOrder,
                          int numberOfRepetitions, ColumnNames columnNames)
        {
            this.columnNames = columnNames;
            BaseTrialTable   = design.SortAndAddIVs(allData);

            //Repeat all trials if specified
            if (numberOfRepetitions > 1)
            {
                DataTable repeatedTable = BaseTrialTable.Clone();
                for (int i = 0; i < numberOfRepetitions; i++)
                {
                    foreach (DataRow row in BaseTrialTable.Rows)
                    {
                        repeatedTable.ImportRow(row);
                    }
                }

                BaseTrialTable = repeatedTable;
            }

            //Shuffle trial order if needed
            if (shuffleBaseTrialOrder)
            {
                BaseTrialTable = BaseTrialTable.Shuffle();
            }

            AddBlockColumnsFrom(baseBlockTable);

            AddTotalTrialIndexColumnTo();
            AddTrialIndexColumnTo();
            AddBlockNumberColumnTo();
            AddSuccessColumnTo();
            AddAttemptsColumnTo();
            AddSkippedColumnTo();
            AddTrialTimeColumnTo();
        }
Ejemplo n.º 2
0
        public DataTable GetBlockOrderTable(int sessionOrderChosenIndex)
        {
            BlockTable orderedBlockTable = baseBlockTable.GetBlockOrderTable(sessionOrderChosenIndex);

            return(orderedBlockTable);
        }
Ejemplo n.º 3
0
 void BlockOrderSelected(int selectedOrderIndex)
 {
     OrderedBlockTable = baseBlockTable.GetBlockOrderTable(selectedOrderIndex);
     CreateAndAddBlocks();
 }