Raw Features
Raw features are direct representations of sensor and activity data as collected by the mindLAMP platform. They form the base layer of Cortex's three-tier pipeline.
What Raw Features Doโ
Raw features query the LAMP API and normalize low-level data streams into a consistent format for downstream computation. They handle iOS/Android differences automatically โ see the Features overview for details on the full pipeline.
Complete Raw Feature Listโ
Sensor Raw Features (11)โ
| Raw Feature | Source Sensor | Consumed By | Description |
|---|---|---|---|
gps | lamp.gps | significant_locations, trips, data_quality | Latitude, longitude, altitude, accuracy |
accelerometer | lamp.accelerometer | acc_jerk, data_quality | x, y, z acceleration (g) |
device_motion | lamp.device_motion | โ | Rotation, gravity, magnetic field, attitude |
device_state | lamp.device_state | screen_active, battery_level | Screen on/off, battery level |
steps | lamp.steps | step_count | Step count and type |
nearby_device | lamp.nearby_device | nearby_device_count | Bluetooth/WiFi detections |
telephony | lamp.telephony | call_number, call_duration, call_degree | Call metadata |
analytics | lamp.analytics | step_count (version detection), app_time | App usage events |
sleep | lamp.sleep | healthkit_sleep_duration | Sleep stage data |
screen_state | lamp.screen_state (deprecated) | inactive_duration | Legacy screen state events |
ambient_light | โ | โ | Ambient light sensor (limited availability) |
SensorKit Raw Features (5)โ
These features require iOS SensorKit data, available only on enrolled research devices.
| Raw Feature | Description | Consumed By |
|---|---|---|
device_usage | Screen time, unlock events, app usage | screen_unlocks, screen_unlock_duration, screen_wakes, app_time |
phone_usage | Phone call metadata (SensorKit source) | call_number, call_duration, call_degree (SensorKit mode) |
messages_usage | Text message metadata | text_number, text_degree |
visits | Location visit data with categories | visit_time |
Activity Raw Features (13)โ
| Raw Feature | Source Activity | Consumed By | Description |
|---|---|---|---|
survey | lamp.survey | survey_scores | Question-level survey responses |
jewels_a | lamp.jewels_a | game_level_scores | Jewels A game events |
jewels_b | lamp.jewels_b | game_level_scores | Jewels B game events |
balloon_risk | lamp.balloon_risk | game_level_scores | Balloon Risk events |
cats_and_dogs | lamp.cats_and_dogs | game_level_scores | Cats and Dogs events |
pop_the_bubbles | lamp.pop_the_bubbles | game_level_scores | Pop The Bubbles events |
spatial_span | lamp.spatial_span | game_level_scores | Spatial Span events |
dcog | lamp.dcog | โ | D-Cog events |
digit_span | lamp.digit_span | โ | Digit Span events |
fragmented_letters | lamp.fragmented_letters | โ | Fragmented Letters events |
funny_memory | lamp.funny_memory | โ | Funny Memory events |
trails_b | lamp.trails_b | โ | Trails B events |
voice_survey | lamp.recording | โ | Voice recording audio data |
Legacy Raw Featuresโ
The following raw features correspond to deprecated sensors. They remain in Cortex for backward compatibility with older data. For the full deprecated sensor migration guide, see Deprecated Sensors.
| Raw Feature | Deprecated Sensor | Replaced By |
|---|---|---|
bluetooth | lamp.bluetooth | nearby_device |
calls | lamp.calls | telephony |
sms | lamp.sms | telephony |
gyroscope | lamp.gyroscope | device_motion |
Usageโ
Raw features are typically not called directly โ they are consumed by primary and secondary features automatically through Cortex's dependency graph. However, they can be accessed directly for custom analysis:
import cortex
# Access raw GPS data
gps_data = cortex.raw.gps(id="U1234567890", start=start_time, end=end_time)
# Access raw survey data
survey_data = cortex.raw.survey(id="U1234567890", start=start_time, end=end_time)
Output Structureโ
All raw features return a consistent structure:
{
"data": [ ... ], # List of sensor/activity event records
"has_raw_data": 1 # 1 if data exists, 0 if no data found
}
The has_raw_data flag distinguishes between "no data was collected" (0) and "data was collected but may be empty after filtering" (1).