OSCR

StimVision: smartphone video kinematics to optimize DBS programming in Parkinson's disease.

Code ↔ Paper

2 matches between paragraphs of the paper and lines of its authors' code, computed by the harvester (lexical-v1). Click a colored paragraph or line to see its counterpart.

One block of code here has a permanent identifier (oscr:b:…), listed with the matches below: citable for good, with a page of its own. Select a match and press Cite to copy it. What a block identifier is.

The 2 matches
  1. [1] § Methods › Per‑patient ranking via dynamic weighting ↔ StimVision/dbs_analysis_library/analysis.py, lines 39 to 110 · score 0.56 · Dynamically Weighted Improvement, Responsiveness scores, workflow, shrinkage, Raw, ranked · block oscr:b:H0M2HARZ0E7BS-U · Report a mismatch
  2. [2] § Methods › Per‑patient ranking via dynamic weighting ↔ StimVision/dbs_analysis_library/analysis.py, lines 39 to 110 · score 0.54 · uniform weights, blends, shrinkage, Rankings, dynamic · block oscr:b:H0M2HARZ0E7BS-U · Report a mismatch

Paper

Loaded from Europe PMC by your browser; OSCR does not store it: doi.org · Europe PMC

The paper is loaded when this pane is shown.

The authors' code

Python · 110 lines · 4.8 KB · no license · 2 matches

  1. #!/usr/bin/env python3
  2. # -*- coding: utf-8 -*-
  3. """
  4. Core analysis functions for calculating improvement, dynamic weights, and
  5. ranking of DBS settings based on kinematic data.
  6. """
  7. import pandas as pd
  8. import numpy as np
  9. from .processing import sort_condition_key
  10. from .utils import parameter_directions
  11. def aggregate_task_data_by_hand(data_for_task, hand):
  12. """
  13. Aggregates kinematic data from multiple CSVs for a specific hand,
  14. averaging values across trials for each condition.
  15. """
  16. aggregated_data = {}
  17. if not isinstance(data_for_task, dict):
  18. return pd.DataFrame()
  19. for condition, hand_dict in data_for_task.items():
  20. if isinstance(hand_dict, dict) and hand in hand_dict:
  21. series_list = []
  22. for df in hand_dict[hand]:
  23. if isinstance(df, pd.DataFrame) and 'Attribute' in df.columns and 'Value' in df.columns:
  24. s = pd.to_numeric(df['Value'], errors='coerce')
  25. s.index = df['Attribute']
  26. series_list.append(s)
  27. if series_list:
  28. aggregated_data[condition] = pd.concat(series_list, axis=1).mean(axis=1)
  29. if not aggregated_data:
  30. return pd.DataFrame()
  31. summary_df = pd.DataFrame(aggregated_data).T
  32. summary_df = summary_df.reindex(sorted(summary_df.index, key=sort_condition_key)).dropna(axis=0, how='all')
  33. return summary_df
  34. def perform_full_hand_analysis(data_by_condition, hand, baseline, shrinkage_lambda=0.1):
  35. """
  36. Performs the complete analysis pipeline for a single hand using a robust,
  37. integrated workflow with regularized dynamic weighting.
  38. Args:
  39. data_by_condition (dict): Nested dict of data: {condition: {hand: [DataFrames]}}.
  40. hand (str): 'Left' or 'Right'.
  41. baseline (str): The name of the baseline condition (e.g., "Med Off - DBS Off").
  42. shrinkage_lambda (float): Regularization parameter (0 to 1). A small value
  43. like 0.1 (default) blends data-driven weights with
  44. uniform weights to prevent over-fitting to noise.
  45. Returns:
  46. dict: A dictionary containing all intermediate and final analysis results.
  47. """
  48. summary_df = aggregate_task_data_by_hand(data_by_condition, hand)
  49. results = {
  50. 'summary_df': summary_df, 'improvement_df': pd.DataFrame(),
  51. 'responsiveness_scores': pd.Series(dtype=float), 'final_dynamic_weights': pd.Series(dtype=float),
  52. 'dynamic_scores': pd.Series(dtype=float),
  53. 'dynamic_ranking_results': {'ranked_names': [], 'ranked_scores': []}
  54. }
  55. if summary_df.empty or baseline not in summary_df.index:
  56. print(f"Warning: No summary data for hand '{hand}' or baseline '{baseline}' not found. Aborting analysis for this hand.")
  57. return results
  58. on_conditions = summary_df.index.drop(baseline, errors='ignore')
  59. if on_conditions.empty:
  60. print(f"Warning: No 'ON' conditions found to compare against baseline for hand '{hand}'.")
  61. return results
  62. baseline_series = summary_df.loc[baseline]
  63. raw_change_df = summary_df.loc[on_conditions].subtract(baseline_series, axis=1)
  64. improvement_df = raw_change_df.copy()
  65. for param, direction in parameter_directions.items():
  66. if param in improvement_df.columns and direction == 'lower':
  67. improvement_df[param] *= -1
  68. results['improvement_df'] = improvement_df
  69. responsiveness_scores = improvement_df.std().fillna(0)
  70. responsiveness_scores = responsiveness_scores[responsiveness_scores > 1e-9] # Filter non-variable parameters.
  71. results['responsiveness_scores'] = responsiveness_scores
  72. if responsiveness_scores.empty or responsiveness_scores.sum() == 0:
  73. print(f"Warning: No responsive parameters found for hand '{hand}'. Cannot calculate dynamic scores.")
  74. return results
  75. # Apply regularized dynamic weighting.
  76. data_driven_weights = responsiveness_scores / responsiveness_scores.sum()
  77. n_responsive_params = len(data_driven_weights)
  78. uniform_weights = pd.Series(1.0 / n_responsive_params, index=data_driven_weights.index)
  79. final_dynamic_weights = (1 - shrinkage_lambda) * data_driven_weights + shrinkage_lambda * uniform_weights
  80. results['final_dynamic_weights'] = final_dynamic_weights
  81. # Compute the final Dynamically Weighted Improvement Score (DWIS).
  82. common_params = improvement_df.columns.intersection(final_dynamic_weights.index)
  83. dynamic_scores = improvement_df[common_params].dot(final_dynamic_weights[common_params])
  84. results['dynamic_scores'] = dynamic_scores
  85. # Rank conditions by DWIS.
  86. ranked_scores = dynamic_scores.sort_values(ascending=False)
  87. results['dynamic_ranking_results'] = {
  88. 'ranked_names': ranked_scores.index.tolist(),
  89. 'ranked_scores': ranked_scores.values.tolist(),
  90. }
  91. return results

