You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The experiments in Figures 3 to 7 are more involved. Here we outline the steps for reproducing them.
117
117
118
+
Before you start, create a sub-directory `/ana/fig/` for technical figures which are generated during analysis.
119
+
120
+
121
+
**Remark:** When following the instructions, always `cd` into the script's directory, i.e., "Run `/ana/Yang_regress_and_choice.py`" means `cd ana` and then `python Yang_regress_and_choice.py`.
122
+
118
123
119
124
### Figure 3
120
125
@@ -125,7 +130,7 @@ Download the experiment trials of (Yang et al., 2021) from their [GitHub reposit
125
130
Run the simulation on the trials using the config file `cfg_040_YangETAL_2021.py`. The simulation must be run for each participant separately, with the participant ID (`pid=1..12`) entered in `line 51` of the config file. Store the dataset labels in the dict `DSL` in `/ana/YangETAL_dsl.py` for the subsequent analysis.
126
131
127
132
#### Fit the choice model on the inferred motion strengths
128
-
Run `/ana/Yang_regress_and_choice.py` which fits the choice model and stores the results in `/ana/yang_predicted_choices_by_motion_structure_inference_algorithm_CV.pkl`.
133
+
Run `/ana/Yang_regress_and_choice.py` which fits the choice model and stores the results in `/ana/data_yang2021_experiment_1/yang_predicted_choices_by_motion_structure_inference_algorithm_CV.pkl`.
129
134
130
135
#### Plot the figure
131
136
Run `/plt/plot_figure_3.py` to plot Figure 3. The script calculates the confusion matrices and choice log-likelihoods based on the file saved in the previous step. For the comparison in panel 3F, the log-likelihoods under the model of (Yang et al., 2021) are loaded from `./data/data_yang2021_experiment_1/yang_logL_exp1_4paramModel.txt`.
@@ -179,7 +184,7 @@ For this single cylinder condition, use `lines 28 to 30` of the config file (and
179
184
180
185
#### Analyze the simulation data for perceptual switching times
181
186
182
-
In the analysis script `/ana/SFM_switching_times.py`, enter the `DSL` of the long simulation in `line 11`. Running the script will extract and store the switching times in `/data/analysis_SFM_<DSL>.pkl`.
187
+
In the analysis script `/ana/SFM_switching_times.py`, enter the `DSL` of the long simulation in `line 11`. Running the script will extract and store the switching times in `/data/analysis_SFM_<DSL>.pkl`. Furthermore, the script will detect the threshold value for perceptual switches (printing, e.g., `> Threshold set to ±1.18`). Note down this value.
183
188
184
189
#### Run the model for the nested cylinder conditions
185
190
@@ -192,9 +197,9 @@ The three simulations only differ in the rotational speeds of the outer and inne
192
197
193
198
#### Plot the figure
194
199
195
-
In `/plt/plot_figure_6.py`, enter the `DSL` of the short single-cylinder simulation and of the three nested cylinder simulations in `line 15` and `lines 18 - 20`, respectively. Enter the file name of the switching times in `line 16` and run the script to plot Figure 6.
200
+
In `/plt/plot_figure_6.py`, enter the `DSL` of the short single-cylinder simulation and of the three nested cylinder simulations in `line 15` and `lines 18 - 20`, respectively. Enter the file name of the switching times in `line 16` and the switching threshold in `line 17`. Run the script to plot Figure 6.
196
201
197
202
198
203
### Figure 7
199
204
200
-
Run the two simulations `cfg_200_network_polar_plus_global.py` (for panels 7g-j) and `cfg_220_network_ramp_lambda.py` (for panel 7m) and enter the obtained `DSL` in `line 25` and `line 53` of `/plt/plot_figure_7.py`, respectively. Run the script to plot Figure 7.
205
+
Run two simulations using the config files`cfg_200_network_polar_plus_global.py` (for panels 7g-j) and `cfg_220_network_ramp_lambda.py` (for panel 7m) and enter the obtained `DSL` in `line 25` and `line 53` of `/plt/plot_figure_7.py`, respectively. Run the script to plot Figure 7.
0 commit comments