Skip to content

Conversation

@fitzsturgill
Copy link

@fitzsturgill fitzsturgill commented Apr 7, 2018

Version of TrialTypeOutcomePlot that handles having trial types and outcomes built on the fly starting from an empty array (and not just via a pre-allocated array of NaNs as I had done previously which is clumsy and restrictive).

The changes are transparent unless you:

  1. build trial type and outcome lists by accretion such that the length of each list is equal to the currentTrial.

    Usage example:

    % trial type chosen on the fly based upon current Protocol Settings
    TrialType = pickRandomTrials_blocks(S.Block.Table); 
    % update outcome plot to show trial type of current trial with outcome as yet undefined (NaN)
            TrialTypeOutcomePlot(BpodSystem.GUIHandles.OutcomePlot, 'update', ... 
                currentTrial, [BpodSystem.Data.TrialTypes TrialType], [BpodSystem.Data.TrialOutcome NaN]);  
  1. initialize Trial Types as NaNs and call 'init' prior to supplying the first trial type.

*Also added .asv to gitignore

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.

2 participants