analysis.py at commit 376f189, no license · at the source

Overview

Authors: Florian Lange1, Philipp Köberle1, Gamze Adaçay1, Diego L. Guarin2, Jens Volkmann1, Robert Peach1, Martin M. Reich1
  1. Department of Neurology, University of Würzburg,Würzburg, Germany
  2. Movement Estimation and Analysis Laboratory, Department of Applied Physiology and Kinesiology, University of Florida,Gainesville, FL USA
Institutions: University of Würzburg (Germany); University of Florida (United States)
Journal: NPJ Parkinson's disease, volume 12, issue 1, article 100
Dates: received 13 December 2025; accepted 18 March 2026; published online 20 April 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.1038/s41531-026-01335-6 · PMID 42009683 · PMCID PMC13096112 · OpenAlex W7154937198
Open access: gold, a free copy (OpenAlex)
Status: code verified (how the code is found and verified)
Categories: other (modality), human (organism), Parkinson's (population), clinical / translational (subfield)
Methods: Connectivity, Statistics, Smoothing, state filtering, decompositions
Keywords: Computational biology and bioinformatics, Neurology, Neuroscience
Topic: Deep Brain Stimulation and Movement Disorders (Clinical Neurology, Medicine), according to OpenAlex
Citations: not cited yet (Europe PMC); 13 references in the paper

Abstract

