Skip to content

Commit

Permalink
fixed scaling factor
Browse files Browse the repository at this point in the history
  • Loading branch information
petersenpeter committed Mar 6, 2023
1 parent ce25267 commit 913469a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
11 changes: 3 additions & 8 deletions calc_CellMetrics/loadOpenEphys_examples.m
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
% basepath = '/Volumes/Peter_SSD_4/NeuropixelsData/PP01/PP01_2020-07-01_13-07-16';
basepath = '/Volumes/Peter_SSD_4/NeuropixelsData/PP01/PP01_2020-06-30_12-27-33';
basepath = '/Volumes/Peter_SSD_4/NeuropixelsData/PP01/PP01_2020-07-01_13-07-16';
basepath = 'Z:\SUN-IN-Petersen-lab\EphysData\PeterPetersen\PP01\PP01_2020-07-01_13-07-16';

basename = basenameFromBasepath(basepath);
cd(basepath)
Expand All @@ -23,7 +24,7 @@
openephysDig = loadOpenEphysDigital(session,TTL_paths,TTL_offsets);

%% Behavior processing
scaling_factor = 2;
scaling_factor = 0.5;
offset_origin = [15,7.5,0];
offset_origin = [5,-5,0];

Expand All @@ -39,18 +40,12 @@
maze.radius_out = 116.5/2;
maze.arm_half_width = 4;
maze.cross_radii = 47.9;
maze.rim_buffer = 10;
maze.polar_rho_limits = [44,75]; % 40,?
maze.polar_theta_limits = [15,2.8*maze.radius_in]; % In units of cm
maze.pos_x_limits = [-10,10]; %
maze.pos_y_limits = [-40,44];

%
% maze.boundary{1} = [0,40]; % [x_center, polar_rho_min_limit] Onset of central arm
% maze.boundary{2} = [0,25]; % [x_center, y lower limit] End of central arm
% maze.boundary{3} = [-15,40]; % [x upper limit, ] Start of Left arm
% maze.boundary{4} = [15,40]; % [x lower limit, ] Start of right arm
% maze.boundary{5} = [maze.radius_in-3.25,maze.polar_theta_limits(2)]; % [,]

subplot(1,2,1)
plot_ThetaMaze(maze)

Expand Down
2 changes: 1 addition & 1 deletion calc_CellMetrics/loadOptitrack.m
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
clearvars filename formatSpec fileID dataArray header_length;

% getting position out in cm, and flipping Z and Y axis
position3D = 100*[-optitrack_temp.X,optitrack_temp.Z,optitrack_temp.Y]/parameters.scaling_factor + parameters.offset_origin;
position3D = 100*[-optitrack_temp.X,optitrack_temp.Z,optitrack_temp.Y]*parameters.scaling_factor + parameters.offset_origin;

% Rotationg X,Y coordinates around origin if a rotation parameter is given
if ~isempty(parameters.rotation)
Expand Down

0 comments on commit 913469a

Please sign in to comment.