buzsakilab / buzcode

Code for internal lab sharing - polishing has started but is by no means complete
http://www.buzsakilab.com/
GNU General Public License v3.0
118 stars 128 forks source link

GetPupilDialation.m improvements #290

Open DavidTingley opened 5 years ago

DavidTingley commented 5 years ago

A list of things I've found so far:

  1. pulses are often stored in the digitalin.dat, not analogin.dat (this should be the case for any binary timing signal). The function is currently hard coded to only use analogin.dat to sync camera pulses, and assumes only one channel is stored in the file...

  2. it would be nice to select a smaller ROI before tracing the eye.

  3. The function assumes that the video file is labelled 'basePath/baseName.avi', however this allows for only one video and there are often several, automatically named files. The function should be able to take in file names or use multiple .AVI files.

  4. Why is the video file being re-saved in the DetectionFigures folder?

  5. using .NumberOfFrames requires two read throughs of the entire video file. This can be done in a while loop that doesn't require the a priori knowledge of frame counts and will cut the I/O time in half. on 2018a, the VideoReader has been updated with a pause(0.1) line added in this method. for a 200000 frame video, getting the frame count with .NumberOfFrames would take ~500 hrs.

  6. read() should be updated to readframe(), assuming this is switched to a while loop