Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions behavior/linearTrackBehavior.m
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
addParameter(p, 'norm_zero_to_one', false, @islogical); % normalize linear coords 0-1
addParameter(p, 'maze_sizes', [], @isnumeric); % width of mazes in cm (must correspond with linear epochs)
addParameter(p, 'split_linearize', false, @islogical); % make linear epoch by epoch
addParameter(p, 'remove_extra_fields', false, @islogical); % removes extra FMA syle fields 'positionTrials','run','positionTrialsRun'
addParameter(p, 'just_save_animal_behavior', false, @islogical); % true will only save animal behav file
addParameter(p, 'remove_extra_fields', true, @islogical); % removes extra FMA syle fields 'positionTrials','run','positionTrialsRun'
addParameter(p, 'just_save_animal_behavior', true, @islogical); % true will only save animal behav file
addParameter(p, 'clean_tracker_jumps', false, @islogical);

parse(p, varargin{:});
Expand Down Expand Up @@ -338,9 +338,7 @@
saveas(gcf, [basepath, filesep, [basename, '.linearTrackBehavior.fig']]);
end

if remove_extra_fields
behavior = rmfield(behavior, {'positionTrials', 'run', 'positionTrialsRun', 'speedTh'});
end
behavior = rmfield(behavior, {'positionTrials', 'run', 'positionTrialsRun', 'speedTh'});

%% Generate output variables
if savemat
Expand Down
3 changes: 0 additions & 3 deletions tutorials/pipelineFiringMaps/pipelineFiringMaps.m
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,6 @@
speed_smooth = get_SmoothedSpeed(behavior, MergePoints, epochs, orderKalmanVel, do_smooth, ...
'smoothing_width', smoothing_width, 'figopt', doPlot);
behavior.speed_smooth = speed_smooth';
if savedata
save(fullfile(basepath, [prefix, '.animal.behavior.mat']), 'behavior') % update behavior info
end
end
% use the smoothed speed?
if use_smoothed_speed
Expand Down
3 changes: 0 additions & 3 deletions tutorials/pipelineThetaSequences.m
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,6 @@
run(diff(run,[],2)<0.5,:) = []; % remove run epochs lasting for less than 0.5s
behavior.run = run;
behavior.speed = speed(:,2)'; % replace old speed with this speed

% I recommend saving the running epochs in the behavior file:
save(fullfile(basepath,[basename '.animal.behavior.mat']),'behavior');
end

ok = InIntervals(thetacycles.timestamps,behavior.run);
Expand Down
Loading