OxWearables/biobankAccelerometerAnalysis

Error processing .cwa files: Device ID not found in header

mariascedasticity opened this issue · 3 comments

Error processing .cwa files: Device ID not found in header

Summary

While attempting to process a batch of .cwa files using the AccelerometerParser tool, I encountered an error stating that the device ID could not be found in the file header. These files are expected to be valid Axivity accelerometer data files downloaded directly from UKBB.

Steps to Reproduce

  1. Activate accelerometer environment via conda activate accelerometer
  2. Run the accProcess, e.g., accProcess '[PATH].cwa' --outputFolder [PATH] --deleteIntermediateFiles False

Actual Behavior

Processing file [PATH].cwa' with these arguments:

mgCutPointMVPA            : 100
mgCutPointVPA             : 425
nonWearFile               : [PATH]-nonWearBouts.csv.gz
npyFile                   : [PATH].npy
npyOutput                 : False
outputFolder              : [PATH]
processInputFile          : True
psd                       : False
rawDataParser             : AccelerometerParser
rawFile                   :  [PATH].csv.gz
rawOutput                 : False
resampleMethod            : linear
sampleRate                : 100
skipCalibration           : False
startTime                 : None
stationaryFile            : [PATH]-stationaryPoints.csv.gz
stationaryStd             : 13
summaryFile               : [PATH]-summary.json
timeSeriesDateColumn      : False
timeShift                 : 0
timeZone                  : Europe/London
tsFile                    : [PATH]-timeSeries.csv.gz
useFilter                 : True
verbose                   : False
ERROR: in getDeviceId("[PATH].cwa")
A deviceId value could not be found in input file header,
         this usually occurs when the file is not an Axivity .cwa accelerometer
         file. Exiting...

Additional Context

Some of the folders have been processed successfully. At some point, this error started emerging most of the times. What's the root cause of this, and what can I do to keep processing the files?

Does this happen with all files you're working on?
We frequently process the whole UKBiobank accelerometer dataset but haven't encountered this error yet.
Is this UKB data? If not, any chance you can share the file with me to debug?

@chanshing the error was coming from the original data, I no longer think this is the accProcess issue. Thank you for the reply!

Resolved, issue doesn't relate to the accProcess command.