Deep brain stimulation (DBS) improves motor function in Parkinson’s disease, yet programming remains labor-intensive and largely subjective. We evaluated a smartphone video-based kinematic framework (StimVision) for objective, within-session optimization of DBS settings and characterization of therapeutic motor signatures. Fifteen patients with subthalamic DBS performed repetitive hand opening–closing while multiple stimulation programs were tested in the medication-off state. Markerless pose estimation from 60 fps smartphone video generated 23 quantitative kinematic features. A patient-specific Dynamically Weighted Improvement Score (DWIS) ranked programs by composite improvement relative to DBS-off. The framework identified a unique optimal program for each patient, with robust ranking stability. Group-level improvements at the optimal setting were dominated by gains in speed and rhythm metrics, including mean velocity, closing speed, and movement frequency, alongside reduced intra-sequence decay. Sparse principal component analysis revealed three kinematic domains—Movement Speed, Movement Consistency, and Rhythm & Timing. Structural comparison with a levodopa cohort demonstrated substantial overlap in speed and consistency domains but divergence in timing-related features. Smartphone-based kinematics enable objective DBS optimization and provide a shared quantitative framework for comparing electrical and pharmacological therapies.

Reproduced under the paper's license (CC BY), from the paper cited above.

Repository

Its files are read in the Code ↔ Paper reader above, with 2 matches between paragraphs and lines of code.

Flolan2/StimVision_data

License: none: the authors keep all their rights
State: the link answers, verified on 29 September 2026
Evidence: files inventoried
Commit: 376f189775f0657d5a9edcf4a3d2c42dcd633d62, 24 February 2026
Languages: Python (5)
Size: 15 files, 5 scripts
Software Heritage: not archived
Found in: “Code availability”
Holds: environment (StimVision/requirements.txt)
Not found: README, license file, CITATION.cff, tests, continuous integration, documentation
Tools: NumPy (4 files), pandas (4 files), Matplotlib (1 file), seaborn (1 file)
Availability: 1 check, the latest on 29 September 2026: the link answers
  • 29 September 2026: the link answers
5 files

Code availability

The core VisionMD computer vision pipeline used for feature extraction is open-source and available at https://www.visionmd.ai/. The StimVision analysis pipeline used in this study is publicly available at https://github.com/Flolan2/StimVision_data.

Reproduced under the paper's license (CC BY), from the paper cited above.

Tracing map

Proposed by the machine: these links were found in the paper and verified at the source, without human review. The map will receive a Zenodo DOI once one of the paper's authors has validated it with their ORCID.

What the map holds:

  • 1 repository of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
  • 5 scripts, each with its path and the digest of its content;
  • 2 matches between paragraphs of the paper and lines of the code (method lexical-v1);
  • neither the text of the paper nor the code itself.

Its JSON (tracing-map.json) is deposited on Zenodo with its DOI once the map is validated.

Data

No dataset and no data link were found in the paper.

Data availability

The derived kinematic datasets and analysis matrices generated during the current study are publicly available at: https://github.com/Flolan2/StimVision_data.

Reproduced under the paper's license (CC BY), from the paper cited above.

Versions

The history of this record: each version stored by the harvester or made by a correction of its authors or of the maintainers of its code, and what changed in its facts. The texts of the paper (its abstract, its availability statements) are not part of it; versions that changed only those are not listed.

Version 1, 29 September 2026: the first record

Recorded: type, language, journal, volume, issue, pages, dates, 7 authors, 3 keywords, 2 funders, 11 references.

Cite

This paper

Lange, F., Köberle, P., Adaçay, G., Guarin, D. L., Volkmann, J., Peach, R., & Reich, M. M. (2026). StimVision: smartphone video kinematics to optimize DBS programming in Parkinson's disease. NPJ Parkinson's disease, 12(1), 100. https://doi.org/10.1038/s41531-026-01335-6

BibTeX

