Closed mpmbq2 closed 8 years ago
I believe this issue can be fixed by removing the .reshape(1, -1)
method from line 239 of c2s.py. Is there a problem with doing this that I am missing?
Edit:
It seems my previous solution breaks the predict function. To work around the issue I added data[k]['calcium'] = data[k]['calcium'].reshape(1,-1)
at line 244 to get it into a format readable by c2s.predict
.
preprocess
assumed that if spike trains or spike times are given as input, it is already in the correct format (1xN). It probably shouldn't, so I changed it (04a4c2f5878). Thanks for reporting the issue, @mpmbq2!
When using
c2s.preprocess
if the fps parameter is set such that the sampling rate does not need to be adjusted (i.e. the same sampling rate as the original image), the resultingpreprocessed_output[0]['calcium']
is an array of shape (frames,). However, if fps is set such that the sampling rate of the data does need to be adjusted, thepreprocessed_output[0]['calcium']
is an array of shape (1, frames). This is problematic when matching the sampling rates of multiple images. I am attaching a screenshot from jupyter notebook as an example.In 19:
is a packaging step;In 35:
sets fps to require re-sampling, andIn 36:
is using the original sampling rate of the image.I will continue to look for a fix, but I wanted to also bring it to your attention.
System Info: Ubuntu 14.04, Python 2.7.12