cajal / pipeline

Schemata and libraries for neuroscientific data
GNU Lesser General Public License v3.0
20 stars 44 forks source link

Debug NaNs at end of motion correction traces #118

Closed jakereimer closed 8 years ago

jakereimer commented 8 years ago

NaNs at the beginning of the trace are due to PMT blanking. The frame there is dark, so motion correction cannot occur and nans are recorded for the movement trace. The PMT is reset by the experimenter before the visual stimulus begins, so this should not have an effect on any analysis. However, NaNs later in the scan are not expected. Currently, scans have a variable but large number (several thousand) of NaN'ed frames at the end of the file. This may because of an error in motion correction or in Reader5.

dimitri-yatsenko commented 8 years ago

The problem is not due to motion correction but a bug in ne7.scanimage.Reader5. More specifically, frames_per_file is computed incorrectly.

Fixed the problem. Need to repopulate all data.

dimitri-yatsenko commented 8 years ago

The problem is fixed. Some nans still occur when the frames go dark below 25% of the template brightness.