Ejemplo n.º 1
0
        protected override IEnumerable <Stage> Following()
        {
            if (_completed)
            {
                return(null);
            }
            var target = _randomBoolSequence.Next();
            var cue    = target ? NonTargetChars.ElementAt(_r.Next(NonTargetChars.Length)).ToString() : "X";

            if (_testConfig.Still)
            {
                var stage = new Stage {
                    Cue = cue, Duration = _remaining
                };
                _completed = true;
                return(new[] { stage });
            }

            var stages = new Stage[2];
            var marker = target ? CptParadigm.TargetDisplayMarker : CptParadigm.NonTargetDisplayMarker;

            stages[0] = new CptStage {
                Cue = cue, IsTarget = target, Duration = _testConfig.LetterDuration, Marker = marker
            };
            stages[1] = new Stage {
                Cue = "", Duration = _testConfig.InterStimulusInterval, Marker = CptParadigm.IntervalMarker
            };
            if (_remaining < _testConfig.LetterDuration + _testConfig.InterStimulusInterval)
            {
                _completed = true;
            }
            else
            {
                _remaining -= _testConfig.LetterDuration + _testConfig.InterStimulusInterval;
                if (_remaining < _testConfig.LetterDuration)
                {
                    _completed = true;
                }
            }
            return(stages);
        }
Ejemplo n.º 2
0
 public ActivedStage(ulong timestamp, CptStage stage, CptParadigm.CptTrial trial)
 {
     Timestamp = timestamp;
     Stage     = stage;
     Trial     = trial;
 }