Part 1: Modularize the trial generation procedure for the perceptual grouping task (Exercise 4)
- Instead of generating the trial logic at run-time, write a function inside separate file (generateTrials.py is a reasonable name to use) that pre-generates all the trials and writes them to a file called subjCode_trials.csv (where subjCode is your subject's code).
- Then import the function, run it, get the file, read it into a list of dictionaries, and iterate through it. Your main script file should now not be doing any 'deciding' of what to show. All the relevant variables should be pre-generated by the generateTrials procedure
Use the following parameters in generating the trials:
- 10 shapes (half circles, half squares)
- 180 trials (exactly 50% should be repeats)
- The repeats should occur equally at all positions
- Approx 50% of the repeats should be squares and approx 50% circles
Lastly, write the subject code, trial info, and output info to a subjCode_perceptGrouping.txt file. Name your finished file perceptualGroupingComplete_done.py
Part 2: Practice planning an experiment (thinking before coding)
- Copy the experiment_schematic.txt from the commons directory into your Experiment_Schematic directory, and fill in these parts:
- What is your experiment assessing
- What is your dependent measure?
- What is your hypothesis?
- What variables will be experimenter need to input at start-time?
- What variables are varying trial to trial (i.e., stimulus position, correct response, ISI, etc.)?
- How will you generate the list of trials (or in case of an interactive design, decide what the next trial should be)
- What exactly will be happening on each trial: stimulus presentation and responses
- What will you be logging on each trial?
- What kind of error checking (if any) will you be doing to make sure the experiment doesn't crash with incorrect input?
I will get feedback to each of you individually. When you are done, rename the file so it's named experiment_schematic_done.txt.