void advanceTrial()
{
	beepOk(0);
	double timeElapsed = timer.getElapsedTimeInMilliSec();
	responseFile.precision(3); // max three decimal positions
	responseFile << fixed << 
			parameters.find("SubjectName") << "\t" <<
			interoculardistance << "\t" <<
			trialNumber << "\t" <<
			trial.getCurrent()["AbsDepth"] << "\t" << 
			objwidth << "\t" << 
			adjDz << "\t" << 
			timeElapsed
			<< endl;

	trialNumber++;
	if(trial.hasNext())
	{
		trial.next();
		initTrial();
	} else
	{	
		isStimulusDrawn=false;
		drawGLScene();
		responseFile.close();
		expFinished = true;
	}

}
Exemple #2
0
void advanceTrial()
{
	double timeElapsed = globalTimer.getElapsedTimeInMilliSec();

	responseFile.precision(3); // max three decimal positions
	responseFile << fixed << 
			parameters.find("SubjectName") << "\t" <<
			trialNumber << "\t" <<
			repetitions << "\t" <<
			starting_theta << "\t" <<
			final_theta << "\t" <<
			trial.getCurrent()["Tilt_sign"] << "\t" <<
			timeElapsed << "\t" << 
			endl;
 
	trialNumber++;

	if(trial.hasNext())
	{
		trial.next();
		initTrial();
	} else if (repetitions < max_repetitions)
	{	
		repetitions++;
		initVariables();
		trial.next();
		initTrial();
	} else
	{
		responseFile.close();
		expFinished = true;
		beepOk(4);
	}
}
Exemple #3
0
void advanceTrial()
{
    double timeElapsed = timer.getElapsedTimeInMilliSec();
    double percent_occluded_frames = (double)framesOccluded/(frameN-frames_at_start-frames_post_grasp);
    bool not_enough_frames = percent_occluded_frames > 0.20;

    if(not_enough_frames)
    {
        beepOk(1);
        trial.reinsert(trial.getCurrent());
        good_trial = 0;
    } else
    {
        beepOk(0);
        good_trial = 1;
    }

    responseFile.precision(3); // max three decimal positions
    responseFile << fixed <<
                 parameters.find("SubjectName") << "\t" <<
                 interoculardistance << "\t" <<
                 trialNumber << "\t" <<
                 trial.getCurrent()["AbsDepth"] << "\t" <<
                 objwidth << "\t" <<
                 objdepth << "\t" <<
                 timeElapsed << "\t" <<
                 good_trial
                 << endl;

    markersFile.close();

    trialNumber++;
    if(trial.hasNext())
    {
        trial.next();
        initTrial();
    } else
    {
        responseFile.close();
        expFinished = true;
    }

}