-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sn lab ephys JL #4
base: main
Are you sure you want to change the base?
Conversation
.DS_Store
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add .DS_Store to your gitignore file. Don't commit/push this file type.
behavior/.DS_Store
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add .DS_Store to your gitignore file. Don't commit/push this file type.
behavior/utils/.DS_Store
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add .DS_Store to your gitignore file. Don't commit/push this file type.
metagen_tools/.DS_Store
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add .DS_Store to your gitignore file. Don't commit/push this file type.
@@ -0,0 +1,130 @@ | |||
|
|||
function output = tablegen (basepath2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For cohesion with rest of repo, reference to basepath should be 'basepath'. Remove the '2'.
file_struct = dir(fullfile(basepath2,'*.avi')); | ||
%remove hidden files | ||
file_struct = file_struct(~strncmp({file_struct.name}, '.', 1)); | ||
% Extract base name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can use basenameFromBasepath or fileparts
timestamps = cellfun(@(x) str2double(x),timestamps,'UniformOutput',false); | ||
[~, sortedIndices] = sort( [timestamps{:}]); | ||
file_struct=file_struct(sortedIndices); | ||
subid=[]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
consider a blank csv with headers so you don't have to initialize all variable names here.
none=[]; | ||
for i=1:length(sortedIndices) | ||
%nones and constant columns | ||
maze_length_cm=[maze_length_cm;39]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
avoid hard-coded variables
basename=[basename;string(File_name)]; | ||
%exposure and condition | ||
|
||
if contains(basename,'pretest') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make 68 - 104 adaptable for different behavioral paradigms. Dates on video files can be used for exposure calculation. Use recursive approach to get all videos from subject folder.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Several comments. Also resubmit without temporary files.
New tools for metafile generation and timestamps