DOI: 10.5281/zenodo.17744537
title: Sensing with discrete time crystals

description: # Sensing with discrete time crystals Data Repository


This repository contains experimental data, simulation results, and analysis code for Discrete Time Crystal (DTC) sensing research. The data is organized by figure numbers corresponding to the main manuscript and supplementary materials.


## Repository Structure


```

DTC_sensing_Zenodo_Repo/

│

├── data/                          # All experimental and processed data

│   ├── raw/                       # Raw experimental data files

│   │   ├── fig-1/                 # Figure 1 raw data

│   │   ├── fig-2/                 # Figure 2 raw data (fig-2b, fig-2c)

│   │   ├── fig-3/                 # Figure 3 raw data (fig-3a, fig-3b, fig-3c)

│   │   ├── fig-4/                 # Figure 4 raw data

│   │   └── fig-S1/ through fig-S18/  # Supplementary figures raw data

│   │

│   └── processed/                 # Processed and analyzed data

│       ├── fig-3/                 # Processed data for Figure 3

│       └── fig-S14/               # Processed data for Figure S14

│

├── src_code/                      # Source code for analysis and simulations

│   ├── simulations/               # Simulation code

│   │   ├── SingleToneDTC/         # Single-tone DTC simulations

│   │   ├── TwoToneDTC/            # Two-tone DTC simulations

│   │   ├── helper.py              # Helper functions

│   │   ├── setup_system.py        # System setup utilities

│   │   └── systems.yaml           # System configuration parameters

│   │

│   └── utils/                     # Utility functions

│       ├── plotting_utils.py      # Plotting and visualization utilities

│       └── simulation_utils.py    # Simulation utilities

│

└── visual_elements/               # Code and notebooks for figure generation

    ├── main/                      # Main manuscript figures

    │   ├── fig-1/                 # Figure 1 generation code

    │   ├── fig-2/                 # Figure 2 generation code

    │   ├── fig-3/                 # Figure 3 generation code

    │   └── fig-4/                 # Figure 4 generation code

    │

    └── supmat/                    # Supplementary material figures

        └── fig-S1/ through fig-S18/  # Supplementary figure generation code

```


## Data Description


### Raw Data (`data/raw/`)


The raw data directory contains experimental measurements organized by figure number:


- **File Formats:**

  - `.mat` files: MATLAB data files containing experimental measurements from the Proteus P9484M NMR spectrometer

  - `.csv` files: CSV files containing contour and magnetometer data (fig-S1)

  - `.hdf5` files: HDF5 files containing simulation results (fig-S13-S16)

  - `.npy` files: NumPy array files


- **Data Organization:**

  - **Main Figures (fig-1 through fig-4):** Core experimental results

  - **Supplementary Figures (fig-S1 through fig-S18):** Additional experimental data, simulations, and analysis


### Processed Data (`data/processed/`)


Processed data contains analyzed and pre-computed results:


- **File Formats:**

  - `.npy` files: NumPy arrays containing processed experimental data


- **Available Processed Data:**

  - `fig-3/`: Processed data for Figure 3 (fig-3a, fig-3b)

  - `fig-S14/`: Processed data for Figure S14 (AC phase scans, frequency scans, Vpp scans)


## Source Code


### Simulation Code (`src_code/simulations/`)


- **SingleToneDTC/**: Code for single-tone DTC simulations

- **TwoToneDTC/**: Code for two-tone DTC simulations

- **systems.yaml**: Configuration file defining system parameters (N, rmin, rmax, gamma, theta, tau, etc.)

- **helper.py**: Helper functions for simulations

- **setup_system.py**: System setup and initialization utilities


### Utility Functions (`src_code/utils/`)


- **plotting_utils.py**: Functions for data visualization, including matplotlib configuration and plotting routines

- **simulation_utils.py**: Utilities for running and analyzing simulations


## Figure Generation


### Visualization Code (`visual_elements/`)


Each figure directory contains:

- **Jupyter notebooks** (`.ipynb`): Interactive notebooks for data analysis and figure generation OR

- **Python scripts** (`.py`): Standalone scripts for figure generation

- **Output files** (`.pdf`, `.svg`): Generated figure files


## Requirements


All required Python packages are listed in `requirements.txt`. Key dependencies include:


- **NumPy** (2.3.5): Numerical computations

- **SciPy** (1.16.3): Scientific computing and data analysis

- **Matplotlib** (3.10.7): Plotting and visualization

- **h5py** (3.15.1): HDF5 file handling

- **Pandas** (2.3.3): Data manipulation

- **Jupyter/IPython**: Interactive notebooks

- **PyYAML** (6.0.3): Configuration file parsing


To install dependencies:

```bash

pip install -r requirements.txt

```


## Data Access


### Reading Raw Data


Raw experimental data is stored in MATLAB `.mat` format. To read these files in Python:


```python

from scipy.io import loadmat

data_dict = loadmat('path/to/file.mat')

```


## Usage


1. **Install dependencies**: `pip install -r requirements.txt`


2. **Navigate to figure directory**: Each figure has its own directory in `visual_elements/`


3. **Run analysis**: Open the Jupyter notebook (`.ipynb`) or Python script (`.py`) for the desired figure


4. **Data paths**: The code assumes data is in the `data/` directory relative to the repository root


## Notes


- Raw data files are named with timestamps (e.g., `2024-06-06-125713_Proteus.mat`) indicating when measurements were taken

- Some figures contain subdirectories (e.g., `fig-2b/`, `fig-2c/`) for different panels

- The repository structure follows the organization of figures in the associated publication