For replicating specific figures from the paper, please see scripts in OverallAnalysis. Details on which script is needed for which figure are in: Gerlei_et_at_2020_where_to_find_data_and_code.xlsx
The grid cell data is available from: https://datashare.is.ed.ac.uk/handle/10283/3674
To use the code for analyzing spatial cells such as head direction cells and grid cells, see scripts in PostSorting. See some examples of using PostSorting here: https://github.com/MattNolanLab/grid_cell_analysis/blob/master/example_spatial_analysis.py
There is more detailed documentation on how the code is organized and what the main data frames contain: https://github.com/MattNolanLab/grid_cell_analysis/wiki/Content-of-data-frame-columns
Please don't hesitate to submit an issue if there's a problem.