clinical-scope 0.4.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. clinical_scope-0.4.2/LICENSE +203 -0
  2. clinical_scope-0.4.2/PKG-INFO +243 -0
  3. clinical_scope-0.4.2/README.md +209 -0
  4. clinical_scope-0.4.2/pyproject.toml +60 -0
  5. clinical_scope-0.4.2/setup.cfg +4 -0
  6. clinical_scope-0.4.2/src/clinical_scope/__init__.py +15 -0
  7. clinical_scope-0.4.2/src/clinical_scope/build_info/assemble_bundle.py +92 -0
  8. clinical_scope-0.4.2/src/clinical_scope/build_info/generate_third_party_licenses.py +471 -0
  9. clinical_scope-0.4.2/src/clinical_scope/config/__init__.py +1 -0
  10. clinical_scope-0.4.2/src/clinical_scope/config/parsing.py +84 -0
  11. clinical_scope-0.4.2/src/clinical_scope/constants.py +178 -0
  12. clinical_scope-0.4.2/src/clinical_scope/dash_api/__init__.py +0 -0
  13. clinical_scope-0.4.2/src/clinical_scope/dash_api/annotations/__init__.py +1 -0
  14. clinical_scope-0.4.2/src/clinical_scope/dash_api/annotations/io.py +106 -0
  15. clinical_scope-0.4.2/src/clinical_scope/dash_api/annotations/model.py +143 -0
  16. clinical_scope-0.4.2/src/clinical_scope/dash_api/annotations/renderer.py +353 -0
  17. clinical_scope-0.4.2/src/clinical_scope/dash_api/callbacks/__init__.py +79 -0
  18. clinical_scope-0.4.2/src/clinical_scope/dash_api/callbacks/annotation_callbacks.py +1429 -0
  19. clinical_scope-0.4.2/src/clinical_scope/dash_api/callbacks/data_callbacks.py +1215 -0
  20. clinical_scope-0.4.2/src/clinical_scope/dash_api/callbacks/loop_callbacks.py +85 -0
  21. clinical_scope-0.4.2/src/clinical_scope/dash_api/core_api.py +674 -0
  22. clinical_scope-0.4.2/src/clinical_scope/dash_api/helper_api.py +52 -0
  23. clinical_scope-0.4.2/src/clinical_scope/dash_api/io.py +39 -0
  24. clinical_scope-0.4.2/src/clinical_scope/dash_api/styles.py +267 -0
  25. clinical_scope-0.4.2/src/clinical_scope/dash_api/ui_components.py +154 -0
  26. clinical_scope-0.4.2/src/clinical_scope/dash_api/validation.py +151 -0
  27. clinical_scope-0.4.2/src/clinical_scope/database_options_parser.py +216 -0
  28. clinical_scope-0.4.2/src/clinical_scope/database_options_xlsx.py +394 -0
  29. clinical_scope-0.4.2/src/clinical_scope/datasource/__init__.py +20 -0
  30. clinical_scope-0.4.2/src/clinical_scope/datasource/base.py +593 -0
  31. clinical_scope-0.4.2/src/clinical_scope/datasource/formatting/__init__.py +1 -0
  32. clinical_scope-0.4.2/src/clinical_scope/datasource/formatting/timezone.py +278 -0
  33. clinical_scope-0.4.2/src/clinical_scope/datasource/inspection.py +225 -0
  34. clinical_scope-0.4.2/src/clinical_scope/datasource/registry.py +222 -0
  35. clinical_scope-0.4.2/src/clinical_scope/datasource/sources/eit/__init__.py +0 -0
  36. clinical_scope-0.4.2/src/clinical_scope/datasource/sources/eit/find_load_format.py +355 -0
  37. clinical_scope-0.4.2/src/clinical_scope/datasource/sources/eit/options.py +68 -0
  38. clinical_scope-0.4.2/src/clinical_scope/datasource/sources/fluxmed_parameters/__init__.py +0 -0
  39. clinical_scope-0.4.2/src/clinical_scope/datasource/sources/fluxmed_parameters/find_load_format.py +110 -0
  40. clinical_scope-0.4.2/src/clinical_scope/datasource/sources/fluxmed_parameters/options.py +47 -0
  41. clinical_scope-0.4.2/src/clinical_scope/datasource/sources/fluxmed_signals/__init__.py +0 -0
  42. clinical_scope-0.4.2/src/clinical_scope/datasource/sources/fluxmed_signals/find_load_format.py +103 -0
  43. clinical_scope-0.4.2/src/clinical_scope/datasource/sources/fluxmed_signals/options.py +31 -0
  44. clinical_scope-0.4.2/src/clinical_scope/datasource/sources/mindray_respi_numerics/__init__.py +1 -0
  45. clinical_scope-0.4.2/src/clinical_scope/datasource/sources/mindray_respi_numerics/find_load_format.py +84 -0
  46. clinical_scope-0.4.2/src/clinical_scope/datasource/sources/mindray_respi_numerics/options.py +51 -0
  47. clinical_scope-0.4.2/src/clinical_scope/datasource/sources/mindray_respi_waves/__init__.py +1 -0
  48. clinical_scope-0.4.2/src/clinical_scope/datasource/sources/mindray_respi_waves/find_load_format.py +139 -0
  49. clinical_scope-0.4.2/src/clinical_scope/datasource/sources/mindray_respi_waves/options.py +51 -0
  50. clinical_scope-0.4.2/src/clinical_scope/datasource/sources/mindray_scope/__init__.py +1 -0
  51. clinical_scope-0.4.2/src/clinical_scope/datasource/sources/mindray_scope/find_load_format.py +292 -0
  52. clinical_scope-0.4.2/src/clinical_scope/datasource/sources/mindray_scope/options.py +27 -0
  53. clinical_scope-0.4.2/src/clinical_scope/datasource/sources/other/__init__.py +0 -0
  54. clinical_scope-0.4.2/src/clinical_scope/datasource/sources/other/find_load_format.py +391 -0
  55. clinical_scope-0.4.2/src/clinical_scope/datasource/sources/other/options.py +45 -0
  56. clinical_scope-0.4.2/src/clinical_scope/datasource/sources/philips_numerics/__init__.py +0 -0
  57. clinical_scope-0.4.2/src/clinical_scope/datasource/sources/philips_numerics/find_load_format.py +48 -0
  58. clinical_scope-0.4.2/src/clinical_scope/datasource/sources/philips_numerics/options.py +43 -0
  59. clinical_scope-0.4.2/src/clinical_scope/datasource/sources/philips_waves/__init__.py +0 -0
  60. clinical_scope-0.4.2/src/clinical_scope/datasource/sources/philips_waves/find_load_format.py +55 -0
  61. clinical_scope-0.4.2/src/clinical_scope/datasource/sources/philips_waves/options.py +31 -0
  62. clinical_scope-0.4.2/src/clinical_scope/datasource/sources/servo_u/__init__.py +0 -0
  63. clinical_scope-0.4.2/src/clinical_scope/datasource/sources/servo_u/find_load_format.py +185 -0
  64. clinical_scope-0.4.2/src/clinical_scope/datasource/sources/servo_u/options.py +31 -0
  65. clinical_scope-0.4.2/src/clinical_scope/datasource/sources/syringe/__init__.py +0 -0
  66. clinical_scope-0.4.2/src/clinical_scope/datasource/sources/syringe/find_load_format.py +68 -0
  67. clinical_scope-0.4.2/src/clinical_scope/datasource/sources/syringe/options.py +42 -0
  68. clinical_scope-0.4.2/src/clinical_scope/datasource/timing.py +37 -0
  69. clinical_scope-0.4.2/src/clinical_scope/hover_formatters.py +101 -0
  70. clinical_scope-0.4.2/src/clinical_scope/io/__init__.py +1 -0
  71. clinical_scope-0.4.2/src/clinical_scope/io/file_utils.py +230 -0
  72. clinical_scope-0.4.2/src/clinical_scope/io/paths.py +42 -0
  73. clinical_scope-0.4.2/src/clinical_scope/logger_config.py +111 -0
  74. clinical_scope-0.4.2/src/clinical_scope/signal_container.py +902 -0
  75. clinical_scope-0.4.2/src/clinical_scope/wrapper.py +659 -0
  76. clinical_scope-0.4.2/src/clinical_scope.egg-info/PKG-INFO +243 -0
  77. clinical_scope-0.4.2/src/clinical_scope.egg-info/SOURCES.txt +79 -0
  78. clinical_scope-0.4.2/src/clinical_scope.egg-info/dependency_links.txt +1 -0
  79. clinical_scope-0.4.2/src/clinical_scope.egg-info/entry_points.txt +2 -0
  80. clinical_scope-0.4.2/src/clinical_scope.egg-info/requires.txt +15 -0
  81. clinical_scope-0.4.2/src/clinical_scope.egg-info/top_level.txt +1 -0
