Conversation
|
@k1o0 the tests fail currently because they rely on generating a |
|
Looks reasonable to me! I think this is a great tool that'll be really helpful. Thanks for writing it! One suggestion: Currently the code has a default daq channel ("ao0") then checks that this has a RewardValveControl signal generator in the hardware config. Maybe a better default would be to look through the config for the RewardValveControl and to calibrate it regardless of its daq port? (throwing an error if it doesn't find one, or finds more than one). This would let the code work argument-free if the valve wasn't on ao0, and might let you get away with eliminating the 'chan' argument entirely. |
|
I'll take a look at this over the weekend... |
| assert(~mod(length(varargin),2), 'Rigbox:hw:calibrate:partialPVpair', ... | ||
| 'Incorrect number of Name-Value pairs') | ||
| if ~all(cellfun(@ischar, (varargin(1:2:end)))) || mod(length(varargin),2) | ||
| error('Rigbox:hw:calibrate:nameValueMismatch', ... |
There was a problem hiding this comment.
I chose the id partialPVpair because that's exactly the one MATLAB used in a builtin function. Whether they themselves have standardized all their IDs moot (they probably don't).
There was a problem hiding this comment.
Oh I see. I use nameValueMismatch in my own code. That's fine, feel free to make any changes you see fit before merging (rebasing onto dev and squash-merging)
I had it set this way in case there is more than one reward valve on a rig (e.g. your setup), so that the user can specify which valve they'd like to check. It could be changed though so that if no channel name input arg is given, then it looks to see which channel is using a |
updated error message bug fix checking signalGen class made 'checkRewardValveCalibration' more general - have to test optimized logical indexing updated before creating mock objects for tests added todo for creating appropriate tests added test file
c3002a6 to
ce5feae
Compare
updated error message bug fix checking signalGen class made 'checkRewardValveCalibration' more general - have to test optimized logical indexing updated before creating mock objects for tests added todo for creating appropriate tests added test file
updated error message bug fix checking signalGen class made 'checkRewardValveCalibration' more general - have to test optimized logical indexing updated before creating mock objects for tests added todo for creating appropriate tests added test file
No description provided.