Skip to content
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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

jean-lucns
Copy link
Contributor

New tools for metafile generation and timestamps

.DS_Store Outdated
Copy link
Owner

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.

Copy link
Owner

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.

Copy link
Owner

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.

Copy link
Owner

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)
Copy link
Owner

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
Copy link
Owner

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=[];
Copy link
Owner

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];
Copy link
Owner

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')
Copy link
Owner

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.

Copy link
Owner

@lolaBerkowitz lolaBerkowitz left a 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants