Skip to content

Commit

Permalink
Issue #43
Browse files Browse the repository at this point in the history
  • Loading branch information
k1o0 committed Dec 18, 2019
1 parent d3e0092 commit 2573e0c
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions +alf/block2ALF.m
Original file line number Diff line number Diff line change
Expand Up @@ -317,15 +317,10 @@ function extractChoiceWorld(data)
try % Load encoder resolution from hw info file
rig = loadjson(dat.expFilePath(data.expRef, 'hw-info', 'master')); %FIXME: This takes ages to load
encRes = rig.mouseInput.EncoderResolution;
catch % Use lookup table instead
switch lower(data.rigName) % TODO: add to rig hardware
case {'zym1', 'zym2', 'zym3'}
encRes = 360;
case {'zurprise', 'zym4'}
encRes = 100;
otherwise
encRes = 1024;
end
catch % Use most common resoultion instead
encRes = 1024;
warning('Alyx:alf:block2Alf:loadRigInfoFailed', ...
'Failed to load hardware JSON, assuming encoder resolution to be %i', encRes)
end
pos = pos./(4*encRes)*2*pi*3.1; % convert to cm
alf.writeTimeseries(expPath, [namespace 'wheel'], t(:), [], []);
Expand Down

0 comments on commit 2573e0c

Please sign in to comment.