carrien / free-speech

Analysis and plotting code for speech neuroimaging experiments.
MIT License
4 stars 5 forks source link

Additions to adjustOsts and plot_duration_feedback for taimComp #40

Closed rpkarlin closed 2 years ago

rpkarlin commented 2 years ago

Two changes to experiments that are broadly used in different experiments to have more functionality for taimComp specifically (but can be applicable to other experiments):

  1. adjustOsts: this is the function used to adjust OST settings in the middle of an experiment. Previously it would automatically take in the last 18 trials. This is fine when only a single word with a single OST file is being used. In taimComp, there are multiple words and multiple OST files. The addition allows you to specify that you want to work with some subset of files, using a "word" argument. This takes advantage of expt.inds.(words).

trackingFileName is also optionally independently specified, for use in the case when, say, the words are "bus" and "best" but the OST is bVs

  1. plot_duration_feedback: this is the function that tells people to speak more slowly, quickly, or that their speed is good based on durations of target segments (determined in various ways). This change adds a bConsiderBadtracks flag, which is to be used alongside the OST-based durations. If you specify 1 for bConsiderBadtracks, it will consider any super anomolous durations (specified in params fed in as second argument) as likely belonging to bad tracking and will give clarity feedback rather than speed feedback.

This is similar to badOst, but adds the possibility that all statuses may have been met but just not at reasonable landmarks.