BIDMCDigitalPsychiatry / LAMP-platform

The LAMP Platform (issues and documentation).
https://docs.lamp.digital/
Other
12 stars 10 forks source link

Missing Accelerometer and Screen State Data #668

Closed ertjlane closed 1 year ago

ertjlane commented 1 year ago

Describe the bug For a study on mindLAMP two patients are missing accelerometer data, and one is missing substantial screen state data Both participants have continuously opened the app, and kept their devices out of airplane/low power mode. The participants have both uninstalled and reinstalled mindLAMP, with no palpable effect on data quality. Notably, the participants missing data are not COMPLETELY missing data, as a raw data pull and check of the dashboard were able to show that some data is being collected, just at very low levels. This doesn't appear to be a systemwide issue, as another of our team is having no issue collecting accelerometer data. The sensors have been appropriately specified, with screen state data being assigned the spec 'screen_state'.

This is distinct from issue #664, as that was due to a bug in our data quality check code which has since been resolved.

Researcher id: ysfm3gmsy2fyvfgxgjpr Study id: cpm1207zqaj2rdw81v9a

Expected behavior Participants in the study should receive 'good' levels of accelerometer and screen state data, appearing as green in the blocks of the screenshot below.

Screenshots sleep_muss

jsm

Smartphone (please complete the following information): Device: iphone XR OS: [iOS 15.5]

Device: iPhone 8+ OS: [iOS 15.5]

Device: iPhone 12 OS: [iOS 15.5]

ZCOEngineer commented 1 year ago

@ertjlane are you experiencing this in android devices too?

jijopulikkottil commented 1 year ago

Is this data representation (of data received) available on lamp dashboard ?

ertjlane commented 1 year ago

We have not had this issue with any android users thus far. And yes, the data is viewable on the dashboard, visualizations are attached as vega specs to the participants.

The user id's for those experiencing this issue are: U0893781606 U5198940214 U5194750174 (this user started having strong data in the past few days, but had low data quality for weeks and it's still unclear why)

jijopulikkottil commented 1 year ago

We are testing it on our side locally for lamp.accelerometer. Will update here soon. [Some reason, couldn't send the device matrix notification yet.]

jijopulikkottil commented 1 year ago

@ertjlane when we check the lamp.analytics, GPS status is denied for these users U0893781606 and U5198940214. So it prevent the app from running in background to collect data.

We couldn't see any data visualisation map of user U5194750174 to check the data missing days. But seeing some logout events for the user U5194750174. [We will clear all queued data when user logout.]

User U5194750174 logout on June 29 and logged back in July 14 So there will be no data between June 29 and July 14.

ertjlane commented 1 year ago

@jijopulikkottil Thanks for checking this out! If I understand it correctly, GPS being denied should not interfere with accelerometer and screen state data collection. If GPS data not being permitted compromises data collection that is a bug. Is that the case, or did I miscommunicate about the sensors in question?

Yes, U519 logged out several times. However, that shouldn't compromise the data collection during the time that the user is logged in. When you say a visualization map, what exactly do you mean? Do you mean the data quality visualization or...?

Let me know if there's any other information I can provide that would be helpful.

jijopulikkottil commented 1 year ago

To keep the app running in background, we are depending on the location access. So if it is denied, the app may not run longer in background [which will prevent data collection in background].

About the user U519., we will collect data only when user is logged in. Also we will clear all queued data when logged out. So there is a chance to clear all collected data which are not synced to server. [FYI - we will not sync if device is in low power mode]

Yes, data quality visualization.

avaidyam commented 1 year ago

GPS being denied should not interfere with accelerometer and screen state data collection

@ertjlane As @jijopulikkottil correctly pointed out, we do need GPS permissions in every case for background data collection to occur. Would you say this isn't clear in our documentation? If so, could you create a new GitHub issue to track that? We may need a separate new page entirely about which permissions are accessed and why for both iOS and Android.

Since we've identified the root cause of the low data quality, I'm closing the issue for now, @ertjlane.