Conversation
|
Hm, I think I need a bit more explanation for this one. Why end-14? |
|
The cd() function was throwing an error whenever we tried to run the script because the path we were giving it leads directly to a spiketrain.mat object, not the directory that object is located in. To resolve the issue, I very quickly added a couple of lines that would truncate "spiketrain.mat" from the path string (14 chars). So, for example instead of: /20180220/session01/array01/channel020/cell01/spiketrain.mat the cd() function would receive... /20180220/session01/array01/channel020/cell01/ This resolved the issue. The truncation is currently hard coded into the script (it was the fastest way for us to fix the problem so we could move on). It would break if we happened to change the name "spiketrain.mat" to anything of a different length. If you want, I can add some flexibility. -Bell |
|
Hm, I see. I think in general the input to ProcessDirs is assumed to be directories, not files. It's a good idea to check that, though, but I think a more general solution would be to first use the |
|
Yeah, can do. Give me a bit. |
So, the input to ProcessDirs depends on whatever's in your mysessions.txt file, which depends on whatever's in your mycells.txt file. mycells.txt contains paths to spiketrain.mats, whereas mysessions.txt contains paths to directories. Wondering if perhaps we accidentally passed the wrong .txt file to ProcessDirs. To be honest, that may have been the issue. Do you still want me to implement the changes? |
|
Yes, I think it would be good to have these changes implemented, as otherwise you'd have to manually strip off the file name before passing the list to ProcessDirs. |
|
If you just pass ProcessDirs the right file (I believe we may have passed it mycells.txt instead of mysessions.txt) I don't think it'll ever be an issue. mysessions.txt contains the right path names. We can implement a failsafe, though... |
|
OK, we can leave this pull request for now if you found a solution that works for you : ) |
|
Coooool. Okay, I think the four of us are ready for more instruction. |
No description provided.