@@ -0,0 +1,203 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright 2026 Assistance Publique – Hôpitaux de Paris
191
+ Developed by Alexis Janin
192
+
193
+ Licensed under the Apache License, Version 2.0 (the "License");
194
+ you may not use this file except in compliance with the License.
195
+ You may obtain a copy of the License at
196
+
197
+ http://www.apache.org/licenses/LICENSE-2.0
198
+
199
+ Unless required by applicable law or agreed to in writing, software
200
+ distributed under the License is distributed on an "AS IS" BASIS,
201
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
202
+ See the License for the specific language governing permissions and
203
+ limitations under the License.
@@ -0,0 +1,243 @@
1
+ Metadata-Version: 2.4
2
+ Name: clinical-scope
3
+ Version: 0.4.2
4
+ Summary: Interactive visualization dashboard for clinical physiological signals
5
+ Author-email: Alexis Janin <alexis.janin@inria.fr>
6
+ License-Expression: Apache-2.0
7
+ Project-URL: Homepage, https://github.com/larib-data/clinical-scope
8
+ Project-URL: Repository, https://github.com/larib-data/clinical-scope.git
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: Programming Language :: Python :: 3.11
11
+ Classifier: Programming Language :: Python :: 3.12
12
+ Classifier: Programming Language :: Python :: 3.13
13
+ Classifier: Operating System :: MacOS
14
+ Classifier: Operating System :: Microsoft :: Windows
15
+ Classifier: Operating System :: POSIX :: Linux
16
+ Requires-Python: >=3.11
17
+ Description-Content-Type: text/markdown
18
+ License-File: LICENSE
19
+ Requires-Dist: dash
20
+ Requires-Dist: dash_bootstrap_components
21
+ Requires-Dist: dash_daq
22
+ Requires-Dist: pandas
23
+ Requires-Dist: numpy
24
+ Requires-Dist: plotly>=5.24
25
+ Requires-Dist: plotly-resampler
26
+ Requires-Dist: pyarrow
27
+ Requires-Dist: openpyxl
28
+ Requires-Dist: defusedxml
29
+ Requires-Dist: pytz
30
+ Provides-Extra: dev
31
+ Requires-Dist: pytest; extra == "dev"
32
+ Requires-Dist: ruff; extra == "dev"
33
+ Dynamic: license-file
34
+
35
+ # Warning
36
+
37
+ The package is not yet released on pypi or is public. The current readme is a prep for when it will be the case.
38
+
39
+ # ClinicalScope
40
+
41
+ <p align="center">
42
+ <strong>Multi-source time-series signal visualization for research, mainly in ICU and Machine Learning</strong><br>
43
+ <em>Format · Visualize · Annotate · Export — no code required</em>
44
+ </p>
45
+
46
+ <p align="center">
47
+ <a href="https://github.com/larib-data/clinical-scope/actions/workflows/ci.yml">
48
+ <img src="https://github.com/larib-data/clinical-scope/actions/workflows/ci.yml/badge.svg" alt="CI" />
49
+ </a>
50
+ <a href="https://pypi.org/project/clinical-scope/">
51
+ <img src="https://img.shields.io/pypi/v/clinical-scope" alt="PyPI version" />
52
+ </a>
53
+ <a href="https://pypi.org/project/clinical-scope/">
54
+ <img src="https://img.shields.io/pypi/pyversions/clinical-scope" alt="Python versions" />
55
+ </a>
56
+ <a href="LICENSE">
57
+ <img src="https://img.shields.io/badge/license-Apache%202.0-blue" alt="License: Apache 2.0" />
58
+ </a>
59
+ </p>
60
+
61
+ ---
62
+
63
+ **ClinicalScope** is an open-source, browser-based dashboard for visualizing, annotating, and extracting time-series data. Its primary domain is ICU monitoring — loading recordings from multiple clinical devices simultaneously (Philips monitors, Servo-U ventilators, EIT systems, FluxMed, Mindray, syringe pumps) — but its annotation and extraction pipeline is designed for any time-series data, making it equally useful for machine learning workflows that require labeled datasets.
64
+
65
+ ## Installation
66
+
67
+ ### Pre-built application (recommended)
68
+
69
+ Download the latest release for your platform from the **[Releases page](https://github.com/larib-data/clinical-scope/releases/latest)**:
70
+
71
+ | Platform | File |
72
+ |---|---|
73
+ | Windows | `ClinicalScope-windows-x86_64.zip` |
74
+ | macOS (Apple Silicon) | `ClinicalScope-macOS-arm64.zip` |
75
+ | Linux | `ClinicalScope-linux-x86_64.zip` |
76
+
77
+ Unzip and run the `ClinicalScope` executable — no Python installation required. Each bundle includes the user guide PDF and a demo database to get started immediately.
78
+
79
+ ### From PyPI (Python users)
80
+
81
+ ```bash
82
+ pip install clinical-scope
83
+ clinical-scope # opens http://127.0.0.1:8050
84
+ ```
85
+
86
+ > Requires Python 3.11–3.13.
87
+
88
+ ### From source (developers)
89
+
90
+ ```bash
91
+ git clone https://github.com/larib-data/clinical-scope.git
92
+ cd clinical-scope
93
+ python -m venv .venv # create a virtual environment
94
+ source .venv/bin/activate # Windows: .venv\Scripts\activate
95
+ pip install -e .
96
+ clinical-scope
97
+ ```
98
+
99
+ For the full developer setup (tests, linting, adding a datasource), see [CONTRIBUTING.md](CONTRIBUTING.md).
100
+
101
+ ## Demo
102
+
103
+ ![ClinicalScope demo](docs/user_guide/images/demo.gif)
104
+
105
+ ## Quickstart
106
+
107
+ 1. **Download** — get the latest release from the [Releases page](https://github.com/larib-data/clinical-scope/releases/latest) and unzip it
108
+ 2. **Run** — launch the `ClinicalScope` executable; your browser opens at `http://127.0.0.1:8050`
109
+ 3. **Load config** — click **Default visualization (all sources)** to use built-in defaults, or upload a `database_options.json` / `.xlsx` config file
110
+ 4. **Set data folder** — enter the path to your patient folder (or point to the bundled `demo_database/demo_patient/` to try it immediately)
111
+ 5. **Process** — click **Process visualization**; interactive plots appear in the browser
112
+ 6. **Annotate** — draw time events, windows, or point annotations, then click **Save**
113
+
114
+ ## Documentation
115
+
116
+ The **[user guide](docs/user_guide/tutorial.md)** is the primary reference for everything beyond the Quickstart.
117
+
118
+ | Resource | Covers |
119
+ |---|---|
120
+ | [User guide](docs/user_guide/tutorial.md) | Data folder layout, `database_options` config files, annotation tools, inspection view, CLI scripts, Python API |
121
+ | [CONTRIBUTING.md](CONTRIBUTING.md) | Dev setup, running tests, linting, adding a new datasource |
122
+
123
+ ## Supported Data Sources
124
+
125
+ | Data Source | Device / Format | Folder Keywords | File Types | Typical Signals |
126
+ |---|---|---|---|---|
127
+ | Philips Waves | Philips waveform | `philips`, `waves` | `.parquet`, `.csv` | ART, PAP, CO₂, respiratory pressure/volume |
128
+ | Philips Numerics | Philips parameters | `philips`, `numerics` | `.parquet`, `.csv` | Heart rate, SpO₂, FiO₂, blood pressure |
129
+ | EIT | PulmoVista `.asc` | `eit` | `.asc` | Global/local impedance, impedance percentages |
130
+ | FluxMed Signals | FluxMed waveforms | `fluxmed`, `signals` | `.parquet`, `.txt`, `.csv` | Respiratory waveforms |
131
+ | FluxMed Parameters | FluxMed parameters | `fluxmed`, `parameters` | `.parquet`, `.txt`, `.csv` | Respiratory parameters |
132
+ | Servo-U | Servo-U ventilator `.sta` | `servo` | `.sta` | Ventilator waveforms and settings |
133
+ | Mindray Scope | Mindray monitor | `mindray` | `.xml`, `.csv` | ECG, SpO₂, pressure waveforms |
134
+ | Mindray Respi Waves | Mindray respiratory | `mindray`, `resp`, `wave` | `.parquet`, `.csv` | High-frequency respiratory waveforms |
135
+ | Mindray Respi Numerics | Mindray respiratory | `mindray`, `resp`, `numeric` | `.parquet`, `.csv` | Vt, RR, PEEP, and more |
136
+ | Syringe | Syringe pump | `syringe` | `.parquet`, `.csv` | Infusion rates and volumes |
137
+ | Other (Generic) | Any CSV / Parquet | `other` | `.csv`, `.parquet` | Any time-series with a datetime column |
138
+
139
+ Each patient folder should contain one subfolder per data source. See the [user guide](docs/user_guide/tutorial.md) → *Patient Data & Supported Data Sources* for folder naming rules and configuration details.
140
+
141
+ ## Standalone Data Processing
142
+
143
+ ClinicalScope can run the full `find → load → format` pipeline without opening the UI, either via Python or command-line scripts. Raw parquet caches are always written to `<data_folder>/clinical_scope_output/` automatically; pass `save_folder` to also save formatted output elsewhere.
144
+
145
+ ### Python API
146
+
147
+ ```python
148
+ from pathlib import Path
149
+ from clinical_scope import extract_datasource, extract_patient, batch_extract
150
+ from clinical_scope.config.parsing import load_database_options_from_path
151
+
152
+ db_options = load_database_options_from_path(Path("database_options.json"))
153
+
154
+ # 1. Single datasource subfolder (auto-detects type from folder name)
155
+ df = extract_datasource(
156
+ Path("/data/Patient01/philips_waves"),
157
+ database_options_specific=db_options.get("philips_waves"),
158
+ patient_options={"datetime_start": "2024-01-15 08:00:00"},
159
+ save_path="/output/philips_waves.parquet", # optional
160
+ )
161
+
162
+ # 2. All datasources for one patient
163
+ results = extract_patient(
164
+ Path("/data/Patient01"),
165
+ db_options,
166
+ patient_options={"datetime_start": "2024-01-15 08:00:00"},
167
+ save_folder="/output/Patient01", # optional
168
+ )
169
+ # results = {"philips_waves": DataFrame | None, "eit": DataFrame | None, ...}
170
+
171
+ # 3. Multiple patients — pass a root directory or an explicit list
172
+ batch = batch_extract(
173
+ Path("/data"), # root whose subdirs are patients
174
+ db_options,
175
+ save_folder="/output", # optional; each patient gets a subfolder
176
+ )
177
+ # batch = {"Patient01": {"philips_waves": DataFrame, ...}, "Patient02": {...}, ...}
178
+
179
+ # Explicit list variant
180
+ batch = batch_extract(["/data/Patient01", "/data/Patient02"], db_options)
181
+ ```
182
+
183
+ Set `"quick_load": true` in `patient_options` to reuse previously cached parquet files on subsequent runs.
184
+
185
+ ### CLI Scripts
186
+
187
+ All three scripts share the same pattern: a required `patient_folder` positional argument plus optional `--database-options`, `--patient-options`, and `--verbose` flags.
188
+
189
+ ```bash
190
+ # Extract (find + load + format) without plots
191
+ python scripts/process_patient_data.py patient /data/Patient01 --verbose
192
+ python scripts/process_patient_data.py patient /data/Patient01 --database-options db.json
193
+ python scripts/process_patient_data.py batch /data/patients --output-folder /out
194
+
195
+ # Inspect available columns per datasource
196
+ python scripts/inspect_patient_data.py /data/Patient01 --verbose
197
+ python scripts/inspect_patient_data.py /data/Patient01 --database-options db.json --output-csv out.csv
198
+
199
+ # Visualize (generates HTML)
200
+ python scripts/visualization_patient_data.py /data/Patient01 --verbose
201
+ python scripts/visualization_patient_data.py /data/Patient01 --database-options db.json
202
+ ```
203
+
204
+ Omit `--database-options` to use all available datasources with their defaults. Use `--patient-options opts.json` to pass datetime range, time shift, `quick_load`, etc.
205
+
206
+ ## Contributing
207
+
208
+ Contributions are welcome — bug reports, new data sources, and documentation improvements. See [CONTRIBUTING.md](CONTRIBUTING.md) for dev setup, running tests, linting, and the PR process.
209
+
210
+ ## Citation
211
+
212
+ If you use ClinicalScope in academic work, please cite:
213
+
214
+ ```bibtex
215
+ @software{clinicalscope2026,
216
+ author = {Janin, Alexis},
217
+ title = {{ClinicalScope}: Interactive Visualization Dashboard for Clinical Physiological Signals},
218
+ url = {https://github.com/larib-data/clinical-scope},
219
+ version = {0.4.2},
220
+ year = {2026},
221
+ % doi = {10.5281/zenodo.XXXXXXX}, % TODO: fill after Zenodo deposit (#46)
222
+ }
223
+ ```
224
+
225
+ A [`CITATION.cff`](CITATION.cff) file is also provided for GitHub's *Cite this repository* button.
226
+
227
+ ## Disclaimer
228
+
229
+ ### Research Use Only — Not a Medical Device
230
+
231
+ This software is provided exclusively for scientific research purposes. It is not a medical device within the meaning of Regulation (EU) 2017/745 (MDR) and has not undergone CE marking, conformity assessment, or any regulatory authorization (CE, FDA, or other).
232
+
233
+ It must not be used for the diagnosis, monitoring, treatment, or prevention of disease, nor for any clinical decision concerning a patient. The visualizations, annotations, and formats it produces are not validated for clinical purposes, and any use beyond research is the sole responsibility of the user, who must carry out their own validation.
234
+
235
+ ### Personal Data and GDPR
236
+
237
+ This software processes physiological signals that may constitute health data — i.e. personal data falling within the special categories of Article 9 of Regulation (EU) 2016/679 (GDPR). By deploying or using this software on data, you act as the data controller and assume all corresponding obligations.
238
+
239
+ ## License
240
+
241
+ ClinicalScope is licensed under the [Apache License 2.0](LICENSE).
242
+
243
+ Copyright © 2026 Assistance Publique – Hôpitaux de Paris. Developed by Alexis Janin.
@@ -0,0 +1,209 @@
1
+ # Warning
2
+
3
+ The package is not yet released on pypi or is public. The current readme is a prep for when it will be the case.
4
+
5
+ # ClinicalScope
6
+
7
+ <p align="center">
8
+ <strong>Multi-source time-series signal visualization for research, mainly in ICU and Machine Learning</strong><br>
9
+ <em>Format · Visualize · Annotate · Export — no code required</em>
10
+ </p>
11
+
12
+ <p align="center">
13
+ <a href="https://github.com/larib-data/clinical-scope/actions/workflows/ci.yml">
14
+ <img src="https://github.com/larib-data/clinical-scope/actions/workflows/ci.yml/badge.svg" alt="CI" />
15
+ </a>
16
+ <a href="https://pypi.org/project/clinical-scope/">
17
+ <img src="https://img.shields.io/pypi/v/clinical-scope" alt="PyPI version" />
18
+ </a>
19
+ <a href="https://pypi.org/project/clinical-scope/">
20
+ <img src="https://img.shields.io/pypi/pyversions/clinical-scope" alt="Python versions" />
21
+ </a>
22
+ <a href="LICENSE">
23
+ <img src="https://img.shields.io/badge/license-Apache%202.0-blue" alt="License: Apache 2.0" />
24
+ </a>
25
+ </p>
26
+
27
+ ---
28
+
29
+ **ClinicalScope** is an open-source, browser-based dashboard for visualizing, annotating, and extracting time-series data. Its primary domain is ICU monitoring — loading recordings from multiple clinical devices simultaneously (Philips monitors, Servo-U ventilators, EIT systems, FluxMed, Mindray, syringe pumps) — but its annotation and extraction pipeline is designed for any time-series data, making it equally useful for machine learning workflows that require labeled datasets.
30
+
31
+ ## Installation
32
+
33
+ ### Pre-built application (recommended)
34
+
35
+ Download the latest release for your platform from the **[Releases page](https://github.com/larib-data/clinical-scope/releases/latest)**:
36
+
37
+ | Platform | File |
38
+ |---|---|
39
+ | Windows | `ClinicalScope-windows-x86_64.zip` |
40
+ | macOS (Apple Silicon) | `ClinicalScope-macOS-arm64.zip` |
41
+ | Linux | `ClinicalScope-linux-x86_64.zip` |
42
+
43
+ Unzip and run the `ClinicalScope` executable — no Python installation required. Each bundle includes the user guide PDF and a demo database to get started immediately.
44
+
45
+ ### From PyPI (Python users)
46
+
47
+ ```bash
48
+ pip install clinical-scope
49
+ clinical-scope # opens http://127.0.0.1:8050
50
+ ```
51
+
52
+ > Requires Python 3.11–3.13.
53
+
54
+ ### From source (developers)
55
+
56
+ ```bash
57
+ git clone https://github.com/larib-data/clinical-scope.git
58
+ cd clinical-scope
59
+ python -m venv .venv # create a virtual environment
60
+ source .venv/bin/activate # Windows: .venv\Scripts\activate
61
+ pip install -e .
62
+ clinical-scope
63
+ ```
64
+
65
+ For the full developer setup (tests, linting, adding a datasource), see [CONTRIBUTING.md](CONTRIBUTING.md).
66
+
67
+ ## Demo
68
+
69
+ ![ClinicalScope demo](docs/user_guide/images/demo.gif)
70
+
71
+ ## Quickstart
72
+
73
+ 1. **Download** — get the latest release from the [Releases page](https://github.com/larib-data/clinical-scope/releases/latest) and unzip it
74
+ 2. **Run** — launch the `ClinicalScope` executable; your browser opens at `http://127.0.0.1:8050`
75
+ 3. **Load config** — click **Default visualization (all sources)** to use built-in defaults, or upload a `database_options.json` / `.xlsx` config file
76
+ 4. **Set data folder** — enter the path to your patient folder (or point to the bundled `demo_database/demo_patient/` to try it immediately)
77
+ 5. **Process** — click **Process visualization**; interactive plots appear in the browser
78
+ 6. **Annotate** — draw time events, windows, or point annotations, then click **Save**
79
+
80
+ ## Documentation
81
+
82
+ The **[user guide](docs/user_guide/tutorial.md)** is the primary reference for everything beyond the Quickstart.
83
+
84
+ | Resource | Covers |
85
+ |---|---|
86
+ | [User guide](docs/user_guide/tutorial.md) | Data folder layout, `database_options` config files, annotation tools, inspection view, CLI scripts, Python API |
87
+ | [CONTRIBUTING.md](CONTRIBUTING.md) | Dev setup, running tests, linting, adding a new datasource |
88
+
89
+ ## Supported Data Sources
90
+
91
+ | Data Source | Device / Format | Folder Keywords | File Types | Typical Signals |
92
+ |---|---|---|---|---|
93
+ | Philips Waves | Philips waveform | `philips`, `waves` | `.parquet`, `.csv` | ART, PAP, CO₂, respiratory pressure/volume |
94
+ | Philips Numerics | Philips parameters | `philips`, `numerics` | `.parquet`, `.csv` | Heart rate, SpO₂, FiO₂, blood pressure |
95
+ | EIT | PulmoVista `.asc` | `eit` | `.asc` | Global/local impedance, impedance percentages |
96
+ | FluxMed Signals | FluxMed waveforms | `fluxmed`, `signals` | `.parquet`, `.txt`, `.csv` | Respiratory waveforms |
97
+ | FluxMed Parameters | FluxMed parameters | `fluxmed`, `parameters` | `.parquet`, `.txt`, `.csv` | Respiratory parameters |
98
+ | Servo-U | Servo-U ventilator `.sta` | `servo` | `.sta` | Ventilator waveforms and settings |
99
+ | Mindray Scope | Mindray monitor | `mindray` | `.xml`, `.csv` | ECG, SpO₂, pressure waveforms |
100
+ | Mindray Respi Waves | Mindray respiratory | `mindray`, `resp`, `wave` | `.parquet`, `.csv` | High-frequency respiratory waveforms |
101
+ | Mindray Respi Numerics | Mindray respiratory | `mindray`, `resp`, `numeric` | `.parquet`, `.csv` | Vt, RR, PEEP, and more |
102
+ | Syringe | Syringe pump | `syringe` | `.parquet`, `.csv` | Infusion rates and volumes |
103
+ | Other (Generic) | Any CSV / Parquet | `other` | `.csv`, `.parquet` | Any time-series with a datetime column |
104
+
105
+ Each patient folder should contain one subfolder per data source. See the [user guide](docs/user_guide/tutorial.md) → *Patient Data & Supported Data Sources* for folder naming rules and configuration details.
106
+
107
+ ## Standalone Data Processing
108
+
109
+ ClinicalScope can run the full `find → load → format` pipeline without opening the UI, either via Python or command-line scripts. Raw parquet caches are always written to `<data_folder>/clinical_scope_output/` automatically; pass `save_folder` to also save formatted output elsewhere.
110
+
111
+ ### Python API
112
+
113
+ ```python
114
+ from pathlib import Path
115
+ from clinical_scope import extract_datasource, extract_patient, batch_extract
116
+ from clinical_scope.config.parsing import load_database_options_from_path
117
+
118
+ db_options = load_database_options_from_path(Path("database_options.json"))
119
+
120
+ # 1. Single datasource subfolder (auto-detects type from folder name)
121
+ df = extract_datasource(
122
+ Path("/data/Patient01/philips_waves"),
123
+ database_options_specific=db_options.get("philips_waves"),
124
+ patient_options={"datetime_start": "2024-01-15 08:00:00"},
125
+ save_path="/output/philips_waves.parquet", # optional
126
+ )
127
+
128
+ # 2. All datasources for one patient
129
+ results = extract_patient(
130
+ Path("/data/Patient01"),
131
+ db_options,
132
+ patient_options={"datetime_start": "2024-01-15 08:00:00"},
133
+ save_folder="/output/Patient01", # optional
134
+ )
135
+ # results = {"philips_waves": DataFrame | None, "eit": DataFrame | None, ...}
136
+
137
+ # 3. Multiple patients — pass a root directory or an explicit list
138
+ batch = batch_extract(
139
+ Path("/data"), # root whose subdirs are patients
140
+ db_options,
141
+ save_folder="/output", # optional; each patient gets a subfolder
142
+ )
143
+ # batch = {"Patient01": {"philips_waves": DataFrame, ...}, "Patient02": {...}, ...}
144
+
145
+ # Explicit list variant
146
+ batch = batch_extract(["/data/Patient01", "/data/Patient02"], db_options)
147
+ ```
148
+
149
+ Set `"quick_load": true` in `patient_options` to reuse previously cached parquet files on subsequent runs.
150
+
151
+ ### CLI Scripts
152
+
153
+ All three scripts share the same pattern: a required `patient_folder` positional argument plus optional `--database-options`, `--patient-options`, and `--verbose` flags.
154
+
155
+ ```bash
156
+ # Extract (find + load + format) without plots
157
+ python scripts/process_patient_data.py patient /data/Patient01 --verbose
158
+ python scripts/process_patient_data.py patient /data/Patient01 --database-options db.json
159
+ python scripts/process_patient_data.py batch /data/patients --output-folder /out
160
+
161
+ # Inspect available columns per datasource
162
+ python scripts/inspect_patient_data.py /data/Patient01 --verbose
163
+ python scripts/inspect_patient_data.py /data/Patient01 --database-options db.json --output-csv out.csv
164
+
165
+ # Visualize (generates HTML)
166
+ python scripts/visualization_patient_data.py /data/Patient01 --verbose
167
+ python scripts/visualization_patient_data.py /data/Patient01 --database-options db.json
168
+ ```
169
+
170
+ Omit `--database-options` to use all available datasources with their defaults. Use `--patient-options opts.json` to pass datetime range, time shift, `quick_load`, etc.
171
+
172
+ ## Contributing
173
+
174
+ Contributions are welcome — bug reports, new data sources, and documentation improvements. See [CONTRIBUTING.md](CONTRIBUTING.md) for dev setup, running tests, linting, and the PR process.
175
+
176
+ ## Citation
177
+
178
+ If you use ClinicalScope in academic work, please cite:
179
+
180
+ ```bibtex
181
+ @software{clinicalscope2026,
182
+ author = {Janin, Alexis},
183
+ title = {{ClinicalScope}: Interactive Visualization Dashboard for Clinical Physiological Signals},
184
+ url = {https://github.com/larib-data/clinical-scope},
185
+ version = {0.4.2},
186
+ year = {2026},
187
+ % doi = {10.5281/zenodo.XXXXXXX}, % TODO: fill after Zenodo deposit (#46)
188
+ }
189
+ ```
190
+
191
+ A [`CITATION.cff`](CITATION.cff) file is also provided for GitHub's *Cite this repository* button.
192
+
193
+ ## Disclaimer
194
+
195
+ ### Research Use Only — Not a Medical Device
196
+
197
+ This software is provided exclusively for scientific research purposes. It is not a medical device within the meaning of Regulation (EU) 2017/745 (MDR) and has not undergone CE marking, conformity assessment, or any regulatory authorization (CE, FDA, or other).
198
+
199
+ It must not be used for the diagnosis, monitoring, treatment, or prevention of disease, nor for any clinical decision concerning a patient. The visualizations, annotations, and formats it produces are not validated for clinical purposes, and any use beyond research is the sole responsibility of the user, who must carry out their own validation.
200
+
201
+ ### Personal Data and GDPR
202
+
203
+ This software processes physiological signals that may constitute health data — i.e. personal data falling within the special categories of Article 9 of Regulation (EU) 2016/679 (GDPR). By deploying or using this software on data, you act as the data controller and assume all corresponding obligations.
204
+
205
+ ## License
206
+
207
+ ClinicalScope is licensed under the [Apache License 2.0](LICENSE).
208
+
209
+ Copyright © 2026 Assistance Publique – Hôpitaux de Paris. Developed by Alexis Janin.