OxWearables / biobankAccelerometerAnalysis

Extracting meaningful health information from large accelerometer datasets
https://biobankaccanalysis.readthedocs.io/en/latest/index.html
Other
179 stars 61 forks source link

Recover temperature values along activity and sleep diagnoses #219

Closed LeandroCasiraghi closed 1 year ago

LeandroCasiraghi commented 1 year ago

Hello all and sorry if this is a very silly question. I have been going over some of my research data from a pilot study we've been running, and we were able to see that temperature recordings from the AX3 device show pretty good patterns in terms of the expected times of the min and max of the rhythm, which we sometimes use to assess circadian phase and/or robustness. We have asking participants to wear the AX3 with the sensor facing the skin, in some cases on the inner side of the wrist, similar to how we've used some other temperature loggers in the past. So far, in order to recover temperature values, I coded a little script (in R, for downstream analysis reasons) that goes over the timeSeries and the epoch files, matching timestamps between the two and adding temperature values to the contents of the original timeSeries csv file, which is then re-exported. I've been looking into the code to see if I could tweak a couple of lines here and there to get the temperature values (and according to what I've read in one of the PR, light measurement values) in the timeSeries file after using accProcess but haven't figured out yet - basically because I have very little training in Python and none in Java. If anyone could point me to the specific function(s) and/or line(s) where I should be looking to work on, it would be a lot. Thank you all for the amazing work with this package.

EDIT: Please disregard, I was finally able to figure it out. The extra output columns (in my case ['temp']) can be added in the definition of the writeTimeSeries function in utils.py. I'm closing this issue and hopefully it will help whoever is looking to recover temperature (and light, in the future) values easily.