Issue: if you have run MFA on a dataset, when you run waverunner, it adds those events to trialparams.event_params. That in itself is fine, but it doesn't add anything else to event_params.
The main problem is that, specifically, it does not add the field is_good_trial. If you try to run check_audio on the data again, it will error out on a trial.mat file that was only created during waverunner because check_audio runs this check:
if ~isfield(trialparams,'event_params') || trialparams.event_params.is_good_trial
In the trials with MFA info but nothing else, event_params is a field, but is_good_trial does not exist.
Both solutions have been implemented:
In waverunner, when it adds the event information from MFA, also check for if is_good_trial exists. If it doesn't, generate field and set to 0.
In check_audio, also check for is_good_trial existing as a field before doing the dataVals assignment
Issue: if you have run MFA on a dataset, when you run waverunner, it adds those events to trialparams.event_params. That in itself is fine, but it doesn't add anything else to event_params.
The main problem is that, specifically, it does not add the field is_good_trial. If you try to run check_audio on the data again, it will error out on a trial.mat file that was only created during waverunner because check_audio runs this check:
if ~isfield(trialparams,'event_params') || trialparams.event_params.is_good_trial
In the trials with MFA info but nothing else, event_params is a field, but is_good_trial does not exist.
Both solutions have been implemented: