Skip to main content

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 FeatureSource SensorConsumed ByDescription
gpslamp.gpssignificant_locations, trips, data_qualityLatitude, longitude, altitude, accuracy
accelerometerlamp.accelerometeracc_jerk, data_qualityx, y, z acceleration (g)
device_motionlamp.device_motionโ€”Rotation, gravity, magnetic field, attitude
device_statelamp.device_statescreen_active, battery_levelScreen on/off, battery level
stepslamp.stepsstep_countStep count and type
nearby_devicelamp.nearby_devicenearby_device_countBluetooth/WiFi detections
telephonylamp.telephonycall_number, call_duration, call_degreeCall metadata
analyticslamp.analyticsstep_count (version detection), app_timeApp usage events
sleeplamp.sleephealthkit_sleep_durationSleep stage data
screen_statelamp.screen_state (deprecated)inactive_durationLegacy 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 FeatureDescriptionConsumed By
device_usageScreen time, unlock events, app usagescreen_unlocks, screen_unlock_duration, screen_wakes, app_time
phone_usagePhone call metadata (SensorKit source)call_number, call_duration, call_degree (SensorKit mode)
messages_usageText message metadatatext_number, text_degree
visitsLocation visit data with categoriesvisit_time

Activity Raw Features (13)โ€‹

Raw FeatureSource ActivityConsumed ByDescription
surveylamp.surveysurvey_scoresQuestion-level survey responses
jewels_alamp.jewels_agame_level_scoresJewels A game events
jewels_blamp.jewels_bgame_level_scoresJewels B game events
balloon_risklamp.balloon_riskgame_level_scoresBalloon Risk events
cats_and_dogslamp.cats_and_dogsgame_level_scoresCats and Dogs events
pop_the_bubbleslamp.pop_the_bubblesgame_level_scoresPop The Bubbles events
spatial_spanlamp.spatial_spangame_level_scoresSpatial Span events
dcoglamp.dcogโ€”D-Cog events
digit_spanlamp.digit_spanโ€”Digit Span events
fragmented_letterslamp.fragmented_lettersโ€”Fragmented Letters events
funny_memorylamp.funny_memoryโ€”Funny Memory events
trails_blamp.trails_bโ€”Trails B events
voice_surveylamp.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 FeatureDeprecated SensorReplaced By
bluetoothlamp.bluetoothnearby_device
callslamp.callstelephony
smslamp.smstelephony
gyroscopelamp.gyroscopedevice_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).