technical clarification on sensorkit measurement sampling

Dear SensorKit team,

We are currently working with SensorKit ambient light data under our approved SensorKit entitlement for research use. We would be grateful for some technical clarification on the sampling strategy for the SRSensor.ambientLightSensor stream, as this directly affects how we analyse and report the data.

In exported data from Apple Watch, we observe that ambient light samples do not appear to follow a fixed sampling cadence. Instead, the data appear burst-like: in one short window, we see many samples with inter-sample intervals around 100 ms, occasional near-duplicate timestamps, and then gaps of around 10 to 30 seconds with no samples. This suggests that the stream may be adaptive, event-triggered, buffered, or subject to system-level sampling decisions.

We also noticed a related discrepancy when comparing the SensorKit ambient light trace with the Health app display for a corresponding Time in Daylight sample. In one example, the Health app shows a 5-minute Time in Daylight interval with a “Maximum Light Intensity” value of 9,493 lux. In the SensorKit ambient light trace around that period, the raw samples show a different maximum depending on the precise time window considered, including higher values shortly before the HealthKit interval start and lower values within the subset of SensorKit samples we inspected. We realise that Time in Daylight may be generated by a separate internal aggregation or classification pipeline, but this comparison raised the question of how closely SensorKit ambient light samples should be expected to correspond to the light intensity values displayed in Health.

Could you clarify the following points for SensorKit ambient light data?

  1. Is SRSensor.ambientLightSensor sampled at a fixed cadence, or is sampling adaptive / event-driven?
  2. If sampling is adaptive, what factors influence sampling density? For example, changes in illuminance, device or wrist motion, device orientation, display state, app state, power state, charging state, or other system-level conditions.
  3. Are ambient light readings buffered and delivered or exported in bursts?
  4. Do SensorKit timestamps correspond to the physical sensor acquisition time, processing time, or the time at which the sample is made available through SensorKit?
  5. Are duplicate or near-duplicate ambient light samples expected in SensorKit exports?
  6. Are there circumstances under which ambient light sampling is suspended, downsampled, or suppressed?
  7. Is SensorKit ambient light expected to match, approximate, or differ from the light intensity values shown in Health app Time in Daylight sample details?
  8. Is the “Maximum Light Intensity” shown for Time in Daylight computed from the same underlying ambient light sensor stream exposed through SensorKit, or from a separate internal stream or aggregation?
  9. Are there recommended practices for analysing SensorKit ambient light data, especially with respect to irregular sampling, burst sampling, missing intervals, and aggregation to longer time windows?
  10. Is the sampling strategy the same across Apple Watch hardware versions, or should researchers expect device-specific differences?

We do not need proprietary implementation details. Our goal is to understand the methodological constraints well enough to analyse the data appropriately and describe the limitations accurately in scientific work.

Thank you!

I'll try to answer some of the questions here:

Are duplicate or near-duplicate ambient light samples expected in SensorKit exports?

Yes, if ambient light conditions are the same you can expect the same sample values to be collected. Timestamps should differ.

Are there recommended practices for analysing SensorKit ambient light data, especially with respect to irregular sampling, burst sampling, missing intervals, and aggregation to longer time windows?

Not sure what you have in mind, but the methods for analyzing the results will depend on your specific use case. There isn't any specific guidance we have on this.

Is SensorKit ambient light expected to match, approximate, or differ from the light intensity values shown in Health app Time in Daylight sample details?

Is the “Maximum Light Intensity” shown for Time in Daylight computed from the same underlying ambient light sensor stream exposed through SensorKit, or from a separate internal stream or aggregation?

HealthKit and other subsystems use the same underlying sensor but not the same stream as SensorKit. So you should not expect a 1:1 match between the reported results. Indeed comparing data from different subsystems and frameworks is a common reason we see developers get confused and assume mistakes or bugs.

technical clarification on sensorkit measurement sampling
 
 
Q