Author: Ben Stray and Michael Holynski

This is the data and code repository for the manuscript titled: "Quantum sensing for gravitational cartography"

Due to the large file sizes, the repository has been split into two zip files, with the code and data for figure 1 and 2 in the first, and the data for figure 3, figure souce files, and extended data contained in the second. 

For any issues or questions please contact the corresponding author (m.holynski@bham.ac.uk) or Ben (b.j.stray@bham.ac.uk).
---------------------------------------------------------------------------------------------------------------------

The folders are organised as follows:
- Code (contains all the analysis, modelling, and plotting scripts)
- Data (contains all of the raw and processed data presented in the manuscript)
- FigureExcelSheets (source data excel files to facilitate replotting the figures shown in the manuscript)

Due to integration into this new file structure, some of the paths need updating to enable running on your local machine. Replace \\ with your local path to access the following data sets. 
It may be necessary to check for path errors before running any script (note spaces in file paths)
Analysis and modelling have been done in both Python (.py) and Mathematica (.nb). 
--------------------------------------------------------------------------------------------------------------
To successfully navigate the folders, the following figures are composed of these codes and data sets:

Figure 1:
 - Figure 1b:
	- \\Code\Code\Figure 1 code\Figure1b_code.py - Run this to produce sub-figure 1b from processed time of flight data.
	- \\Code\Code\Figure 1 code\LightSheetAnalysis.py - Analyses the raw time of flight data
	- \\Data1\Data\Figure_1_Data\Figure1b_data - Contains the raw and processed time of flight data analysed by Figure1b_code.py

 - Figure 1c:
	- \\Code\Code\Figure 1 code\Figure1c_code.py - Run this to produce sub-figure 1c from processed lead modulation data.
	- \\Data1\Data\Figure_1_Data\Figure1c_data\Figure1c_data_processed - Contains processed data to be run by Figure1c_code.py 
	- \\Data1\Data\Figure_1_Data\Figure1c_data\Figure1c_data_processed - Contains raw shot data. Gradiometer phase data can be extracted using one of the codes from 
		\\Code\Code\Figure 3 code\Experiment data extraction\Processing for each data run - Change the file paths to extract the phase values from the raw data

Figure 2:
 - \\Code\Code\Figure 2 code\Figure2code.py - Run this to produce figure 2, main and inset,from ellipse measurement. 
	Requires classes contained in EllipseDataExtractClass.py and EllipseFittingAllanDevClass.py
 - \\Data1\Data\Figure_2_data\runNumber_00000_time_17_36 - Raw shot data for ellipse analysis
 - \\Data1\Data\Figure_2_data\*.npy or *.pkl - Processed ellipse data
 
Figure 3:
 - Raw data for figure 3 can be found in folder \\Data2\Data\Figure_3_Data\subplot_a_c\Raw_Peak_Data. There are several datasets which may be analysed and combined using the codes contained 
	in \\Code\Code\Figure 3 code\Experiment data extraction. The output processed data is contained in \\Code\Code\Figure 3 code\gravity_inference\input_data\gif_survey_data.csv
 - Various folders input_data and output_data contain the algorithm inputs and outputs. The codes are commented to facilitate understanding
 - Figure 3ac: 
	- \\Code\Code\Figure 3 code\gravity_inference\gif_inference_geometry.py analyse the processed data with an inference algorithm
	- \\Code\Code\Figure 3 code\gravity_inference\gif_inference_geometry_plotting.py used to create figure 3a and 3c
 - Figure 3d:
	- \\Code\Code\Figure 3 code\gravity_inference\gif_inference_density.py analyse the processed data with an inference algorithm
	- \\Code\Code\Figure 3 code\gravity_inference\gif_inference_density_plotting.py used to create figure 3d


Figure 4:
 - \\Code\Code\Figure 4 code\Figure4a_code.py - Anomaly modelling to produce figure 4a.

-----------------------------------------------------------------------------------------------------------------
Additional included data:

Extended data table 1:
- \\Code\Code\Extended data table 1\Noise analysis - contains code to estimate the noise sources in the gradiometer
- \\Data2\Data\Extended_data_table_1\Coriolis and magnetic field Data\Coriolis Raw Peak Data - Folder contains two days of processed and unprocessed shot data for rotation of the sensor to determine coriolis shift. Also includes a magnetic field noise test
- \\Data2\Data\Extended_data_table_1\Tilt Data - Folder contains four days of processed data to determine the tilt sensitivity.
- \\Code\Code\Extended data table 1\Magnetic field analysis\MagneticFieldNoise.nb - Code for calculating magnetic field noise.

Extended data figure 4:
- \\Code\Code\Figure 3 code\gravity_inference\gif_inference_supplementary.py code to create figure
-----------------------------------------------------------------------------------------------------------------
Figure source data:
\\Figure_source_data - Contains excel files for each figure for ease of replotting the data.

