Skip to main content

Adds a record loaders to the pyPhases package

Project description

Extension for pyPhasesRecordloader

Extension to load data records from the MrOS Sleep Study (MrOS) database.

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

Usage

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

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

name: MrOSProject
plugins:
  - pyPhasesML
  - pyPhasesRecordloaderMrOS
  - pyPhasesRecordloader

phases:
  - name: MyPhase

config:
  mros-path: C:/datasets/mros

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

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
1452282 SpO2 desaturation|SpO2 desaturation
684753 Periodic leg movement - right|PLM (Right)
663100 Periodic leg movement - left|PLM (Left)
624159 ASDA arousal|Arousal (ASDA)
411225 Limb movement - right|Limb Movement (Right)
399403 Limb movement - left|Limb Movement (Left)
296939 Unsure|Unsure
283691 Hypopnea|Hypopnea
207671 SpO2 artifact|SpO2 artifact
187852 Stage 2 sleep|2
173961 Wake|0
120933 Obstructive apnea|Obstructive Apnea
111248 Stage 1 sleep|1
83140 Stage 3 sleep|3
43650 REM sleep|5
32577 Central apnea|Central Apnea
4745 Stage 4 sleep|4
3930 Recording Start Time
3754 Arousal|Arousal ()
1095 Arousal|Arousal (ARO Limb)
193 Periodic breathing|Periodic Breathing
133 Arousal|Arousal (Asda)
80 Mixed apnea|Mixed Apnea
58 Tachycardia|Tachycardia
27 Arousal resulting from respiratory effort|Arousal (ARO RES)
26 Respiratory effort related arousal|RERA
8 Respiratory artifact|Respiratory artifact
2 Unscored|9
2 Narrow complex tachycardia|Narrow Complex Tachycardia
2 Blood pressure artifact|Blood pressure artifact
1 Spontaneous arousal|Arousal (ARO SPONT)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyphasesrecordloadermros-0.8.1.tar.gz (6.8 kB view details)

Uploaded Source

File details

Details for the file pyphasesrecordloadermros-0.8.1.tar.gz.

File metadata

File hashes

Hashes for pyphasesrecordloadermros-0.8.1.tar.gz
Algorithm Hash digest
SHA256 e0d3c7ed6fdcfe7656299c4b529cf99e9b8fc34a74e0c0de56c667695298655c
MD5 62f8dbaace483de595ca87809f7b471a
BLAKE2b-256 9718946f54daf1d314fcc91a75a45dab19b49e9fb25013b3bb027f9386c7048d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page