cryosweep 0.3.0__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 (86) hide show
  1. cryosweep-0.3.0/LICENSE +79 -0
  2. cryosweep-0.3.0/PKG-INFO +241 -0
  3. cryosweep-0.3.0/README.md +213 -0
  4. cryosweep-0.3.0/THIRD-PARTY-LICENSES.md +66 -0
  5. cryosweep-0.3.0/cryosweep.egg-info/PKG-INFO +241 -0
  6. cryosweep-0.3.0/cryosweep.egg-info/SOURCES.txt +84 -0
  7. cryosweep-0.3.0/cryosweep.egg-info/dependency_links.txt +1 -0
  8. cryosweep-0.3.0/cryosweep.egg-info/entry_points.txt +5 -0
  9. cryosweep-0.3.0/cryosweep.egg-info/requires.txt +8 -0
  10. cryosweep-0.3.0/cryosweep.egg-info/top_level.txt +3 -0
  11. cryosweep-0.3.0/cryosweep_cli/__init__.py +0 -0
  12. cryosweep-0.3.0/cryosweep_cli/__main__.py +197 -0
  13. cryosweep-0.3.0/cryosweep_core/__init__.py +2 -0
  14. cryosweep-0.3.0/cryosweep_core/analyzers/__init__.py +0 -0
  15. cryosweep-0.3.0/cryosweep_core/analyzers/acms.py +386 -0
  16. cryosweep-0.3.0/cryosweep_core/analyzers/builtins.py +21 -0
  17. cryosweep-0.3.0/cryosweep_core/analyzers/dispatch.py +96 -0
  18. cryosweep-0.3.0/cryosweep_core/analyzers/hall.py +385 -0
  19. cryosweep-0.3.0/cryosweep_core/analyzers/hall_tempdep.py +780 -0
  20. cryosweep-0.3.0/cryosweep_core/analyzers/hc.py +471 -0
  21. cryosweep-0.3.0/cryosweep_core/analyzers/mag.py +358 -0
  22. cryosweep-0.3.0/cryosweep_core/analyzers/resistive_tc.py +87 -0
  23. cryosweep-0.3.0/cryosweep_core/analyzers/resistivity.py +677 -0
  24. cryosweep-0.3.0/cryosweep_core/analyzers/tto.py +784 -0
  25. cryosweep-0.3.0/cryosweep_core/config.py +136 -0
  26. cryosweep-0.3.0/cryosweep_core/detect/__init__.py +0 -0
  27. cryosweep-0.3.0/cryosweep_core/detect/hall_channel.py +117 -0
  28. cryosweep-0.3.0/cryosweep_core/detect/probe.py +55 -0
  29. cryosweep-0.3.0/cryosweep_core/detect/sweeps.py +237 -0
  30. cryosweep-0.3.0/cryosweep_core/detect/vsm_blocks.py +228 -0
  31. cryosweep-0.3.0/cryosweep_core/discovery.py +32 -0
  32. cryosweep-0.3.0/cryosweep_core/fitting/__init__.py +0 -0
  33. cryosweep-0.3.0/cryosweep_core/fitting/entropy.py +156 -0
  34. cryosweep-0.3.0/cryosweep_core/fitting/heat_capacity.py +583 -0
  35. cryosweep-0.3.0/cryosweep_core/fitting/library.py +5 -0
  36. cryosweep-0.3.0/cryosweep_core/fitting/models.py +118 -0
  37. cryosweep-0.3.0/cryosweep_core/fitting/thermal.py +159 -0
  38. cryosweep-0.3.0/cryosweep_core/fitting/transitions.py +605 -0
  39. cryosweep-0.3.0/cryosweep_core/fitting/transport.py +290 -0
  40. cryosweep-0.3.0/cryosweep_core/fitting/uncertainty.py +70 -0
  41. cryosweep-0.3.0/cryosweep_core/gate.py +23 -0
  42. cryosweep-0.3.0/cryosweep_core/grouping.py +76 -0
  43. cryosweep-0.3.0/cryosweep_core/io/__init__.py +0 -0
  44. cryosweep-0.3.0/cryosweep_core/io/columns.py +117 -0
  45. cryosweep-0.3.0/cryosweep_core/io/export.py +642 -0
  46. cryosweep-0.3.0/cryosweep_core/io/header.py +58 -0
  47. cryosweep-0.3.0/cryosweep_core/io/loader.py +63 -0
  48. cryosweep-0.3.0/cryosweep_core/model.py +129 -0
  49. cryosweep-0.3.0/cryosweep_core/pipeline.py +73 -0
  50. cryosweep-0.3.0/cryosweep_core/plotting/__init__.py +0 -0
  51. cryosweep-0.3.0/cryosweep_core/plotting/catalog.py +1372 -0
  52. cryosweep-0.3.0/cryosweep_core/plotting/export.py +92 -0
  53. cryosweep-0.3.0/cryosweep_core/plotting/presets.py +153 -0
  54. cryosweep-0.3.0/cryosweep_core/plotting/render.py +4304 -0
  55. cryosweep-0.3.0/cryosweep_core/plotting/spec.py +112 -0
  56. cryosweep-0.3.0/cryosweep_core/primitives.py +61 -0
  57. cryosweep-0.3.0/cryosweep_core/registry.py +57 -0
  58. cryosweep-0.3.0/cryosweep_core/reports.py +233 -0
  59. cryosweep-0.3.0/cryosweep_core/result.py +51 -0
  60. cryosweep-0.3.0/cryosweep_core/robust.py +108 -0
  61. cryosweep-0.3.0/cryosweep_core/schema.py +22 -0
  62. cryosweep-0.3.0/cryosweep_gui/__init__.py +0 -0
  63. cryosweep-0.3.0/cryosweep_gui/__main__.py +4 -0
  64. cryosweep-0.3.0/cryosweep_gui/app.py +44 -0
  65. cryosweep-0.3.0/cryosweep_gui/export_dialog.py +110 -0
  66. cryosweep-0.3.0/cryosweep_gui/file_manager.py +114 -0
  67. cryosweep-0.3.0/cryosweep_gui/inputs/__init__.py +2 -0
  68. cryosweep-0.3.0/cryosweep_gui/inputs/acms.py +34 -0
  69. cryosweep-0.3.0/cryosweep_gui/inputs/base.py +62 -0
  70. cryosweep-0.3.0/cryosweep_gui/inputs/hall.py +99 -0
  71. cryosweep-0.3.0/cryosweep_gui/inputs/hc.py +328 -0
  72. cryosweep-0.3.0/cryosweep_gui/inputs/resistivity.py +42 -0
  73. cryosweep-0.3.0/cryosweep_gui/inputs/tto.py +28 -0
  74. cryosweep-0.3.0/cryosweep_gui/inputs/vsm.py +34 -0
  75. cryosweep-0.3.0/cryosweep_gui/main_window.py +279 -0
  76. cryosweep-0.3.0/cryosweep_gui/output_panel.py +756 -0
  77. cryosweep-0.3.0/cryosweep_gui/plot_controls.py +638 -0
  78. cryosweep-0.3.0/cryosweep_gui/preset_bar.py +158 -0
  79. cryosweep-0.3.0/cryosweep_gui/presets_io.py +14 -0
  80. cryosweep-0.3.0/cryosweep_gui/probe_tab.py +496 -0
  81. cryosweep-0.3.0/cryosweep_gui/state.py +31 -0
  82. cryosweep-0.3.0/cryosweep_gui/status_banner.py +36 -0
  83. cryosweep-0.3.0/cryosweep_gui/widgets.py +39 -0
  84. cryosweep-0.3.0/cryosweep_gui/worker.py +24 -0
  85. cryosweep-0.3.0/pyproject.toml +59 -0
  86. cryosweep-0.3.0/setup.cfg +4 -0
@@ -0,0 +1,79 @@
1
+ # PolyForm Noncommercial License 1.0.0
2
+
3
+ <https://polyformproject.org/licenses/noncommercial/1.0.0>
4
+
5
+ ## Acceptance
6
+
7
+ In order to get any license under these terms, you must agree to them as both strict obligations and conditions to all your licenses.
8
+
9
+ ## Copyright License
10
+
11
+ The licensor grants you a copyright license for the software to do everything you might do with the software that would otherwise infringe the licensor's copyright in it for any permitted purpose. However, you may only distribute the software according to [Distribution License](#distribution-license) and make changes or new works based on the software according to [Changes and New Works License](#changes-and-new-works-license).
12
+
13
+ ## Distribution License
14
+
15
+ The licensor grants you an additional copyright license to distribute copies of the software. Your license to distribute covers distributing the software with changes and new works permitted by [Changes and New Works License](#changes-and-new-works-license).
16
+
17
+ ## Notices
18
+
19
+ You must ensure that anyone who gets a copy of any part of the software from you also gets a copy of these terms or the URL for them above, as well as copies of any plain-text lines beginning with `Required Notice:` that the licensor provided with the software. For example:
20
+
21
+ > Required Notice: Copyright Yoyodyne, Inc. (http://example.com)
22
+
23
+ ## Changes and New Works License
24
+
25
+ The licensor grants you an additional copyright license to make changes and new works based on the software for any permitted purpose.
26
+
27
+ ## Patent License
28
+
29
+ The licensor grants you a patent license for the software that covers patent claims the licensor can license, or becomes able to license, that you would infringe by using the software.
30
+
31
+ ## Noncommercial Purposes
32
+
33
+ Any noncommercial purpose is a permitted purpose.
34
+
35
+ ## Personal Uses
36
+
37
+ Personal use for research, experiment, and testing for the benefit of public knowledge, personal study, private entertainment, hobby projects, amateur pursuits, or religious observance, without any anticipated commercial application, is use for a permitted purpose.
38
+
39
+ ## Noncommercial Organizations
40
+
41
+ Use by any charitable organization, educational institution, public research organization, public safety or health organization, environmental protection organization, or government institution is use for a permitted purpose regardless of the source of funding or obligations resulting from the funding.
42
+
43
+ ## Fair Use
44
+
45
+ You may have "fair use" rights for the software under the law. These terms do not limit them.
46
+
47
+ ## No Other Rights
48
+
49
+ These terms do not allow you to sublicense or transfer any of your licenses to anyone else, or prevent the licensor from granting licenses to anyone else. These terms do not imply any other licenses.
50
+
51
+ ## Patent Defense
52
+
53
+ If you make any written claim that the software infringes or contributes to infringement of any patent, your patent license for the software granted under these terms ends immediately. If your company makes such a claim, your patent license ends immediately for work on behalf of your company.
54
+
55
+ ## Violations
56
+
57
+ The first time you are notified in writing that you have violated any of these terms, or done anything with the software not covered by your licenses, your licenses can nonetheless continue if you come into full compliance with these terms, and take practical steps to correct past violations, within 32 days of receiving notice. Otherwise, all your licenses end immediately.
58
+
59
+ ## No Liability
60
+
61
+ ***As far as the law allows, the software comes as is, without any warranty or condition, and the licensor will not be liable to you for any damages arising out of these terms or the use or nature of the software, under any kind of legal claim.***
62
+
63
+ ## Definitions
64
+
65
+ The **licensor** is the individual or entity offering these terms, and the **software** is the software the licensor makes available under these terms.
66
+
67
+ **You** refers to the individual or entity agreeing to these terms.
68
+
69
+ **Your company** is any legal entity, sole proprietorship, or other kind of organization that you work for, plus all organizations that have control over, are under the control of, or are under common control with that organization. **Control** means ownership of substantially all the assets of an entity, or the power to direct its management and policies by vote, contract, or otherwise. Control can be direct or indirect.
70
+
71
+ **Your licenses** are all the licenses granted to you for the software under these terms.
72
+
73
+ **Use** means anything you do with the software requiring one of your licenses.
74
+
75
+ ---
76
+
77
+ Required Notice: Copyright 2026 Volodymyr Buturlim (https://orcid.org/0000-0001-8851-2489)
78
+
79
+ Commercial use is not granted by this licence. See COMMERCIAL.md.
@@ -0,0 +1,241 @@
1
+ Metadata-Version: 2.4
2
+ Name: cryosweep
3
+ Version: 0.3.0
4
+ Summary: Agent-drivable analysis of Quantum Design PPMS/MPMS measurement files: VSM, AC susceptibility, thermal transport, resistivity, heat capacity and Hall.
5
+ Author: Volodymyr Buturlim
6
+ License-Expression: PolyForm-Noncommercial-1.0.0
7
+ Project-URL: Homepage, https://github.com/Vova2B/cryosweep
8
+ Project-URL: Source, https://github.com/Vova2B/cryosweep
9
+ Project-URL: Issues, https://github.com/Vova2B/cryosweep/issues
10
+ Project-URL: Changelog, https://github.com/Vova2B/cryosweep/blob/main/CHANGELOG.md
11
+ Project-URL: Physics reference, https://github.com/Vova2B/cryosweep/blob/main/docs/physics-reference.md
12
+ Keywords: condensed-matter,physics,PPMS,MPMS,magnetometry,transport,thermal-transport
13
+ Classifier: Intended Audience :: Science/Research
14
+ Classifier: Topic :: Scientific/Engineering :: Physics
15
+ Classifier: Programming Language :: Python :: 3
16
+ Requires-Python: >=3.11
17
+ Description-Content-Type: text/markdown
18
+ License-File: LICENSE
19
+ License-File: THIRD-PARTY-LICENSES.md
20
+ Requires-Dist: numpy>=2.0
21
+ Requires-Dist: pandas>=2.2
22
+ Requires-Dist: scipy>=1.13
23
+ Requires-Dist: pydantic>=2.6
24
+ Requires-Dist: matplotlib>=3.11
25
+ Provides-Extra: gui
26
+ Requires-Dist: PySide6-Essentials>=6.7; extra == "gui"
27
+ Dynamic: license-file
28
+
29
+ # cryosweep
30
+
31
+ [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.22307209.svg)](https://doi.org/10.5281/zenodo.22307209)
32
+
33
+ Analysis of Quantum Design **PPMS** and **MPMS** measurement files (`.dat`) — a Qt-free
34
+ analysis core with a JSON contract, a command-line interface, and a desktop GUI built on the
35
+ same analyzers.
36
+
37
+ One file in, physics out: cryosweep detects which measurement it is looking at, separates the
38
+ sweeps, fits the appropriate models, and reports what it found — including when it *cannot*
39
+ report something, and why.
40
+
41
+ ![The cryosweep heat-capacity tab: low-temperature Cp/T models, full-range Debye-Einstein fit, entropy S(T), and per-field gamma and Debye temperature](https://raw.githubusercontent.com/Vova2B/cryosweep/main/docs/images/heat-capacity-multifield.png)
42
+
43
+ *That last clause is the point. In the status bar above, cryosweep reports θ_D drifting 160 %
44
+ across fields — the lattice should be field-independent — and a Sommerfeld coefficient γ that has
45
+ gone negative. Neither is handed back as a result; both are flagged as physics that does not hold.*
46
+
47
+ | Probe | What it fits |
48
+ |---|---|
49
+ | **Magnetization (VSM)** — QD + MPMS formats | χ, 1/χ, Curie-Weiss (θ, C, μ_eff) with a window-sensitivity ladder |
50
+ | **AC susceptibility (ACMS)** | χ′/χ″, superconducting screening step, T_c, χ″ peak / freezing temperature |
51
+ | **Thermal transport (TTO)** | κ, Seebeck, ZT, Wiedemann-Franz decomposition, Lorenz ratio, κ_ph power law |
52
+ | **Resistivity** — QD Resistivity + AC Transport | ρ(T), RRR ± σ, magnetoresistance, resistive T_c, power-law / Fermi-liquid fit |
53
+ | **Heat capacity** | Debye-Einstein Cp(T), low-T Cp/T vs T², spin-fluctuation models, entropy S(T), Schottky |
54
+ | **Hall effect** | Antisymmetrized R_xy, R_H, carrier density, mobility, R_H(T) |
55
+
56
+ The physics behind each — the models, the fitted quantities, and the criteria the detectors
57
+ use — is documented in [`docs/physics-reference.md`](https://github.com/Vova2B/cryosweep/blob/main/docs/physics-reference.md).
58
+
59
+ ## Install
60
+
61
+ ```bash
62
+ pip install cryosweep # core + command line
63
+ pip install 'cryosweep[gui]' # adds the desktop app
64
+ ```
65
+
66
+ The GUI is optional because the analysis core and CLI are Qt-free by design, and Qt is by far
67
+ the heaviest dependency here — leaving it out keeps an agent or CI install a quarter of the size.
68
+ Installing without it still gives you every analyzer; only `cryosweep-gui` needs the extra, and it
69
+ says so if you run it.
70
+
71
+ From a clone, for development:
72
+
73
+ ```bash
74
+ python3 -m venv .venv
75
+ .venv/bin/pip install -e '.[gui]'
76
+ ```
77
+
78
+ Python ≥ 3.11 (developed and tested on 3.14).
79
+
80
+ ## Quickstart
81
+
82
+ The [`examples/`](https://github.com/Vova2B/cryosweep/tree/main/examples) folder has a runnable file per probe, so you can try
83
+ everything before pointing it at your own data ([`examples/README.md`](https://github.com/Vova2B/cryosweep/blob/main/examples/README.md)
84
+ says what each file shows and which tab/inputs to use — the Hall examples in particular
85
+ open on the Resistivity tab first, because Hall measurements share the resistivity file
86
+ format).
87
+
88
+ Those files ship with the repository rather than the wheel, so after a `pip install` fetch one
89
+ first — or clone the repo and run the commands as written:
90
+
91
+ ```bash
92
+ curl -O https://raw.githubusercontent.com/Vova2B/cryosweep/main/examples/heat_capacity.dat
93
+ cryosweep analyze heat_capacity.dat
94
+ ```
95
+
96
+ ```bash
97
+ cryosweep analyze examples/magnetization_vsm.dat # Curie-Weiss: theta = -10 K
98
+ cryosweep analyze examples/heat_capacity.dat
99
+ cryosweep analyze examples/thermal_transport.dat
100
+ cryosweep report examples/resistivity_superconductor.dat # Markdown summary
101
+ cryosweep-gui # the desktop app
102
+ ```
103
+
104
+ Some measurements need inputs the file does not carry. MPMS files hold no molar mass or sample
105
+ mass, so the analyzer **gates** rather than guessing — supply them and it proceeds:
106
+
107
+ ```bash
108
+ cryosweep analyze examples/magnetization_mpms.dat --molar-mass 200 --mass-mg 5
109
+ ```
110
+
111
+ Hall measurements use the same file format as ordinary resistivity — only the wiring differs —
112
+ so the Hall analyzer is invoked explicitly, with the channel and the sample thickness:
113
+
114
+ ```bash
115
+ cryosweep hall examples/hall_field_sweeps.dat \
116
+ --hall-channel 1 --thickness 0.5 --thickness-unit mm --long-channel 2
117
+ # R_H = -2.500e-07 m^3/C
118
+ ```
119
+
120
+ ## Built to be driven by a program
121
+
122
+ Every command prints **one JSON object** on stdout (logs go to stderr) and sets a meaningful
123
+ exit code, so cryosweep is usable from a script, a pipeline, or an LLM agent without screen
124
+ scraping:
125
+
126
+ ```bash
127
+ cryosweep probes # available measurement types and what each one needs
128
+ cryosweep schema analyze:vsm # JSON Schema for the result shape
129
+ cryosweep export <file> --out result # tidy long-format CSVs, units in the headers
130
+ cryosweep run pipeline.json # batch
131
+ ```
132
+
133
+ Exit codes distinguish *no result* from *a result you should look at*: `0` ok, `10` gated (a
134
+ required input is missing — the payload names the flag), `11` low confidence, `2` bad input.
135
+ Codes 10 and 11 still print a full JSON envelope. Output is byte-stable for the same input, so
136
+ it diffs and caches cleanly. A ready-made agent guide ships in
137
+ [`skill/cryosweep/SKILL.md`](https://github.com/Vova2B/cryosweep/blob/main/skill/cryosweep/SKILL.md).
138
+
139
+ ## Example data
140
+
141
+ Everything in `examples/` is written by `tools/make_examples.py`.
142
+
143
+ **Eight of the ten files are synthetic**, generated by the same builders that produce the test
144
+ fixtures. The numbers are physically consistent and each file places a feature where it
145
+ exercises the relevant analyzer — but they are **not measurements of any real material**.
146
+
147
+ **Two are anonymized subsets of real measurements** — `magnetization_vsm_multifield.dat` and
148
+ `heat_capacity_multifield.dat` — because no synthetic file reproduces what real multi-field
149
+ data does to the segmentation and window-selection paths. They are decimated, and everything
150
+ that identified the sample, the operator or the instrument has been replaced: sample material
151
+ and comment, all five instrument serial numbers, the acquisition date (the absolute
152
+ `Time Stamp` column is rebased to zero, since it decodes to the measurement instant), the
153
+ calibration free text in the `Comment` column, and the formula weight and sample mass, which
154
+ are neutral values chosen only so the fits report a plausible moment. The generators carry an
155
+ `assert_no_identity_leak` post-condition that refuses to write the file if any token of the
156
+ source identity survives. The measured *shapes* are real; the sample metadata is not, and **no
157
+ scientific conclusion should be drawn from any file here**.
158
+
159
+ Regenerate with (the two real-derived files are skipped, and left untouched, on any machine
160
+ without the private source data):
161
+
162
+ ```bash
163
+ python tools/make_examples.py
164
+ ```
165
+
166
+ ## Tests
167
+
168
+ ```bash
169
+ QT_QPA_PLATFORM=offscreen python -m pytest
170
+ ```
171
+
172
+ Run it from the repository root — some tests build fixture paths relative to the working
173
+ directory and launch the CLI as a subprocess.
174
+
175
+ The suite ships with synthetic `.dat` fixtures only. Tests that need real measurement files, or
176
+ the maintainer's local reference gallery, **skip** when those are absent, so a fresh clone is
177
+ green with no data at all. To exercise the optional real-data tests against your own files,
178
+ create `real_data_map.json` in the repository root mapping logical keys to paths.
179
+
180
+ ## File format and provenance
181
+
182
+ The `.dat` files this program reads are produced by Quantum Design instrument software and
183
+ retain their original `; Copyright …, Quantum Design, Inc.` header lines; those are part of the
184
+ format and are preserved rather than stripped. The format is **read**, not redistributed.
185
+
186
+ This project is not affiliated with, endorsed by, or supported by Quantum Design, Inc. "PPMS"
187
+ and "MPMS" are used only to identify the instruments and file formats cryosweep is compatible
188
+ with. PPMS is a registered trademark of Quantum Design, Inc.
189
+
190
+ ## Licence
191
+
192
+ cryosweep is released under the [PolyForm Noncommercial License 1.0.0](https://github.com/Vova2B/cryosweep/blob/main/LICENSE).
193
+
194
+ **Free for research and education** — universities, public research institutes, national
195
+ laboratories, government and nonprofit organizations, and individuals, *regardless of how the
196
+ work is funded*. Use it, modify it, redistribute it, publish results with it.
197
+
198
+ **Commercial use requires a licence.** If you are a company, see
199
+ [COMMERCIAL.md](https://github.com/Vova2B/cryosweep/blob/main/COMMERCIAL.md) — it is a short email to `info@cryosweep.org`.
200
+
201
+ Third-party dependency licences, and what the LGPL requires of the Qt binding, are recorded in
202
+ [THIRD-PARTY-LICENSES.md](https://github.com/Vova2B/cryosweep/blob/main/THIRD-PARTY-LICENSES.md).
203
+
204
+ ## Known issues
205
+
206
+ Known defects are listed in [KNOWN-ISSUES.md](https://github.com/Vova2B/cryosweep/blob/main/KNOWN-ISSUES.md). Most are display or
207
+ ergonomics issues found by inspecting every rendered example, and each of those names the
208
+ example file that reproduces it; none of them changes a fitted number or an exported value.
209
+ Two exceptions are called out explicitly there — a temperature-setpoint binning bug in the
210
+ Hall analyzer that can fabricate a carrier-density point, and the derived-quantity fallback
211
+ that lets it reach the CSV. Both were found on real data and reproduce on no shipped example.
212
+
213
+ ## Versioning
214
+
215
+ Semantic versioning. While the version is **0.x** the interfaces are not frozen: the CLI JSON
216
+ envelope, the exit codes and the CSV columns may change between releases. Tagging **1.0.0** is
217
+ what freezes them.
218
+
219
+ Plot appearance, GUI layout and the internal Python API are not covered by that promise at any
220
+ version — figures are expected to improve, and doing so is not a breaking change.
221
+
222
+ ## Project documents
223
+
224
+ - [CHANGELOG.md](https://github.com/Vova2B/cryosweep/blob/main/CHANGELOG.md) — what is in each release
225
+ - [ROADMAP.md](https://github.com/Vova2B/cryosweep/blob/main/ROADMAP.md) — what is planned for 1.0, with measured costs where they were measured
226
+ - [KNOWN-ISSUES.md](https://github.com/Vova2B/cryosweep/blob/main/KNOWN-ISSUES.md) — known defects found and deferred, with what reproduces each
227
+ - [CONTRIBUTING.md](https://github.com/Vova2B/cryosweep/blob/main/CONTRIBUTING.md) and [CLA.md](https://github.com/Vova2B/cryosweep/blob/main/CLA.md) — how to contribute, and the one-time agreement
228
+ - [SECURITY.md](https://github.com/Vova2B/cryosweep/blob/main/SECURITY.md) — reporting a vulnerability
229
+ - [CODE_OF_CONDUCT.md](https://github.com/Vova2B/cryosweep/blob/main/CODE_OF_CONDUCT.md)
230
+
231
+ ## Contributing
232
+
233
+ Bug reports, files that break the loader, and pull requests are welcome — see
234
+ [CONTRIBUTING.md](https://github.com/Vova2B/cryosweep/blob/main/CONTRIBUTING.md). Because the project is dual-licensed, a pull request needs a
235
+ one-time [Contributor License Agreement](https://github.com/Vova2B/cryosweep/blob/main/CLA.md); you keep your copyright, and a bot walks you
236
+ through it on your first PR.
237
+
238
+ ## Citing
239
+
240
+ If cryosweep contributes to work you publish, please cite it — see
241
+ [CITATION.cff](https://github.com/Vova2B/cryosweep/blob/main/CITATION.cff).
@@ -0,0 +1,213 @@
1
+ # cryosweep
2
+
3
+ [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.22307209.svg)](https://doi.org/10.5281/zenodo.22307209)
4
+
5
+ Analysis of Quantum Design **PPMS** and **MPMS** measurement files (`.dat`) — a Qt-free
6
+ analysis core with a JSON contract, a command-line interface, and a desktop GUI built on the
7
+ same analyzers.
8
+
9
+ One file in, physics out: cryosweep detects which measurement it is looking at, separates the
10
+ sweeps, fits the appropriate models, and reports what it found — including when it *cannot*
11
+ report something, and why.
12
+
13
+ ![The cryosweep heat-capacity tab: low-temperature Cp/T models, full-range Debye-Einstein fit, entropy S(T), and per-field gamma and Debye temperature](https://raw.githubusercontent.com/Vova2B/cryosweep/main/docs/images/heat-capacity-multifield.png)
14
+
15
+ *That last clause is the point. In the status bar above, cryosweep reports θ_D drifting 160 %
16
+ across fields — the lattice should be field-independent — and a Sommerfeld coefficient γ that has
17
+ gone negative. Neither is handed back as a result; both are flagged as physics that does not hold.*
18
+
19
+ | Probe | What it fits |
20
+ |---|---|
21
+ | **Magnetization (VSM)** — QD + MPMS formats | χ, 1/χ, Curie-Weiss (θ, C, μ_eff) with a window-sensitivity ladder |
22
+ | **AC susceptibility (ACMS)** | χ′/χ″, superconducting screening step, T_c, χ″ peak / freezing temperature |
23
+ | **Thermal transport (TTO)** | κ, Seebeck, ZT, Wiedemann-Franz decomposition, Lorenz ratio, κ_ph power law |
24
+ | **Resistivity** — QD Resistivity + AC Transport | ρ(T), RRR ± σ, magnetoresistance, resistive T_c, power-law / Fermi-liquid fit |
25
+ | **Heat capacity** | Debye-Einstein Cp(T), low-T Cp/T vs T², spin-fluctuation models, entropy S(T), Schottky |
26
+ | **Hall effect** | Antisymmetrized R_xy, R_H, carrier density, mobility, R_H(T) |
27
+
28
+ The physics behind each — the models, the fitted quantities, and the criteria the detectors
29
+ use — is documented in [`docs/physics-reference.md`](https://github.com/Vova2B/cryosweep/blob/main/docs/physics-reference.md).
30
+
31
+ ## Install
32
+
33
+ ```bash
34
+ pip install cryosweep # core + command line
35
+ pip install 'cryosweep[gui]' # adds the desktop app
36
+ ```
37
+
38
+ The GUI is optional because the analysis core and CLI are Qt-free by design, and Qt is by far
39
+ the heaviest dependency here — leaving it out keeps an agent or CI install a quarter of the size.
40
+ Installing without it still gives you every analyzer; only `cryosweep-gui` needs the extra, and it
41
+ says so if you run it.
42
+
43
+ From a clone, for development:
44
+
45
+ ```bash
46
+ python3 -m venv .venv
47
+ .venv/bin/pip install -e '.[gui]'
48
+ ```
49
+
50
+ Python ≥ 3.11 (developed and tested on 3.14).
51
+
52
+ ## Quickstart
53
+
54
+ The [`examples/`](https://github.com/Vova2B/cryosweep/tree/main/examples) folder has a runnable file per probe, so you can try
55
+ everything before pointing it at your own data ([`examples/README.md`](https://github.com/Vova2B/cryosweep/blob/main/examples/README.md)
56
+ says what each file shows and which tab/inputs to use — the Hall examples in particular
57
+ open on the Resistivity tab first, because Hall measurements share the resistivity file
58
+ format).
59
+
60
+ Those files ship with the repository rather than the wheel, so after a `pip install` fetch one
61
+ first — or clone the repo and run the commands as written:
62
+
63
+ ```bash
64
+ curl -O https://raw.githubusercontent.com/Vova2B/cryosweep/main/examples/heat_capacity.dat
65
+ cryosweep analyze heat_capacity.dat
66
+ ```
67
+
68
+ ```bash
69
+ cryosweep analyze examples/magnetization_vsm.dat # Curie-Weiss: theta = -10 K
70
+ cryosweep analyze examples/heat_capacity.dat
71
+ cryosweep analyze examples/thermal_transport.dat
72
+ cryosweep report examples/resistivity_superconductor.dat # Markdown summary
73
+ cryosweep-gui # the desktop app
74
+ ```
75
+
76
+ Some measurements need inputs the file does not carry. MPMS files hold no molar mass or sample
77
+ mass, so the analyzer **gates** rather than guessing — supply them and it proceeds:
78
+
79
+ ```bash
80
+ cryosweep analyze examples/magnetization_mpms.dat --molar-mass 200 --mass-mg 5
81
+ ```
82
+
83
+ Hall measurements use the same file format as ordinary resistivity — only the wiring differs —
84
+ so the Hall analyzer is invoked explicitly, with the channel and the sample thickness:
85
+
86
+ ```bash
87
+ cryosweep hall examples/hall_field_sweeps.dat \
88
+ --hall-channel 1 --thickness 0.5 --thickness-unit mm --long-channel 2
89
+ # R_H = -2.500e-07 m^3/C
90
+ ```
91
+
92
+ ## Built to be driven by a program
93
+
94
+ Every command prints **one JSON object** on stdout (logs go to stderr) and sets a meaningful
95
+ exit code, so cryosweep is usable from a script, a pipeline, or an LLM agent without screen
96
+ scraping:
97
+
98
+ ```bash
99
+ cryosweep probes # available measurement types and what each one needs
100
+ cryosweep schema analyze:vsm # JSON Schema for the result shape
101
+ cryosweep export <file> --out result # tidy long-format CSVs, units in the headers
102
+ cryosweep run pipeline.json # batch
103
+ ```
104
+
105
+ Exit codes distinguish *no result* from *a result you should look at*: `0` ok, `10` gated (a
106
+ required input is missing — the payload names the flag), `11` low confidence, `2` bad input.
107
+ Codes 10 and 11 still print a full JSON envelope. Output is byte-stable for the same input, so
108
+ it diffs and caches cleanly. A ready-made agent guide ships in
109
+ [`skill/cryosweep/SKILL.md`](https://github.com/Vova2B/cryosweep/blob/main/skill/cryosweep/SKILL.md).
110
+
111
+ ## Example data
112
+
113
+ Everything in `examples/` is written by `tools/make_examples.py`.
114
+
115
+ **Eight of the ten files are synthetic**, generated by the same builders that produce the test
116
+ fixtures. The numbers are physically consistent and each file places a feature where it
117
+ exercises the relevant analyzer — but they are **not measurements of any real material**.
118
+
119
+ **Two are anonymized subsets of real measurements** — `magnetization_vsm_multifield.dat` and
120
+ `heat_capacity_multifield.dat` — because no synthetic file reproduces what real multi-field
121
+ data does to the segmentation and window-selection paths. They are decimated, and everything
122
+ that identified the sample, the operator or the instrument has been replaced: sample material
123
+ and comment, all five instrument serial numbers, the acquisition date (the absolute
124
+ `Time Stamp` column is rebased to zero, since it decodes to the measurement instant), the
125
+ calibration free text in the `Comment` column, and the formula weight and sample mass, which
126
+ are neutral values chosen only so the fits report a plausible moment. The generators carry an
127
+ `assert_no_identity_leak` post-condition that refuses to write the file if any token of the
128
+ source identity survives. The measured *shapes* are real; the sample metadata is not, and **no
129
+ scientific conclusion should be drawn from any file here**.
130
+
131
+ Regenerate with (the two real-derived files are skipped, and left untouched, on any machine
132
+ without the private source data):
133
+
134
+ ```bash
135
+ python tools/make_examples.py
136
+ ```
137
+
138
+ ## Tests
139
+
140
+ ```bash
141
+ QT_QPA_PLATFORM=offscreen python -m pytest
142
+ ```
143
+
144
+ Run it from the repository root — some tests build fixture paths relative to the working
145
+ directory and launch the CLI as a subprocess.
146
+
147
+ The suite ships with synthetic `.dat` fixtures only. Tests that need real measurement files, or
148
+ the maintainer's local reference gallery, **skip** when those are absent, so a fresh clone is
149
+ green with no data at all. To exercise the optional real-data tests against your own files,
150
+ create `real_data_map.json` in the repository root mapping logical keys to paths.
151
+
152
+ ## File format and provenance
153
+
154
+ The `.dat` files this program reads are produced by Quantum Design instrument software and
155
+ retain their original `; Copyright …, Quantum Design, Inc.` header lines; those are part of the
156
+ format and are preserved rather than stripped. The format is **read**, not redistributed.
157
+
158
+ This project is not affiliated with, endorsed by, or supported by Quantum Design, Inc. "PPMS"
159
+ and "MPMS" are used only to identify the instruments and file formats cryosweep is compatible
160
+ with. PPMS is a registered trademark of Quantum Design, Inc.
161
+
162
+ ## Licence
163
+
164
+ cryosweep is released under the [PolyForm Noncommercial License 1.0.0](https://github.com/Vova2B/cryosweep/blob/main/LICENSE).
165
+
166
+ **Free for research and education** — universities, public research institutes, national
167
+ laboratories, government and nonprofit organizations, and individuals, *regardless of how the
168
+ work is funded*. Use it, modify it, redistribute it, publish results with it.
169
+
170
+ **Commercial use requires a licence.** If you are a company, see
171
+ [COMMERCIAL.md](https://github.com/Vova2B/cryosweep/blob/main/COMMERCIAL.md) — it is a short email to `info@cryosweep.org`.
172
+
173
+ Third-party dependency licences, and what the LGPL requires of the Qt binding, are recorded in
174
+ [THIRD-PARTY-LICENSES.md](https://github.com/Vova2B/cryosweep/blob/main/THIRD-PARTY-LICENSES.md).
175
+
176
+ ## Known issues
177
+
178
+ Known defects are listed in [KNOWN-ISSUES.md](https://github.com/Vova2B/cryosweep/blob/main/KNOWN-ISSUES.md). Most are display or
179
+ ergonomics issues found by inspecting every rendered example, and each of those names the
180
+ example file that reproduces it; none of them changes a fitted number or an exported value.
181
+ Two exceptions are called out explicitly there — a temperature-setpoint binning bug in the
182
+ Hall analyzer that can fabricate a carrier-density point, and the derived-quantity fallback
183
+ that lets it reach the CSV. Both were found on real data and reproduce on no shipped example.
184
+
185
+ ## Versioning
186
+
187
+ Semantic versioning. While the version is **0.x** the interfaces are not frozen: the CLI JSON
188
+ envelope, the exit codes and the CSV columns may change between releases. Tagging **1.0.0** is
189
+ what freezes them.
190
+
191
+ Plot appearance, GUI layout and the internal Python API are not covered by that promise at any
192
+ version — figures are expected to improve, and doing so is not a breaking change.
193
+
194
+ ## Project documents
195
+
196
+ - [CHANGELOG.md](https://github.com/Vova2B/cryosweep/blob/main/CHANGELOG.md) — what is in each release
197
+ - [ROADMAP.md](https://github.com/Vova2B/cryosweep/blob/main/ROADMAP.md) — what is planned for 1.0, with measured costs where they were measured
198
+ - [KNOWN-ISSUES.md](https://github.com/Vova2B/cryosweep/blob/main/KNOWN-ISSUES.md) — known defects found and deferred, with what reproduces each
199
+ - [CONTRIBUTING.md](https://github.com/Vova2B/cryosweep/blob/main/CONTRIBUTING.md) and [CLA.md](https://github.com/Vova2B/cryosweep/blob/main/CLA.md) — how to contribute, and the one-time agreement
200
+ - [SECURITY.md](https://github.com/Vova2B/cryosweep/blob/main/SECURITY.md) — reporting a vulnerability
201
+ - [CODE_OF_CONDUCT.md](https://github.com/Vova2B/cryosweep/blob/main/CODE_OF_CONDUCT.md)
202
+
203
+ ## Contributing
204
+
205
+ Bug reports, files that break the loader, and pull requests are welcome — see
206
+ [CONTRIBUTING.md](https://github.com/Vova2B/cryosweep/blob/main/CONTRIBUTING.md). Because the project is dual-licensed, a pull request needs a
207
+ one-time [Contributor License Agreement](https://github.com/Vova2B/cryosweep/blob/main/CLA.md); you keep your copyright, and a bot walks you
208
+ through it on your first PR.
209
+
210
+ ## Citing
211
+
212
+ If cryosweep contributes to work you publish, please cite it — see
213
+ [CITATION.cff](https://github.com/Vova2B/cryosweep/blob/main/CITATION.cff).
@@ -0,0 +1,66 @@
1
+ # Third-party licences
2
+
3
+ cryosweep itself is licensed under the [PolyForm Noncommercial License 1.0.0](LICENSE).
4
+ It does **not** bundle or redistribute any of the packages below — they are declared as
5
+ dependencies in `pyproject.toml` and installed by pip from PyPI, each under its own
6
+ licence. This file records what those licences are and what they require.
7
+
8
+ | Package | Licence | Notes |
9
+ |---|---|---|
10
+ | [numpy](https://numpy.org) | BSD-3-Clause (with vendored 0BSD / MIT / Zlib components) | Permissive |
11
+ | [pandas](https://pandas.pydata.org) | BSD-3-Clause | Permissive |
12
+ | [scipy](https://scipy.org) | BSD-3-Clause | Permissive |
13
+ | [pydantic](https://docs.pydantic.dev) | MIT | Permissive |
14
+ | [matplotlib](https://matplotlib.org) | Matplotlib licence (PSF-based, BSD-compatible) | Permissive |
15
+ | [PySide6 / Qt for Python](https://doc.qt.io/qtforpython/) | **LGPL-3.0-only** (also available under GPL-2.0 / GPL-3.0, or a commercial Qt licence) | See below |
16
+
17
+ All of these are compatible with distributing cryosweep under a noncommercial
18
+ source-available licence. None of them imposes copyleft on cryosweep's own source.
19
+
20
+ ## PySide6 and the LGPL — why this matters
21
+
22
+ The GUI uses **PySide6 (Qt for Python)** under the **LGPL-3.0**. This choice is
23
+ deliberate and load-bearing: the alternative Python binding, PyQt6, is offered only
24
+ under the GPL or a paid commercial licence, and the GPL option would force cryosweep's
25
+ own source to be GPL — which is incompatible with the licensing model here.
26
+
27
+ The LGPL permits combining a work under a licence of your choosing with the library,
28
+ provided the recipient can replace the LGPL-licensed library with their own version.
29
+ cryosweep satisfies this by construction:
30
+
31
+ - it is distributed **as source**, and PySide6 is installed separately by pip;
32
+ - nothing is statically linked, and no Qt libraries are bundled or modified;
33
+ - any user can upgrade, patch, or substitute their own PySide6 build at any time.
34
+
35
+ The analysis core (`cryosweep_core`) imports no Qt at all — a property enforced by a
36
+ test (`tests/core/test_qt_free.py`) — so the CLI and the library are usable with no Qt
37
+ present on the system.
38
+
39
+ **If cryosweep is ever redistributed as a frozen binary** (PyInstaller, Nuitka, an app
40
+ bundle, or any single-file executable), the LGPL relinking obligation stops being
41
+ satisfied automatically and must be addressed explicitly: ship the Qt libraries as
42
+ separate shared objects the user can replace, include the LGPL text and the required
43
+ notices, and offer the corresponding source for the Qt components. Do not freeze a
44
+ release without handling this.
45
+
46
+ ## Obtaining the licence texts
47
+
48
+ Each package ships its own licence in its distribution:
49
+
50
+ ```bash
51
+ pip show -f <package> # locate the installed package
52
+ python -c "import importlib.metadata as m; print(m.metadata('<package>')['License'])"
53
+ ```
54
+
55
+ Canonical texts: [BSD-3-Clause](https://opensource.org/license/bsd-3-clause),
56
+ [MIT](https://opensource.org/license/mit),
57
+ [LGPL-3.0](https://www.gnu.org/licenses/lgpl-3.0.html),
58
+ [matplotlib](https://matplotlib.org/stable/project/license.html).
59
+
60
+ ## Not a dependency: Quantum Design
61
+
62
+ cryosweep reads the `.dat` files produced by Quantum Design PPMS and MPMS instruments.
63
+ It contains no Quantum Design code and is not affiliated with, endorsed by, or a
64
+ product of Quantum Design, Inc. "PPMS" and "MPMS" are used only to describe the file
65
+ formats and instruments the software is compatible with. PPMS is a registered
66
+ trademark of Quantum Design, Inc.