Skip to content

Conversation

@k1o0
Copy link
Contributor

@k1o0 k1o0 commented Oct 2, 2019

@k1o0 k1o0 requested a review from jkbhagatio October 2, 2019 16:08
@todo
Copy link

todo bot commented Oct 2, 2019

Make into shared fixture

% TODO Make into shared fixture
assert(endsWith(which('dat.paths'),...
fullfile('tests', 'fixtures', '+dat', 'paths.m')));
% Check temp mainRepo folder is empty. An extra safe measure as we


This comment was generated by todo based on a TODO comment in 170a9dd in #203. cc @cortex-lab.

@todo
Copy link

todo bot commented Oct 2, 2019

Make into sequence

% FIXME Make into sequence
KbQueue = containers.Map('KeyType', 'int32', 'ValueType', 'any');
end
if nargin < 2
% Check the INTEST flag to ensure that calling mock was intended


This comment was generated by todo based on a FIXME comment in 170a9dd in #203. cc @cortex-lab.

@todo
Copy link

todo bot commented Oct 2, 2019

Call this from calibrate_test

% TODO Call this from calibrate_test
% TODO Make into Fixture
%
% See also HW.DEVICES
%
% 2019-09-30 MW created


This comment was generated by todo based on a TODO comment in 170a9dd in #203. cc @cortex-lab.

@todo
Copy link

todo bot commented Oct 2, 2019

Make into Fixture

% TODO Make into Fixture
%
% See also HW.DEVICES
%
% 2019-09-30 MW created


This comment was generated by todo based on a TODO comment in 170a9dd in #203. cc @cortex-lab.

end

function c = calibration(obj, dev, lightIn, clockIn, clockOut)
function c = calibration(obj, dev, lightIn, clockIn, clockOut, makePlot)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how would you feel about something like this?

      function c = calibration(obj, dev, lightIn, varargin)
      %  Creates a file that specifies gamma calibration for a screen.
      %  This function requires a user to hold a photodiode, connected to a NI-DAQ, against a screen in order
      %  to perform gamma calibration, and save the calibration settings to a file.
      %
      %  Inputs:
      %    dev (int) : NI DAQ device ID to which the photodiode is
      %      connected
      %    lightIn (char) : analogue input channel name to which the
      %      photodiode is connected
      % 
      %  Optional Inputs:
      %    clockIn (char) : analogue input channel name for clocking pulse
      %    clockOut (char) : digital output channel name for clocking pulse
      %    makePlot (bool) : flag for making photodiode signal plot
      %
      %  Outputs:
      %    c (struct) : calibration struct containing refresh rate and
      %      gamma tables
      %
      %  Examples:
      %
      % See also: `calibrationStruct`

I think having varargin and those optional inputs is clarifying here, and then an args struct could be used to specify default input args in the function body, which I like better than the if nargin < n

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fine


stimWindow = rig.stimWindow;

% Parameters for calibration
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you add comments for all the following variable declarations that serve as calibration parameters?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The log should make these clear enough, otherwise it should be changed. What would you propose it say?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

something like 'port to connect photodiode', 'first port to connect hook-up wire for chrono' 'second port to connect hook-up wire for chrono', 'synonomous port for clockOut'


% 2013-03 CB created

properties
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is this class used? Is it used in anything not in a test?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

following up on this

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is used in a test on another branch that is not yet finished.

@k1o0 k1o0 merged commit 4fa283a into dev Oct 21, 2019
k1o0 added a commit that referenced this pull request Jan 3, 2021
* Started expServer tests

* Added more tests; bug fix for older versions

* Removed validation functions for old MATLAB versions; added documentation

* More coverage, documentation

* Draws text to screen during calibration #128

* Fix for #4

* Added structAssign test; rewardId tests

* Typo fix in structAssign_test

* Finished tests for expServer

* #156

* Returned listener delete to cleanup

* Stricter tolerance in AlyxPanel_test; bug fix for rounding negative numbers

* Update alyx-matlab submodule

* Minor changes to documentation

* Update CHANGELOG.md

* Typo fix; 'off' -> false for safety
k1o0 added a commit that referenced this pull request Jan 4, 2021
* Started expServer tests

* Added more tests; bug fix for older versions

* Removed validation functions for old MATLAB versions; added documentation

* More coverage, documentation

* Draws text to screen during calibration #128

* Fix for #4

* Added structAssign test; rewardId tests

* Typo fix in structAssign_test

* Finished tests for expServer

* #156

* Returned listener delete to cleanup

* Stricter tolerance in AlyxPanel_test; bug fix for rounding negative numbers

* Update alyx-matlab submodule

* Minor changes to documentation

* Update CHANGELOG.md

* Typo fix; 'off' -> false for safety
@k1o0 k1o0 deleted the expServerTest branch February 10, 2021 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants