File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -122,14 +122,12 @@ void SaveAllFrames(vector<Mat>& frames, const size_t trial)
122122 // Check if file arealy exists. If yes, raise all the hell.
123123 using namespace boost ::filesystem;
124124 path p (outfile);
125- if (! exists (p))
125+ if (exists (p))
126126 {
127127 cout << " [ERROR] Files " << outfile << " already exists. I will not overwrite " << p << endl;
128128 throw runtime_error ( " WILL NOT OVERWRITE EXISTING DATA." );
129129 }
130130
131-
132-
133131 write_frames_to_tiff (outfile, frames);
134132 cout << " [INFO] Saved data to " << outfile << endl;
135133
Original file line number Diff line number Diff line change @@ -540,13 +540,14 @@ void loop()
540540 unsigned numProbeTrials = 0 ;
541541 unsigned nextProbeTrialIndex = random (5 , 10 );
542542
543- for (size_t i = 0 ; i <= PROTO_NumTrialsInABlock; i++)
543+ for (size_t i = 1 ; i <= PROTO_NumTrialsInABlock; i++)
544544 {
545545
546546 reset_watchdog ( );
547+ trial_count_ = i;
547548 if (String (" TONE/LIGHT" ) == String (PROTO_CSValue))
548549 {
549- // mixed trials.
550+ // FOR Shomu. Mixed trials.
550551 bool isprobe = false ;
551552 if ( i % 5 == 0 )
552553 isprobe = true ;
@@ -564,7 +565,6 @@ void loop()
564565 }
565566 do_trial (i, isprobe);
566567 }
567- trial_count_ += 1 ;
568568 }
569569
570570 // Don't do anything once all trails are over.
You can’t perform that action at this time.
0 commit comments