Continuous Glucose Trace
A time series of interstitial glucose estimates sampled every 1–15 minutes by a subcutaneous sensor, typically over 10–14 days, from which metrics like mean glucose, time in range, and glycemic variability are computed.
A continuous glucose trace is the raw output of a subcutaneous CGM sensor: a dense time series of interstitial fluid glucose estimates, usually one value every 1 to 15 minutes, spanning the sensor’s wear period. It is the only molecular layer in a personal profile sampled thousands of times per week rather than once.
How it works
The sensor is a thin filament sitting in interstitial fluid, not blood. Glucose diffuses onto a glucose-oxidase electrode, the resulting current is converted to a glucose estimate by a proprietary algorithm, and the transmitter reports a smoothed value. Three consequences follow from that chain.
First, there is lag. Diffusion from capillary to interstitium plus algorithmic smoothing puts CGM values roughly 5 to 15 minutes behind blood glucose, and the lag is largest when glucose is changing fastest. A post-meal peak you read at 14:05 likely occurred in blood closer to 13:55.
Second, the reported signal is already filtered. Spectral analysis of CGM traces shows that essentially all of the physiological signal lives below about 1 cycle per hour, which is why sampling faster than every 5 minutes buys you very little and mostly adds noise1. Manufacturer smoothing is doing real work, and it means adjacent points are not independent samples.
Third, accuracy is not uniform across the range. Sensor error is larger in hypoglycemia and on day 1 of wear, and it differs measurably between devices even when summary MARD numbers look similar2. Newer algorithms reduced error substantially over the generation of devices that followed3.
In your own data
Exports arrive as CSV. Dexcom Clarity gives you a header block, then rows with Timestamp (YYYY-MM-DDThh:mm:ss), Event Type, and Glucose Value (mg/dL). Libre exports use a Device Timestamp in local time with a Record Type column distinguishing historic (every 15 min), scan, and manual blood glucose entries. Start here:
- Parse timestamps as local time with no timezone, then check for DST duplicates and a one-hour gap. Both appear as artifacts in any 24-hour overlay plot.
- Filter to the automatic readings only. Mixing scan values and fingersticks into the same series double-counts minutes.
- Handle the clipped extremes. Libre reports
LowandHighas strings at the 40 and 400 mg/dL rails. Coerce to numeric and you get NaN, coerce blindly and you get zeros. - Compute sensor coverage per day. The standard threshold is 70% of possible readings over 14 days before summary metrics are considered stable. Below that, mean glucose drifts with whichever hours you happened to wear the sensor.
- Resample to a fixed 5-minute grid, interpolate gaps under 20 minutes linearly, and leave longer gaps as NaN rather than filling them.
Then compute, per day and pooled: mean, standard deviation, coefficient of variation (SD/mean, with 36% the conventional cutoff between stable and variable), percent of time between 70 and 180 mg/dL, and the 5th/25th/50th/75th/95th percentile curves across a 24-hour clock. That percentile overlay is the ambulatory glucose profile, and it is where patterns show up: a dawn rise, a 3 a.m. trough, a reproducible post-dinner excursion.
Do not assume your code matches the reference implementation. A comparison of open computational packages against the AGP standard found meaningful disagreement on several metrics, particularly variability and hypoglycemia measures, depending on interpolation and binning choices4. Pin your package version and document your resampling rule.
One thing to check before you over-read a single wear period: reproducibility. Functional data analysis of repeat CGM wears in adults shows that mean-level metrics are fairly stable between periods while variability metrics are noticeably less so5. Two weeks gives you a decent estimate of your average and a rough one of your spikiness.
Limitations
A CGM measures interstitial glucose in one small patch of subcutaneous tissue. Compression during sleep produces false lows that resolve when you roll over. Sensor day 1 often runs biased.
Meal responses are not purely a property of the food. Analysis of multimodal data across normal, pre-diabetic, and type 2 diabetic participants found that spike magnitude depends jointly on meal composition, prior activity, sleep, and baseline glycemic status6. Your own genotype contributes too: trans-ethnic work on continuous glycemic profiles found measurable genetic effects on CGM-derived traits beyond fasting glucose and HbA1c7. So a two-hour post-meal curve is a statement about you in that context, not a ranking of the food.
Finally, a CGM does not diagnose anything. Diabetes and prediabetes are defined by fasting plasma glucose, HbA1c, or an OGTT, all measured in a lab. If your trace shows persistent fasting values above roughly 100 mg/dL, frequent excursions past 180 mg/dL, or any readings under 54 mg/dL, bring the export to a clinician and get venous testing. Do not self-interpret those patterns, and do not change medication on the basis of a sensor reading.
Woolf Software builds longitudinal molecular profiles of individuals: whole-genome sequencing, RNA sequencing, proteomics, blood biomarkers, and continuous glucose data, integrated into one model of you. Build your profile.
You get a CSV of timestamps and mg/dL values with gaps, calibration artifacts, and a lag behind blood glucose. Everything downstream depends on how you resample, how you handle missingness, and whether you align the trace to meals, sleep, and exercise.
References
- Marc D. Breton, Devin P. Shields, Boris P. Kovatchev. Optimum Subcutaneous Glucose Sampling and Fourier Analysis of Continuous Glucose Monitors . Journal of Diabetes Science and Technology, 2008. DOI
- James Brauker, Bradley Matsubara. Comparison of the Numerical and Clinical Accuracy of Four Continuous Glucose Monitors . Diabetes Care, 2008. DOI
- M.S. Navas de Solís. Accuracy of a new real-time continuous glucose monitoring algorithm . Avances en Diabetología, 2010. DOI
- Kagan E. Karakus, Janet K. Snell-Bergeon, Halis K. Akturk. Comparison of Computational Statistical Packages for the Analysis of Continuous Glucose Monitoring Data with a Reference Software, “Ambulatory Glucose Profile,” in Type 1 Diabetes . Diabetes Technology & Therapeutics, 2025. DOI
- Marcos Matabuena, Marcos Pazos-Couselo, Manuela Alonso-Sampedro, et al.. Reproducibility of continuous glucose monitoring results under real-life conditions in an adult population: a functional data analysis . Scientific Reports, 2023. DOI
- Mattia Carletti, Jay Pandit, Matteo Gadaleta, et al.. Multimodal AI correlates of glucose spikes in people with normal glucose regulation, pre-diabetes and type 2 diabetes . Nature Medicine, 2025. DOI
- Evan Yi-Wen Yu, Hui-Ying Ren, Xinxiu Liang, et al.. Trans-ethnic estimation and implications of genetic impact on continuous glycemic profiles . Cell Discovery, 2026. DOI