Skip to main content
https://circleci.com/gh/pdkit/pdkit.svg?style=shield https://readthedocs.org/projects/pdkit/badge/

PDKIT

TREMOR PROCESSOR

Example how to use pdkit to calculate tremor amplitude and frequency:

>>> import pdkit
>>> tp = pdkit.TremorProcessor()
>>> ts = pdkit.TremorTimeSeries().load(filename)
>>> amplitude, frequency = tp.amplitude(ts)

where, filename is the data path to load, by default in the cloudUPDRS format.

Pdkit can also read data in the MPower format, just like:

>>> ts = pdkit.TremorTimeSeries().load(filename, 'mpower')

where, filename is the data path to load in MPower format.

To calculate Welch, as a robust alternative to using Fast Fourier Transform, use like:

>>> amplitude, frequency = tp.amplitude(ts, 'welch')

This class also provides a method named extract_features to extract all the features available in Tremor Processor.

>>> tp.extract_features(ts)

BRADYKINESIA

>>> import pdkit
>>> ts = pdkit.TremorTimeSeries().load(filename)
>>> tp = pdkit.TremorProcessor(lower_frequency=0.0, upper_frequency=4.0)
>>> amplitude, frequency = tp.bradykinesia(ts)

GAIT

Example how to use pdkit to calculate various Gait features:

>>> import pdkit
>>> ts = pdkit.GaitTimeSeries().load(filename)
>>> gp = pdkit.GaitProcessor()
>>> freeze_times, freeze_indexes, locomotion_freezes = gp.freeze_of_gait(ts)
>>> frequency_of_peaks = gp.frequency_of_peaks(ts)
>>> speed_of_gait = gp.speed_of_gait(ts)
>>> step_regularity, stride_regularity, walk_symmetry = gp.walk_regularity_symmetry(ts)

where, filename is the data path to load, by default in the CloudUPDRS format.

FINGER TAPPING

Example how to use pdkit to calculate the mean alternate distance of the finger tapping tests:

>>> import pdkit
>>> ts = pdkit.FingerTappingTimeSeries().load(filename)
>>> ftp = pdkit.FingerTappingProcessor()
>>> ftp.mean_alnt_target_distance(ts)

kinesia scores (the number of key taps)

>>> ftp.kinesia_scores(ts)

TEST RESULT SET

Pdkit can be used to extract all the features for different measurements (i.e. tremor, finger tapping, gait) placed in a single folder. The result is a data frame where the measurements are rows and the columns are the features extracted.

>>> import pdkit
>>> testResultSet = pdkit.TestResultSet(folderpath)
>>> dataframe = testResultSet.process()

where folderpath is the relative folder with the different measurements. For CloudUPDRS there are measurements in the following folder ./tests/data.

We can also write the data frame to a output file like:

>>> testResultSet.write_output(dataframe, name)

Metadata

Release files for pdkit 0.4.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pdkit 0.4.6
File Size Uploaded
pdkit-0.4.6.tar.gz 32.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pdkit 0.4.6
File Interpreter ABI Platform
pdkit-0.4.6-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 71.1 kB

Release files / pdkit-0.4.6.tar.gz

Download URL pdkit-0.4.6.tar.gz
Size 32.9 kB
Tags Source
SHA-256 checksum
How to use checksums
55c0173ae6d497bd314363e9b60e07af6966607bcf2353787b35a5ef3e319371
BLAKE2b-256 checksum
How to use checksums
d61d0837a35322975fd8a1876de44e1fe9b5d7942a70eff84ee87768b0dff0e8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.19.7 CPython/3.6.6

Release files / pdkit-0.4.6-py2.py3-none-any.whl

Download URL pdkit-0.4.6-py2.py3-none-any.whl
Size 38.2 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
9bbaf06774f358c1ec9699cf7fa999c619e384c35e0d4efe1507227627e4ee7d
BLAKE2b-256 checksum
How to use checksums
4ca984ac543c58da8cf85d0d1500defa466da7039215b901a86bfdb7fa1f7559
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.19.7 CPython/3.6.6

Release history Release notifications | RSS feed

1.4.4

2 release files

1.4.3

2 release files

1.3.2

2 release files

1.3.1

2 release files

1.2

2 release files

1.0

2 release files

0.4.11

2 release files

0.4.10

2 release files

0.4.9

2 release files

0.4.8

2 release files

This release

0.4.6 This release

2 release files

0.4.5

2 release files

0.4.4

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4

2 release files

0.3.6

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.2.18

2 release files

0.2.17

2 release files

0.2.16

2 release files

0.2.15

2 release files

0.2.14

2 release files

0.2.13

2 release files

0.2.12

2 release files

0.2.11

1 release file

0.2.7

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.10

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

1 release file

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page