The-Lammert-Lab / TinnitusExpWebApp.jl

GNU Affero General Public License v3.0
0 stars 0 forks source link

Allow for AX experiments #70

Closed nelson-barnett closed 2 months ago

nelson-barnett commented 6 months ago

Add support for building and running experiments with a target sound.

nelson-barnett commented 4 months ago

DETAILS:

Currently, experiments are made of a stimulus generation algorithm "stimgen_type" and its settings. This is good for running patients who have tinnitus, where they can reference their own tinnitus when determining whether to answer yes/no to a stimulus. For lots of validation reasons, we want to make this is functional with people who do not have tinnitus. They need a "target sound" against which to compare each stimulus, the same way someone with the condition does. The way we implement this in practice is to play the same "target sound" before every stimulus.

What needs to be done:

I think that's it.

panzii commented 4 months ago

what should the UI look like to create AX experiment. Should we just add a field to the like this? targetUI and how do we differentiate the normal Experiment which is currently supported from the AX experiments while creating the experiment?

nelson-barnett commented 4 months ago

Yes, just a field like that is exactly what I was thinking. I figured it could be left empty if it was a "regular" experiment. Otherwise maybe a button to toggle on/off the target sound field? Which do you think would feel better?

panzii commented 4 months ago

I think the latter one seems a good option with the toggle.

panzii commented 4 months ago

current update:

  1. Added a toggle switch to determine if the new experiment is AX or not
  2. Target Sound Input field appears when the toggle is switched on and disappears when switched off.
  3. Create a new column in Experiments table, "target_sound", to store which target sound is associated with that AX experiment. image
nelson-barnett commented 4 months ago

Good stuff!

Regarding the duration of the stimuli, every stimulus generation type in TinnitusReconstructor.jl has a duration field. I believe that is currently present when making an Experiment on the website. So, nothing needs to change there. One thing I did notice, which I can change, is that there's no validation for the duration field. Meaning someone could put in -5 seconds. That should be checked in TinnitusReconstructor.jl.

For the target sound, maybe just add a target_duration field to Experiment and have that be presented as an option when making one on the website. The value can default to the duration value of the stimulus generation struct. It should be validated against 0 < target_duration <= 1.

panzii commented 4 months ago

AX experiments now enabled along with non-AX experiments in this branch