a, Grid-like modulation (beta weight) in entorhinal cortex (EC), averaged over all EC voxels, aligned to a single Squircle-specific grid orientation (φ) across all Squircle trials independent of contextual memory. To compute the Squircle-specific φ we performed the same split-half analysis as for the Square (Sq) and Circle (Ci) contexts (for example, Fig. 6), but limited the analysis only to Squircle trials. No significant grid-like modulation (beta weight) was observed when we assumed there was a single Squircle-specific φ (t23 = 1.06, p = 0.149; sign-test p = 0.271, one-tailed). b, Left: Grid-like modulation in EC, averaged over all EC voxels, aligned to either the Sq φ or the Ci φ across all Squircle trials. No significant grid-like modulation was observed (Sq, t-test t23 = 0.50, p = 0.312; Ci, t test, t23 = 0.39, p = 0.350). Right: An alternative possibility is that EC grid representations have a single fixed φ (either Sq φ or Ci φ) across all Squircle trials, but whether the Squircle φ was the Sq or Ci φ differed across participants. To address this alternative, for each participant, we computed the maximum grid-like modulation observed by a single fixed φ (either the Sq φ or Ci φ, whichever yielded stronger grid-like modulation). We then compared the strength of grid-like modulation aligned to this fixed φ to the maximum grid-like modulation observed if φ realigned across trials (Realign; Fig. 6b), independent of contextual memory. Stronger grid-like modulation was observed in the Squircle in the majority of participants (75%; 19/24) if φ realigned on a trial-by-trial basis than if we assumed that there was a fixed φ across all Squircle trials (sign-test, p = 0.005, one-tailed; t-test t23 = 1.92, p = 0.034). c, Difference in the percentage of VR-walking directions modulo 60° between Sq- and Ci-consistent Squircle trials. There was no difference in periodic VR-walking direction bias between Sq- and Ci-consistent trials that would be confounded with the presence of contextual-memory-specific 60° periodic fMRI signals dependent on VR-walking direction. Throughout the figure, error bars indicate ±1 SEM. Dots denote individual participants (n = 24). **p < 0.01, nsp > 0.05.