@article{lange2026stimvision,
author = {Lange, Florian and Köberle, Philipp and Adaçay, Gamze and Guarin, Diego L. and Volkmann, Jens and Peach, Robert and Reich, Martin M.},
title = {{StimVision: smartphone video kinematics to optimize DBS programming in Parkinson's disease}},
journal = {NPJ Parkinson's disease},
year = {2026},
month = apr,
volume = {12},
number = {1},
pages = {100},
publisher = {Nature Publishing Group},
issn = {2373-8057},
doi = {10.1038/s41531-026-01335-6},
url = {https://doi.org/10.1038/s41531-026-01335-6},
pmid = {42009683},
pmcid = {PMC13096112}
}

RIS

TY - JOUR
AU - Lange, Florian
AU - Köberle, Philipp
AU - Adaçay, Gamze
AU - Guarin, Diego L.
AU - Volkmann, Jens
AU - Peach, Robert
AU - Reich, Martin M.
TI - StimVision: smartphone video kinematics to optimize DBS programming in Parkinson's disease
T2 - NPJ Parkinson's disease
J2 - NPJ Parkinsons Dis
PY - 2026
DA - 2026/04/20
VL - 12
IS - 1
SP - 100
SN - 2373-8057
PB - Nature Publishing Group
DO - 10.1038/s41531-026-01335-6
UR - https://doi.org/10.1038/s41531-026-01335-6
LA - en
ER -

CSL-JSON

{
"id": "10.1038/s41531-026-01335-6",
"type": "article-journal",
"title": "StimVision: smartphone video kinematics to optimize DBS programming in Parkinson's disease",
"container-title": "NPJ Parkinson's disease",
"author": [
{
"family": "Lange",
"given": "Florian"
},
{
"family": "Köberle",
"given": "Philipp"
},
{
"family": "Adaçay",
"given": "Gamze"
},
{
"family": "Guarin",
"given": "Diego L."
},
{
"family": "Volkmann",
"given": "Jens"
},
{
"family": "Peach",
"given": "Robert"
},
{
"family": "Reich",
"given": "Martin M."
}
],
"container-title-short": "NPJ Parkinsons Dis",
"volume": "12",
"issue": "1",
"page": "100",
"DOI": "10.1038/s41531-026-01335-6",
"PMID": "42009683",
"PMCID": "PMC13096112",
"ISSN": "2373-8057",
"publisher": "Nature Publishing Group",
"URL": "https://doi.org/10.1038/s41531-026-01335-6",
"language": "en",
"issued": {
"date-parts": [
[
2026,
4,
20
]
]
}
}

The tracing map gets a citation of its own once an author has validated it and it has a DOI.

Similar papers

The papers with a page that share the most with this one: the tools found in their code, their categories, datasets, cited references and authors, the rarest counting most.

[1] doi:10.1016/j.bas.2022.100893 [code]
Increased variance in second electrode accuracy during deep brain stimulation and its relationship to pneumocephalus, brain shift, and clinical outcomes: A retrospective cohort study.
Journal: Brain & spine
In common: seaborn, pandas, Matplotlib, 1 other tool, Parkinson's, other, clinical / translational, 1 reference
[2] doi:10.1038/s41531-024-00742-x [code]
Interpretable video-based tracking and quantification of parkinsonism clinical motor states.
Journal: NPJ Parkinson's disease
In common: seaborn, pandas, Matplotlib, 1 other tool, Parkinson's, clinical / translational, 1 reference
[3] doi:10.1016/j.ebiom.2026.106293 [code]
Dynamic neural states underpin motor symptom severity in Parkinson's disease: a longitudinal analysis of chronic cortico-subthalamic nucleus recordings.
Journal: EBioMedicine
In common: seaborn, pandas, Matplotlib, 1 other tool, Parkinson's, 1 reference
[4] doi:10.1038/s41598-025-13558-3
Longitudinal dynamics of clinical and neurophysiological changes in parkinson's disease over four and a half years.
Journal: Scientific reports
In common: Parkinson's, other, clinical / translational, 2 references
[5] doi:10.3390/s23198330
Classifying Tremor Dominant and Postural Instability and Gait Difficulty Subtypes of Parkinson's Disease from Full-Body Kinematics.
Journal: Sensors (Basel, Switzerland)
In common: Parkinson's, other, clinical / translational, 2 references
[6] doi:10.1038/s41531-025-01252-0
Video-based machine learning models for predicting deep brain stimulation outcomes in Parkinson's disease patients.
Journal: NPJ Parkinson's disease
In common: Parkinson's, clinical / translational, 2 references
[7] doi:10.1212/nxg.0000000000200092 [code]
Genome-wide Analysis of Motor Progression in Parkinson Disease.
Journal: Neurology. Genetics
In common: pandas, Matplotlib, NumPy, Parkinson's, clinical / translational, 1 reference
[8] doi:10.1038/s41531-022-00396-7 [code]
Multiple input algorithm-guided Deep Brain stimulation-programming for Parkinson's disease patients.
Journal: NPJ Parkinson's disease
In common: Parkinson's, clinical / translational, 2 references
[9] doi:10.1007/s00234-026-03939-4
Data-driven neurobiological subtyping of Parkinson's disease using diffusion MRI-derived isotropic diffusion.
Journal: Neuroradiology
In common: Parkinson's, clinical / translational, 2 references
[10] doi:10.1038/s41598-023-44322-0
MRI-based multivariate gray matter volumetric distance for predicting motor symptom progression in Parkinson's disease.
Journal: Scientific reports
In common: Parkinson's, clinical / translational, 2 references

Contribute

The authors of this paper can claim it, correct its record and validate its tracing map, and the maintainers of its code (its owner, or a public member of its organization) correct what it says of their repository; anyone signed in can ask for its removal. Every request goes to OSCR's own machine, which answers it; your account page follows them.

Sign in with ORCID to claim this paper as one of its authors, correct its record or validate its tracing map: when the paper's metadata lists your ORCID iD, you are recognized at once. Maintainers of its code: sign in with GitHub, then claim the repository on your account page.

Add the badge to the code's README

OSCR: the badge of this paper

If you are an author or a maintainer of this paper's code, you can add this badge. It says what OSCR knows of the paper (its code, its validated tracing map) and links the code to this page. Paste one of these snippets under the README's title. Keep the two marks around it, so that the badge can be replaced in place and is never added twice. OSCR changes nothing in your repository.

Markdown
<!-- oscr-badge:start -->
[![OSCR](https://openscicode.org/badge/doi/10.1038/s41531-026-01335-6.svg)](https://openscicode.org/badge/doi/10.1038/s41531-026-01335-6)
<!-- oscr-badge:end -->
reStructuredText
.. oscr-badge:start

.. image:: https://openscicode.org/badge/doi/10.1038/s41531-026-01335-6.svg
   :target: https://openscicode.org/badge/doi/10.1038/s41531-026-01335-6
   :alt: OSCR

.. oscr-badge:end
HTML
<!-- oscr-badge:start -->
<a href="https://openscicode.org/badge/doi/10.1038/s41531-026-01335-6"><img src="https://openscicode.org/badge/doi/10.1038/s41531-026-01335-6.svg" alt="OSCR"></a>
<!-- oscr-badge:end -->

On GitHub, open the README, choose Edit (the pencil), paste the snippet under the title, then "Commit changes".

If you choose to, you can have the badge kept up to date for you, with oscr badge --write from the command line or with the GitHub Action in your repository's workflows. Every other form and option (a card, AsciiDoc, LaTeX, shields.io) is on the badge page.

Request its removal

To ask OSCR to remove this record, the copies of its authors' scripts or its tracing map, use the removal request page: signed in, you say who you are, what to remove and why, then review and confirm the request. Published rules decide every request (how).

Discussion, reproductions, activity

Discussion: code errors and mismatches between the code and the paper about this paper and its code, from readers and its authors, beside the paper and its tracing map.

Report a mismatch between the code and the paper · Report a code error (signed in)

Reproductions: reports from readers who ran the authors' code and did not get the paper's result, what they ran, with which environment, commit and data.

Report a reproduction failure (signed in)

Versions of its code: the releases of its code tied to a version of this paper (the preprint, the accepted manuscript, the version of record…), each with the tracing map versioned with it.

Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.