Metadata-Version: 2.4
Name: pyPhasesRecordloaderSOF
Version: 0.1.0
Summary: Adds a record loaders to the pyPhases package
Home-page: https://gitlab.com/tud.ibmt.public/pyphases/pyphasesrecordloader/
Author: Franz Ehrlich
Author-email: fehrlichd@gmail.com
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.5
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pyPhases
Requires-Dist: pyPhasesRecordloader
Requires-Dist: pyedflib
Requires-Dist: pyPhasesRecordloaderSHHS
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license-file
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# Extension for pyPhasesRecordloader

Extension to load data records from the Study of Osteoporotic Fractures (SOF) database.

The extensions requires a downloaded version of the sof dataset. The location can be set through the config value `sof-path`.

## Usage

In a phase you can acess the data through the `RecordLoader`:

Add the plugins and config values to your `project.yaml`:

```yaml
name: SOFProject
plugins:
  - pyPhasesML
  - pyPhasesRecordloaderSOF
  - pyPhasesRecordloader

phases:
  - name: MyPhase

config:
  sof-path: C:/datasets/sof

```

In a phase (`phases/MyPhase.py`) you can acess the records through the `RecordLoader`:

```python
from pyPhasesRecordloader import RecordLoader
from pyPhases import Phase

class MyPhase(Phase):
    def run(self):
      recordIds = recordLoader.getRecordList()
      for recordId in recordIds:
        record = recordLoader.getRecord(recordId)
```

Run Your project with `python -m phases run MyPhase`


# Annotations

| Count | EventConcept                                 |
| ----: | :------------------------------------------- |
| 69280 | Limb movement - right\|Limb Movement (Right) |
| 64941 | Limb movement - left\|Limb Movement (Left)   |
| 61557 | Hypopnea\|Hypopnea                           |
| 58100 | ASDA arousal\|Arousal (ASDA)                 |
| 24017 | Stage 2 sleep\|2                             |
| 17201 | SpO2 artifact\|SpO2 artifact                 |
| 15620 | Stage 3 sleep\|3                             |
| 14126 | Wake\|0                                      |
|  9281 | Obstructive apnea\|Obstructive Apnea         |
|  8589 | Stage 1 sleep\|1                             |
|  3295 | REM sleep\|5                                 |
|  1898 | Arousal\|Arousal ()                          |
|  1580 | Stage 4 sleep\|4                             |
|  1078 | Central apnea\|Central Apnea                 |
|   859 | Technician Notes                             |
|   453 | Recording Start Time                         |
|   353 | Periodic leg movement - right\|PLM (Right)   |
|   250 | Periodic leg movement - left\|PLM (Left)     |
|   217 | SpO2 desaturation\|SpO2 desaturation         |
|    27 | Unscored\|9                                  |
|     2 | Respiratory artifact\|Respiratory artifact   |
|     2 | Mixed apnea\|Mixed Apnea                     |
