mechanicsdsl-datasets 0.1.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.
- mechanicsdsl_datasets-0.1.0/.gitignore +47 -0
- mechanicsdsl_datasets-0.1.0/CITATION.cff +23 -0
- mechanicsdsl_datasets-0.1.0/LICENSE +21 -0
- mechanicsdsl_datasets-0.1.0/PKG-INFO +188 -0
- mechanicsdsl_datasets-0.1.0/README.md +151 -0
- mechanicsdsl_datasets-0.1.0/datasets/coupled_oscillators_synthetic/README.md +71 -0
- mechanicsdsl_datasets-0.1.0/datasets/coupled_oscillators_synthetic/data.csv +2002 -0
- mechanicsdsl_datasets-0.1.0/datasets/coupled_oscillators_synthetic/data.hdf5 +0 -0
- mechanicsdsl_datasets-0.1.0/datasets/coupled_oscillators_synthetic/examples/estimate_normal_modes.py +62 -0
- mechanicsdsl_datasets-0.1.0/datasets/coupled_oscillators_synthetic/examples/validate_forward.py +50 -0
- mechanicsdsl_datasets-0.1.0/datasets/coupled_oscillators_synthetic/metadata.json +31 -0
- mechanicsdsl_datasets-0.1.0/datasets/double_pendulum_synthetic/README.md +76 -0
- mechanicsdsl_datasets-0.1.0/datasets/double_pendulum_synthetic/data.csv +502 -0
- mechanicsdsl_datasets-0.1.0/datasets/double_pendulum_synthetic/data.hdf5 +0 -0
- mechanicsdsl_datasets-0.1.0/datasets/double_pendulum_synthetic/examples/.gitkeep +1 -0
- mechanicsdsl_datasets-0.1.0/datasets/double_pendulum_synthetic/examples/estimate_scipy.py +65 -0
- mechanicsdsl_datasets-0.1.0/datasets/double_pendulum_synthetic/examples/validate_forward.py +55 -0
- mechanicsdsl_datasets-0.1.0/datasets/double_pendulum_synthetic/metadata.json +37 -0
- mechanicsdsl_datasets-0.1.0/datasets/pendulum_synthetic/README.md +117 -0
- mechanicsdsl_datasets-0.1.0/datasets/pendulum_synthetic/data.csv +1002 -0
- mechanicsdsl_datasets-0.1.0/datasets/pendulum_synthetic/data.hdf5 +0 -0
- mechanicsdsl_datasets-0.1.0/datasets/pendulum_synthetic/examples/estimate_scipy.py +104 -0
- mechanicsdsl_datasets-0.1.0/datasets/pendulum_synthetic/examples/validate_forward.py +100 -0
- mechanicsdsl_datasets-0.1.0/datasets/pendulum_synthetic/metadata.json +34 -0
- mechanicsdsl_datasets-0.1.0/pyproject.toml +73 -0
- mechanicsdsl_datasets-0.1.0/src/mechanicsdsl_datasets/__init__.py +22 -0
- mechanicsdsl_datasets-0.1.0/src/mechanicsdsl_datasets/_loader.py +207 -0
- mechanicsdsl_datasets-0.1.0/src/mechanicsdsl_datasets/_version.py +1 -0
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
__pycache__/
|
|
2
|
+
*.py[cod]
|
|
3
|
+
*$py.class
|
|
4
|
+
*.so
|
|
5
|
+
*.egg
|
|
6
|
+
*.egg-info/
|
|
7
|
+
dist/
|
|
8
|
+
build/
|
|
9
|
+
eggs/
|
|
10
|
+
.eggs/
|
|
11
|
+
lib/
|
|
12
|
+
lib64/
|
|
13
|
+
parts/
|
|
14
|
+
sdist/
|
|
15
|
+
var/
|
|
16
|
+
wheels/
|
|
17
|
+
*.whl
|
|
18
|
+
MANIFEST
|
|
19
|
+
.env
|
|
20
|
+
.venv
|
|
21
|
+
env/
|
|
22
|
+
venv/
|
|
23
|
+
ENV/
|
|
24
|
+
.Python
|
|
25
|
+
pip-log.txt
|
|
26
|
+
pip-delete-this-directory.txt
|
|
27
|
+
.tox/
|
|
28
|
+
.coverage
|
|
29
|
+
.coverage.*
|
|
30
|
+
htmlcov/
|
|
31
|
+
.pytest_cache/
|
|
32
|
+
.mypy_cache/
|
|
33
|
+
.ruff_cache/
|
|
34
|
+
*.log
|
|
35
|
+
*.pot
|
|
36
|
+
*.mo
|
|
37
|
+
.DS_Store
|
|
38
|
+
Thumbs.db
|
|
39
|
+
.idea/
|
|
40
|
+
.vscode/
|
|
41
|
+
*.swp
|
|
42
|
+
*.swo
|
|
43
|
+
*~
|
|
44
|
+
.ipynb_checkpoints/
|
|
45
|
+
*.ipynb_checkpoints
|
|
46
|
+
profile_output/
|
|
47
|
+
*.prof
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
cff-version: 1.2.0
|
|
2
|
+
message: "If you use these datasets in your research, please cite:"
|
|
3
|
+
type: dataset
|
|
4
|
+
title: "MechanicsDSL Physics Datasets"
|
|
5
|
+
abstract: >
|
|
6
|
+
Reference datasets for physics parameter estimation and inverse problem
|
|
7
|
+
benchmarking. Includes synthetic datasets with known ground-truth parameters
|
|
8
|
+
generated from MechanicsDSL forward simulations with Gaussian observation noise.
|
|
9
|
+
authors:
|
|
10
|
+
- family-names: Parsons
|
|
11
|
+
given-names: Noah
|
|
12
|
+
orcid: "https://orcid.org/0009-0000-7224-6040"
|
|
13
|
+
affiliation: "American Forge Institute & Eastern Wyoming College"
|
|
14
|
+
repository-code: "https://github.com/MechanicsDSL/mechanicsdsl-datasets"
|
|
15
|
+
license: MIT
|
|
16
|
+
date-released: "2026-03-13"
|
|
17
|
+
references:
|
|
18
|
+
- type: software
|
|
19
|
+
title: "MechanicsDSL"
|
|
20
|
+
doi: "10.5281/zenodo.17771040"
|
|
21
|
+
authors:
|
|
22
|
+
- family-names: Parsons
|
|
23
|
+
given-names: Noah
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 MechanicsDSL
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: mechanicsdsl-datasets
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Reference physics datasets for MechanicsDSL parameter estimation and inverse problem benchmarking
|
|
5
|
+
Project-URL: Homepage, https://github.com/MechanicsDSL/mechanicsdsl-datasets
|
|
6
|
+
Project-URL: Documentation, https://mechanicsdsl.readthedocs.io
|
|
7
|
+
Project-URL: Repository, https://github.com/MechanicsDSL/mechanicsdsl-datasets
|
|
8
|
+
Project-URL: Bug Tracker, https://github.com/MechanicsDSL/mechanicsdsl-datasets/issues
|
|
9
|
+
Project-URL: DOI, https://doi.org/10.5281/zenodo.17771040
|
|
10
|
+
Author-email: Noah Parsons <nomapa223@gmail.com>
|
|
11
|
+
License: MIT
|
|
12
|
+
License-File: LICENSE
|
|
13
|
+
Keywords: MechanicsDSL,datasets,inverse problems,mechanics,parameter estimation,physics,scientific computing
|
|
14
|
+
Classifier: Development Status :: 3 - Alpha
|
|
15
|
+
Classifier: Intended Audience :: Education
|
|
16
|
+
Classifier: Intended Audience :: Science/Research
|
|
17
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
18
|
+
Classifier: Programming Language :: Python :: 3
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
23
|
+
Classifier: Topic :: Scientific/Engineering :: Mathematics
|
|
24
|
+
Classifier: Topic :: Scientific/Engineering :: Physics
|
|
25
|
+
Requires-Python: >=3.9
|
|
26
|
+
Requires-Dist: h5py>=3.8
|
|
27
|
+
Requires-Dist: numpy>=1.24
|
|
28
|
+
Requires-Dist: pandas>=2.0
|
|
29
|
+
Requires-Dist: scipy>=1.10
|
|
30
|
+
Provides-Extra: dev
|
|
31
|
+
Requires-Dist: pytest-cov; extra == 'dev'
|
|
32
|
+
Requires-Dist: pytest>=7.0; extra == 'dev'
|
|
33
|
+
Requires-Dist: ruff; extra == 'dev'
|
|
34
|
+
Provides-Extra: estimation
|
|
35
|
+
Requires-Dist: mechanicsdsl-core; extra == 'estimation'
|
|
36
|
+
Description-Content-Type: text/markdown
|
|
37
|
+
|
|
38
|
+
<p align="center">
|
|
39
|
+
<img src="https://raw.githubusercontent.com/MechanicsDSL/mechanicsdsl/main/docs/images/logo.png" alt="MechanicsDSL Logo" width="360">
|
|
40
|
+
</p>
|
|
41
|
+
|
|
42
|
+
<h1 align="center">mechanicsdsl-datasets</h1>
|
|
43
|
+
|
|
44
|
+
<p align="center">
|
|
45
|
+
<em>Reference datasets for physics parameter estimation and inverse problem benchmarking.</em>
|
|
46
|
+
</p>
|
|
47
|
+
|
|
48
|
+
<p align="center">
|
|
49
|
+
<a href="https://pypi.org/project/mechanicsdsl-datasets/"><img src="https://img.shields.io/pypi/v/mechanicsdsl-datasets" alt="PyPI"></a>
|
|
50
|
+
<img src="https://img.shields.io/badge/datasets-3-blue" alt="3 Datasets">
|
|
51
|
+
<img src="https://img.shields.io/badge/format-CSV%20%7C%20HDF5%20%7C%20JSON-blue" alt="Formats">
|
|
52
|
+
<a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="MIT License"></a>
|
|
53
|
+
<a href="https://github.com/MechanicsDSL/mechanicsdsl"><img src="https://img.shields.io/badge/core-mechanicsdsl-blue" alt="Core Package"></a>
|
|
54
|
+
</p>
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## Install
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
pip install mechanicsdsl-datasets
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Or clone for direct access to raw CSV/HDF5 files:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
git clone https://github.com/MechanicsDSL/mechanicsdsl-datasets
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## Available Datasets
|
|
73
|
+
|
|
74
|
+
| Dataset | System | Observations | Rate | Noise σ | Ground Truth |
|
|
75
|
+
|---------|--------|-------------|------|---------|--------------|
|
|
76
|
+
| [`pendulum_synthetic`](datasets/pendulum_synthetic/) | Simple pendulum | 1,001 | 100 Hz | 0.010 rad | m=1.0, l=0.5, g=9.81 |
|
|
77
|
+
| [`double_pendulum_synthetic`](datasets/double_pendulum_synthetic/) | Double pendulum (near-periodic) | 501 | 100 Hz | 0.005 rad | m=1.0, l=1.0, g=9.81 |
|
|
78
|
+
| [`coupled_oscillators_synthetic`](datasets/coupled_oscillators_synthetic/) | Coupled pendulums (3 beat periods) | 2,001 | 100 Hz | 0.005 rad | m=1.0, l=1.0, k=0.5 |
|
|
79
|
+
|
|
80
|
+
All datasets include clean trajectories, Gaussian-noisy observations, HDF5 with embedded metadata, and paired estimation/validation scripts.
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## Quick Start (pip install)
|
|
85
|
+
|
|
86
|
+
```python
|
|
87
|
+
import mechanicsdsl_datasets as mds
|
|
88
|
+
|
|
89
|
+
# Load a dataset
|
|
90
|
+
dataset = mds.load("pendulum_synthetic")
|
|
91
|
+
print(dataset.ground_truth) # {'m': 1.0, 'l': 0.5, 'g': 9.81}
|
|
92
|
+
print(dataset.t.shape) # (1001,)
|
|
93
|
+
print(dataset.theta_noisy[:5]) # noisy observations
|
|
94
|
+
|
|
95
|
+
# Run built-in validation
|
|
96
|
+
dataset.validate() # confirms forward simulation matches clean data
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
## Quick Start (raw files)
|
|
102
|
+
|
|
103
|
+
```python
|
|
104
|
+
import pandas as pd
|
|
105
|
+
import json
|
|
106
|
+
|
|
107
|
+
data = pd.read_csv("datasets/pendulum_synthetic/data.csv")
|
|
108
|
+
meta = json.load(open("datasets/pendulum_synthetic/metadata.json"))
|
|
109
|
+
|
|
110
|
+
t = data["t_s"].values
|
|
111
|
+
theta_obs = data["theta_rad_noisy"].values
|
|
112
|
+
truth = meta["ground_truth"] # {'m': 1.0, 'l': 0.5, 'g': 9.81}
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
## Repository Structure
|
|
118
|
+
|
|
119
|
+
```
|
|
120
|
+
mechanicsdsl-datasets/
|
|
121
|
+
├── datasets/
|
|
122
|
+
│ ├── pendulum_synthetic/
|
|
123
|
+
│ │ ├── README.md, data.csv, data.hdf5, metadata.json
|
|
124
|
+
│ │ └── examples/ estimate_scipy.py, validate_forward.py
|
|
125
|
+
│ ├── double_pendulum_synthetic/
|
|
126
|
+
│ │ ├── README.md, data.csv, data.hdf5, metadata.json
|
|
127
|
+
│ │ └── examples/ estimate_scipy.py, validate_forward.py
|
|
128
|
+
│ └── coupled_oscillators_synthetic/
|
|
129
|
+
│ ├── README.md, data.csv, data.hdf5, metadata.json
|
|
130
|
+
│ └── examples/ estimate_normal_modes.py, validate_forward.py
|
|
131
|
+
├── docs/
|
|
132
|
+
│ ├── schema.md # metadata.json schema reference
|
|
133
|
+
│ └── estimation_guide.md # least-squares, MCMC, FFT methods
|
|
134
|
+
├── scripts/
|
|
135
|
+
│ ├── generate_all.py # regenerate all synthetic datasets
|
|
136
|
+
│ └── validate_all.py # run all validate_forward.py scripts
|
|
137
|
+
└── tests/
|
|
138
|
+
└── test_datasets.py # schema, row count, NaN, noise std checks
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
## Estimation Examples
|
|
144
|
+
|
|
145
|
+
Each dataset ships with working estimation scripts:
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
# Estimate pendulum length from noisy observations
|
|
149
|
+
cd datasets/pendulum_synthetic
|
|
150
|
+
python examples/estimate_scipy.py
|
|
151
|
+
# Estimated: l = 0.4998 m (ground truth: 0.5000 m)
|
|
152
|
+
|
|
153
|
+
# Identify normal mode frequencies via FFT
|
|
154
|
+
cd datasets/coupled_oscillators_synthetic
|
|
155
|
+
python examples/estimate_normal_modes.py
|
|
156
|
+
# omega1 = 3.1321 rad/s, omega2 = 3.2636 rad/s, k = 0.500 N/m
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
---
|
|
160
|
+
|
|
161
|
+
## Testing
|
|
162
|
+
|
|
163
|
+
```bash
|
|
164
|
+
pip install pytest h5py numpy scipy pandas
|
|
165
|
+
pytest tests/ -v
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
---
|
|
169
|
+
|
|
170
|
+
## Contributing
|
|
171
|
+
|
|
172
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md). Experimental datasets with real sensor data especially welcome.
|
|
173
|
+
|
|
174
|
+
## Citation
|
|
175
|
+
|
|
176
|
+
```bibtex
|
|
177
|
+
@dataset{mechanicsdsl_datasets2026,
|
|
178
|
+
author = {Parsons, Noah},
|
|
179
|
+
title = {{MechanicsDSL Physics Datasets}},
|
|
180
|
+
year = {2026},
|
|
181
|
+
doi = {10.5281/zenodo.17771040},
|
|
182
|
+
url = {https://github.com/MechanicsDSL/mechanicsdsl-datasets}
|
|
183
|
+
}
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
## License
|
|
187
|
+
|
|
188
|
+
MIT License — see [LICENSE](LICENSE).
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="https://raw.githubusercontent.com/MechanicsDSL/mechanicsdsl/main/docs/images/logo.png" alt="MechanicsDSL Logo" width="360">
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
<h1 align="center">mechanicsdsl-datasets</h1>
|
|
6
|
+
|
|
7
|
+
<p align="center">
|
|
8
|
+
<em>Reference datasets for physics parameter estimation and inverse problem benchmarking.</em>
|
|
9
|
+
</p>
|
|
10
|
+
|
|
11
|
+
<p align="center">
|
|
12
|
+
<a href="https://pypi.org/project/mechanicsdsl-datasets/"><img src="https://img.shields.io/pypi/v/mechanicsdsl-datasets" alt="PyPI"></a>
|
|
13
|
+
<img src="https://img.shields.io/badge/datasets-3-blue" alt="3 Datasets">
|
|
14
|
+
<img src="https://img.shields.io/badge/format-CSV%20%7C%20HDF5%20%7C%20JSON-blue" alt="Formats">
|
|
15
|
+
<a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="MIT License"></a>
|
|
16
|
+
<a href="https://github.com/MechanicsDSL/mechanicsdsl"><img src="https://img.shields.io/badge/core-mechanicsdsl-blue" alt="Core Package"></a>
|
|
17
|
+
</p>
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Install
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
pip install mechanicsdsl-datasets
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Or clone for direct access to raw CSV/HDF5 files:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
git clone https://github.com/MechanicsDSL/mechanicsdsl-datasets
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Available Datasets
|
|
36
|
+
|
|
37
|
+
| Dataset | System | Observations | Rate | Noise σ | Ground Truth |
|
|
38
|
+
|---------|--------|-------------|------|---------|--------------|
|
|
39
|
+
| [`pendulum_synthetic`](datasets/pendulum_synthetic/) | Simple pendulum | 1,001 | 100 Hz | 0.010 rad | m=1.0, l=0.5, g=9.81 |
|
|
40
|
+
| [`double_pendulum_synthetic`](datasets/double_pendulum_synthetic/) | Double pendulum (near-periodic) | 501 | 100 Hz | 0.005 rad | m=1.0, l=1.0, g=9.81 |
|
|
41
|
+
| [`coupled_oscillators_synthetic`](datasets/coupled_oscillators_synthetic/) | Coupled pendulums (3 beat periods) | 2,001 | 100 Hz | 0.005 rad | m=1.0, l=1.0, k=0.5 |
|
|
42
|
+
|
|
43
|
+
All datasets include clean trajectories, Gaussian-noisy observations, HDF5 with embedded metadata, and paired estimation/validation scripts.
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## Quick Start (pip install)
|
|
48
|
+
|
|
49
|
+
```python
|
|
50
|
+
import mechanicsdsl_datasets as mds
|
|
51
|
+
|
|
52
|
+
# Load a dataset
|
|
53
|
+
dataset = mds.load("pendulum_synthetic")
|
|
54
|
+
print(dataset.ground_truth) # {'m': 1.0, 'l': 0.5, 'g': 9.81}
|
|
55
|
+
print(dataset.t.shape) # (1001,)
|
|
56
|
+
print(dataset.theta_noisy[:5]) # noisy observations
|
|
57
|
+
|
|
58
|
+
# Run built-in validation
|
|
59
|
+
dataset.validate() # confirms forward simulation matches clean data
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## Quick Start (raw files)
|
|
65
|
+
|
|
66
|
+
```python
|
|
67
|
+
import pandas as pd
|
|
68
|
+
import json
|
|
69
|
+
|
|
70
|
+
data = pd.read_csv("datasets/pendulum_synthetic/data.csv")
|
|
71
|
+
meta = json.load(open("datasets/pendulum_synthetic/metadata.json"))
|
|
72
|
+
|
|
73
|
+
t = data["t_s"].values
|
|
74
|
+
theta_obs = data["theta_rad_noisy"].values
|
|
75
|
+
truth = meta["ground_truth"] # {'m': 1.0, 'l': 0.5, 'g': 9.81}
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## Repository Structure
|
|
81
|
+
|
|
82
|
+
```
|
|
83
|
+
mechanicsdsl-datasets/
|
|
84
|
+
├── datasets/
|
|
85
|
+
│ ├── pendulum_synthetic/
|
|
86
|
+
│ │ ├── README.md, data.csv, data.hdf5, metadata.json
|
|
87
|
+
│ │ └── examples/ estimate_scipy.py, validate_forward.py
|
|
88
|
+
│ ├── double_pendulum_synthetic/
|
|
89
|
+
│ │ ├── README.md, data.csv, data.hdf5, metadata.json
|
|
90
|
+
│ │ └── examples/ estimate_scipy.py, validate_forward.py
|
|
91
|
+
│ └── coupled_oscillators_synthetic/
|
|
92
|
+
│ ├── README.md, data.csv, data.hdf5, metadata.json
|
|
93
|
+
│ └── examples/ estimate_normal_modes.py, validate_forward.py
|
|
94
|
+
├── docs/
|
|
95
|
+
│ ├── schema.md # metadata.json schema reference
|
|
96
|
+
│ └── estimation_guide.md # least-squares, MCMC, FFT methods
|
|
97
|
+
├── scripts/
|
|
98
|
+
│ ├── generate_all.py # regenerate all synthetic datasets
|
|
99
|
+
│ └── validate_all.py # run all validate_forward.py scripts
|
|
100
|
+
└── tests/
|
|
101
|
+
└── test_datasets.py # schema, row count, NaN, noise std checks
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
## Estimation Examples
|
|
107
|
+
|
|
108
|
+
Each dataset ships with working estimation scripts:
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
# Estimate pendulum length from noisy observations
|
|
112
|
+
cd datasets/pendulum_synthetic
|
|
113
|
+
python examples/estimate_scipy.py
|
|
114
|
+
# Estimated: l = 0.4998 m (ground truth: 0.5000 m)
|
|
115
|
+
|
|
116
|
+
# Identify normal mode frequencies via FFT
|
|
117
|
+
cd datasets/coupled_oscillators_synthetic
|
|
118
|
+
python examples/estimate_normal_modes.py
|
|
119
|
+
# omega1 = 3.1321 rad/s, omega2 = 3.2636 rad/s, k = 0.500 N/m
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
## Testing
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
pip install pytest h5py numpy scipy pandas
|
|
128
|
+
pytest tests/ -v
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
## Contributing
|
|
134
|
+
|
|
135
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md). Experimental datasets with real sensor data especially welcome.
|
|
136
|
+
|
|
137
|
+
## Citation
|
|
138
|
+
|
|
139
|
+
```bibtex
|
|
140
|
+
@dataset{mechanicsdsl_datasets2026,
|
|
141
|
+
author = {Parsons, Noah},
|
|
142
|
+
title = {{MechanicsDSL Physics Datasets}},
|
|
143
|
+
year = {2026},
|
|
144
|
+
doi = {10.5281/zenodo.17771040},
|
|
145
|
+
url = {https://github.com/MechanicsDSL/mechanicsdsl-datasets}
|
|
146
|
+
}
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
## License
|
|
150
|
+
|
|
151
|
+
MIT License — see [LICENSE](LICENSE).
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# coupled_oscillators_synthetic
|
|
2
|
+
|
|
3
|
+
Synthetic coupled pendulum dataset covering 3 beat periods. Designed for spring constant estimation and normal mode frequency identification.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Physical System
|
|
8
|
+
|
|
9
|
+
Two identical pendulums of mass $m$, length $l$ coupled by a spring of stiffness $k$:
|
|
10
|
+
|
|
11
|
+
$$L = \frac{1}{2}ml^2(\dot{\theta}_1^2 + \dot{\theta}_2^2) + mgl(\cos\theta_1 + \cos\theta_2) - \frac{1}{2}kl^2(\theta_1-\theta_2)^2$$
|
|
12
|
+
|
|
13
|
+
**DSL specification:**
|
|
14
|
+
```
|
|
15
|
+
\system{coupled_pendulums}
|
|
16
|
+
\parameter{m}{1.0}{kg}
|
|
17
|
+
\parameter{l}{1.0}{m}
|
|
18
|
+
\parameter{k}{0.5}{N/m}
|
|
19
|
+
\lagrangian{
|
|
20
|
+
0.5*m*l^2*(\dot{theta1}^2 + \dot{theta2}^2)
|
|
21
|
+
+ m*g*l*(cos(theta1) + cos(theta2))
|
|
22
|
+
- 0.5*k*l^2*(theta1-theta2)^2
|
|
23
|
+
}
|
|
24
|
+
\initial{theta1: 0.3, theta2: 0.0}
|
|
25
|
+
\target{python_numpy}
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## Ground Truth
|
|
31
|
+
|
|
32
|
+
| Parameter | Value | Unit |
|
|
33
|
+
|-----------|-------|------|
|
|
34
|
+
| m | 1.0 | kg |
|
|
35
|
+
| l | 1.0 | m |
|
|
36
|
+
| k | 0.5 | N/m |
|
|
37
|
+
| g | 9.81 | m/s² |
|
|
38
|
+
| ω₁ | 3.1321 | rad/s |
|
|
39
|
+
| ω₂ | 3.2636 | rad/s |
|
|
40
|
+
| T_beat | ~48.0 | s |
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## Noise Model
|
|
45
|
+
|
|
46
|
+
Gaussian noise applied to θ₁ and θ₂: **σ = 0.005 rad**, seed = 456
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## Files
|
|
51
|
+
|
|
52
|
+
| File | Description |
|
|
53
|
+
|------|-------------|
|
|
54
|
+
| `data.csv` | Time series: t, θ₁_clean, θ₂_clean, θ₁_noisy, θ₂_noisy |
|
|
55
|
+
| `data.hdf5` | Full-precision HDF5 with all attributes including ground-truth k |
|
|
56
|
+
| `metadata.json` | Machine-readable description with normal mode frequencies |
|
|
57
|
+
| `examples/estimate_normal_modes.py` | FFT-based normal mode frequency identification |
|
|
58
|
+
| `examples/validate_forward.py` | Forward simulation validation |
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## Citation
|
|
63
|
+
|
|
64
|
+
```bibtex
|
|
65
|
+
@software{mechanicsdsl2026,
|
|
66
|
+
author = {Parsons, Noah},
|
|
67
|
+
title = {{MechanicsDSL}},
|
|
68
|
+
year = {2026},
|
|
69
|
+
doi = {10.5281/zenodo.17771040}
|
|
70
|
+
}
|
|
71
|
+
```
|