Skip to content

Commit 9dbede2

Browse files
committed
Shorten E4 notes in README and document format in module
E4 is a niche format, so the README now has a short note on what the validator does with it. The file layouts, column names, and tags/IBI rules move to the empatica module docstring.
1 parent e1258b5 commit 9dbede2

2 files changed

Lines changed: 19 additions & 22 deletions

File tree

‎README.md‎

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -142,27 +142,9 @@ dataset directory.
142142
- **privacy** - PHI patterns (SSN, email, phone numbers), date patterns, and
143143
sensitive file detection.
144144

145-
The validator recognizes the headerless CSV layout exported by Empatica E4
146-
Connect for ACC, BVP, EDA, HR, IBI, and TEMP files (file names are matched
147-
in any letter case). In a matching E4 session, an empty
148-
`tags.csv` means no event markers, and an `IBI.csv` with only its start-time
149-
row means no detected beats; both are reported as information. Nine- or
150-
ten-digit Unix event timestamps are not labeled as phone numbers, even when
151-
shifted outside 2000–2100. Other empty files and genuine phone-number patterns
152-
still receive warnings. Quality checks use `acc_x`,
153-
`acc_y`, `acc_z`, `bvp`, `eda`, `hr`, and `temp` as signal column names and skip the
154-
timestamp and sample-rate rows; IBI.csv uses `time_offset` and `ibi`. This format check does not establish that
155-
timestamps have been de-identified; review them before sharing.
156-
See [Empatica's E4 data format](https://www.empatica.com/blog/decoding-wearable-sensor-signals-what-to-expect-from-your-e4-data/).
157-
A small [synthetic E4 session](tests/fixtures/e4_session) in the test fixtures
158-
shows the expected ACC, BVP, EDA, HR, IBI, TEMP, and tags CSV layouts. Its values are
159-
invented and contain no participant data.
160-
161-
For contributors adding another CSV export format, a detector in
162-
[`csv_formats.py`](physionet/validate/checks/csv_formats.py) can return a
163-
`CsvLayout` describing its columns, metadata rows, and empty-file behavior.
164-
The integrity, quality, privacy, and filesystem checks use that shared layout;
165-
ordinary headered CSV remains the default.
145+
CSV exports from the Empatica E4 wearable are recognized, so their headerless
146+
layout, empty `tags.csv` files, and Unix timestamps don't produce false errors
147+
or privacy warnings. This doesn't check that timestamps are de-identified.
166148

167149
**Examples:**
168150

‎physionet/validate/checks/empatica.py‎

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,19 @@
1-
"""Recognize the headerless CSV layout exported by Empatica E4 Connect."""
1+
"""Recognize the headerless CSV layout exported by Empatica E4 Connect.
2+
3+
Format: https://www.empatica.com/blog/decoding-wearable-sensor-signals-what-to-expect-from-your-e4-data/
4+
5+
- ACC, BVP, EDA, HR, TEMP: a row of Unix start times, a row of sample rates,
6+
then samples. Data columns are named acc_x/acc_y/acc_z, bvp, eda, hr, temp,
7+
which is what ValidationConfig.value_ranges keys should use.
8+
- IBI: a "<start time>, IBI" row, then time_offset,ibi rows. A file with only
9+
the first row means no beats were detected and is reported as information.
10+
- tags: one event time per row, no header; empty means no events. It is only
11+
treated as E4 when a recognized sensor or IBI file sits beside it, and only
12+
its event_time column is exempt from the phone-number pattern.
13+
14+
File names are matched in any letter case. tests/fixtures/e4_session holds a
15+
small synthetic example.
16+
"""
217

318
import csv
419
from pathlib import Path

0 commit comments

Comments
 (0)