From 6b34eb87fca61d4d0ca5ae0c8e1be9f2edaf41db Mon Sep 17 00:00:00 2001 From: Ryan Harvey Date: Fri, 27 Mar 2026 20:32:20 -0400 Subject: [PATCH] remove sections that change data format --- behavior/linearTrackBehavior.m | 8 +++----- tutorials/pipelineFiringMaps/pipelineFiringMaps.m | 3 --- tutorials/pipelineThetaSequences.m | 3 --- 3 files changed, 3 insertions(+), 11 deletions(-) diff --git a/behavior/linearTrackBehavior.m b/behavior/linearTrackBehavior.m index 411ff1b3..74cec65c 100644 --- a/behavior/linearTrackBehavior.m +++ b/behavior/linearTrackBehavior.m @@ -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{:}); @@ -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 diff --git a/tutorials/pipelineFiringMaps/pipelineFiringMaps.m b/tutorials/pipelineFiringMaps/pipelineFiringMaps.m index 24983990..9304f78a 100644 --- a/tutorials/pipelineFiringMaps/pipelineFiringMaps.m +++ b/tutorials/pipelineFiringMaps/pipelineFiringMaps.m @@ -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 diff --git a/tutorials/pipelineThetaSequences.m b/tutorials/pipelineThetaSequences.m index c9311821..3d2e8e95 100644 --- a/tutorials/pipelineThetaSequences.m +++ b/tutorials/pipelineThetaSequences.m @@ -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);