StimVision: smartphone video kinematics to optimize DBS programming in Parkinson's disease.
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] § 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] § 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
- #!/usr/bin/env python3
- # -*- coding: utf-8 -*-
- """
- Core analysis functions for calculating improvement, dynamic weights, and
- ranking of DBS settings based on kinematic data.
- """
- import pandas as pd
- import numpy as np
- from .processing import sort_condition_key
- from .utils import parameter_directions
- def aggregate_task_data_by_hand(data_for_task, hand):
- """
- Aggregates kinematic data from multiple CSVs for a specific hand,
- averaging values across trials for each condition.
- """
- aggregated_data = {}
- if not isinstance(data_for_task, dict):
- return pd.DataFrame()
- for condition, hand_dict in data_for_task.items():
- if isinstance(hand_dict, dict) and hand in hand_dict:
- series_list = []
- for df in hand_dict[hand]:
- if isinstance(df, pd.DataFrame) and 'Attribute' in df.columns and 'Value' in df.columns:
- s = pd.to_numeric(df['Value'], errors='coerce')
- s.index = df['Attribute']
- series_list.append(s)
- if series_list:
- aggregated_data[condition] = pd.concat(series_list, axis=1).mean(axis=1)
- if not aggregated_data:
- return pd.DataFrame()
- summary_df = pd.DataFrame(aggregated_data).T
- summary_df = summary_df.reindex(sorted(summary_df.index, key=sort_condition_key)).dropna(axis=0, how='all')
- return summary_df
- def perform_full_hand_analysis(data_by_condition, hand, baseline, shrinkage_lambda=0.1):
- """
- Performs the complete analysis pipeline for a single hand using a robust,
- integrated workflow with regularized dynamic weighting.
- Args:
- data_by_condition (dict): Nested dict of data: {condition: {hand: [DataFrames]}}.
- hand (str): 'Left' or 'Right'.
- baseline (str): The name of the baseline condition (e.g., "Med Off - DBS Off").
- shrinkage_lambda (float): Regularization parameter (0 to 1). A small value
- like 0.1 (default) blends data-driven weights with
- uniform weights to prevent over-fitting to noise.
- Returns:
- dict: A dictionary containing all intermediate and final analysis results.
- """
- summary_df = aggregate_task_data_by_hand(data_by_condition, hand)
- results = {
- 'summary_df': summary_df, 'improvement_df': pd.DataFrame(),
- 'responsiveness_scores': pd.Series(dtype=float), 'final_dynamic_weights': pd.Series(dtype=float),
- 'dynamic_scores': pd.Series(dtype=float),
- 'dynamic_ranking_results': {'ranked_names': [], 'ranked_scores': []}
- }
- if summary_df.empty or baseline not in summary_df.index:
- print(f"Warning: No summary data for hand '{hand}' or baseline '{baseline}' not found. Aborting analysis for this hand.")
- return results
- on_conditions = summary_df.index.drop(baseline, errors='ignore')
- if on_conditions.empty:
- print(f"Warning: No 'ON' conditions found to compare against baseline for hand '{hand}'.")
- return results
- baseline_series = summary_df.loc[baseline]
- raw_change_df = summary_df.loc[on_conditions].subtract(baseline_series, axis=1)
- improvement_df = raw_change_df.copy()
- for param, direction in parameter_directions.items():
- if param in improvement_df.columns and direction == 'lower':
- improvement_df[param] *= -1
- results['improvement_df'] = improvement_df
- responsiveness_scores = improvement_df.std().fillna(0)
- responsiveness_scores = responsiveness_scores[responsiveness_scores > 1e-9] # Filter non-variable parameters.
- results['responsiveness_scores'] = responsiveness_scores
- if responsiveness_scores.empty or responsiveness_scores.sum() == 0:
- print(f"Warning: No responsive parameters found for hand '{hand}'. Cannot calculate dynamic scores.")
- return results
- # Apply regularized dynamic weighting.
- data_driven_weights = responsiveness_scores / responsiveness_scores.sum()
- n_responsive_params = len(data_driven_weights)
- uniform_weights = pd.Series(1.0 / n_responsive_params, index=data_driven_weights.index)
- final_dynamic_weights = (1 - shrinkage_lambda) * data_driven_weights + shrinkage_lambda * uniform_weights
- results['final_dynamic_weights'] = final_dynamic_weights
- # Compute the final Dynamically Weighted Improvement Score (DWIS).
- common_params = improvement_df.columns.intersection(final_dynamic_weights.index)
- dynamic_scores = improvement_df[common_params].dot(final_dynamic_weights[common_params])
- results['dynamic_scores'] = dynamic_scores
- # Rank conditions by DWIS.
- ranked_scores = dynamic_scores.sort_values(ascending=False)
- results['dynamic_ranking_results'] = {
- 'ranked_names': ranked_scores.index.tolist(),
- 'ranked_scores': ranked_scores.values.tolist(),
- }
- return results
analysis.py at commit 376f189, no license · at the source
Overview
- Department of Neurology, University of Würzburg,Würzburg, Germany
- Movement Estimation and Analysis Laboratory, Department of Applied Physiology and Kinesiology, University of Florida,Gainesville, FL USA
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
376f189775f0657d5a9edcf4a3d2c42dcd633d62, 24 February 2026Availability: 1 check, the latest on 29 September 2026: the link answers
- 29 September 2026: the link answers
5 files
- StimVision/
dbs_analysis_library/ , Python, 110 lines, 2 matchesanalysis.py - StimVision/
dbs_analysis_library/ , Python, 102 linesprocessing.py - StimVision/
dbs_analysis_library/ , Python, 46 linesutils.py - StimVision/
dbs_analysis_library/ , Python, 137 linesvisualization.py - StimVision/
ismr_analyzer.py , Python, 241 lines
Code availability
The core VisionMD computer vision pipeline used for feature extraction is open-source and available at https://
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://
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://
BibTeX
@article{lange2026stimvi
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/
url = {https://
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/
VL - 12
IS - 1
SP - 100
SN - 2373-8057
PB - Nature Publishing Group
DO - 10.1038/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1038/
"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":
"volume": "12",
"issue": "1",
"page": "100",
"DOI": "10.1038/
"PMID": "42009683",
"PMCID": "PMC13096112",
"ISSN": "2373-8057",
"publisher": "Nature Publishing Group",
"URL": "https://
"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 & spineIn 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 diseaseIn 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: EBioMedicineIn 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 reportsIn 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 diseaseIn 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. GeneticsIn 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 diseaseIn 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: NeuroradiologyIn 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 reportsIn 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.
Claim this paper
Correct its record
Say what each link of this record is, remove the ones that are not the paper's, add the ones that are missing. The correction becomes a new version of the record, in its Versions section.
Validate its tracing map
You validate the map as this page shows it: 1 repository of the authors' code, each at its verified commit and with its license, 5 scripts, and 2 matches between paragraphs and code (see the Code and Map sections). It then receives a DOI on Zenodo, with you (your ORCID iD) and OSCR as its creators; the code itself is not deposited.
The map's fingerprint: sha256:8c2f4518184fc544…
Add the badge to the code's README
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 -->
[](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:endHTML
<!-- 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.
