Closed spitschan closed 6 years ago
... and potentially offer some demo code for the new functionality.
I think the routine is still broken. onsider the following:
backgroundSpd = 0.5*ones(401, 1);
modulationSpd = ones(401, 1);
T_receptors = ones(1, 401);
ComputeAndReportContrastsFromSpds('','',T_receptors,backgroundSpd,modulationSpd,'doPostreceptoral', false)
An error is thrown:
Cell contents reference from a
non-cell array object.
Error in
ComputeAndReportContrastsFromSpds
(line 63)
fprintf(' * %s: contrast =
%0.1f%%\n',receptorStrings{j},100*receptorContrasts(j));
and
receptorContrasts =
1
-1
Where it clearly should just be 1x1.
I'm reverting to the old way of calculating it in HEAD for now, but happy to use the SPDToReceptorContrast
machinery.
That error has to do with the receptorStings
:
% Input:
% photoreceptorClasses - Names of the photoreceptor classes in a **cell array**.
Running the following (with photoreceptorClasses as cell-array) does not throw the error:
backgroundSpd = 0.5*ones(401, 1);
modulationSpd = ones(401, 1);
T_receptors = ones(1, 401);
ComputeAndReportContrastsFromSpds('',{''},T_receptors,backgroundSpd,modulationSpd,'doPostreceptoral', false)
I'm looking into the other issue now.
Other issue was unique to the situation of a single receptor. Fixed now.
Thank you.
On 30 March 2018 17:06:23 Joris Vincent notifications@github.com wrote: Other issue was unique to the situation of a single receptor. Fixed now. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
As of 1192cb7108068f7caac9a233694e0a70cd81e75e, some of my code using ComputeAndReportContrastsFromSpds is broken. @JorisVincent can you look into this?