constellaration 0.1.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.
- constellaration-0.1.2/.gitignore +174 -0
- constellaration-0.1.2/LICENSE +21 -0
- constellaration-0.1.2/PKG-INFO +102 -0
- constellaration-0.1.2/README.md +68 -0
- constellaration-0.1.2/constellaration/__about__.py +4 -0
- constellaration-0.1.2/constellaration/__init__.py +3 -0
- constellaration-0.1.2/constellaration/boozer/__init__.py +0 -0
- constellaration-0.1.2/constellaration/boozer/boozer.py +344 -0
- constellaration-0.1.2/constellaration/forward_model.py +235 -0
- constellaration-0.1.2/constellaration/geometry/__init__.py +0 -0
- constellaration-0.1.2/constellaration/geometry/radial_profile.py +154 -0
- constellaration-0.1.2/constellaration/geometry/surface_rz_fourier.py +540 -0
- constellaration-0.1.2/constellaration/geometry/surface_utils.py +81 -0
- constellaration-0.1.2/constellaration/initial_guess.py +132 -0
- constellaration-0.1.2/constellaration/mhd/__init__.py +0 -0
- constellaration-0.1.2/constellaration/mhd/flux_power_series.py +56 -0
- constellaration-0.1.2/constellaration/mhd/geometry_utils.py +325 -0
- constellaration-0.1.2/constellaration/mhd/ideal_mhd_parameters.py +53 -0
- constellaration-0.1.2/constellaration/mhd/magnetics_utils.py +405 -0
- constellaration-0.1.2/constellaration/mhd/near_axis_configuration.py +326 -0
- constellaration-0.1.2/constellaration/mhd/turbulent_transport.py +87 -0
- constellaration-0.1.2/constellaration/mhd/vmec_settings.py +339 -0
- constellaration-0.1.2/constellaration/mhd/vmec_utils.py +415 -0
- constellaration-0.1.2/constellaration/omnigeneity/__init__.py +0 -0
- constellaration-0.1.2/constellaration/omnigeneity/qi.py +302 -0
- constellaration-0.1.2/constellaration/problems.py +332 -0
- constellaration-0.1.2/constellaration/utils/__init__.py +0 -0
- constellaration-0.1.2/constellaration/utils/file_exporter.py +39 -0
- constellaration-0.1.2/constellaration/utils/visualization.py +203 -0
- constellaration-0.1.2/constellaration/utils/visualization_utils.py +86 -0
- constellaration-0.1.2/pyproject.toml +106 -0
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
share/python-wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
MANIFEST
|
|
28
|
+
|
|
29
|
+
# PyInstaller
|
|
30
|
+
# Usually these files are written by a python script from a template
|
|
31
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
32
|
+
*.manifest
|
|
33
|
+
*.spec
|
|
34
|
+
|
|
35
|
+
# Installer logs
|
|
36
|
+
pip-log.txt
|
|
37
|
+
pip-delete-this-directory.txt
|
|
38
|
+
|
|
39
|
+
# Unit test / coverage reports
|
|
40
|
+
htmlcov/
|
|
41
|
+
.tox/
|
|
42
|
+
.nox/
|
|
43
|
+
.coverage
|
|
44
|
+
.coverage.*
|
|
45
|
+
.cache
|
|
46
|
+
nosetests.xml
|
|
47
|
+
coverage.xml
|
|
48
|
+
*.cover
|
|
49
|
+
*.py,cover
|
|
50
|
+
.hypothesis/
|
|
51
|
+
.pytest_cache/
|
|
52
|
+
cover/
|
|
53
|
+
|
|
54
|
+
# Translations
|
|
55
|
+
*.mo
|
|
56
|
+
*.pot
|
|
57
|
+
|
|
58
|
+
# Django stuff:
|
|
59
|
+
*.log
|
|
60
|
+
local_settings.py
|
|
61
|
+
db.sqlite3
|
|
62
|
+
db.sqlite3-journal
|
|
63
|
+
|
|
64
|
+
# Flask stuff:
|
|
65
|
+
instance/
|
|
66
|
+
.webassets-cache
|
|
67
|
+
|
|
68
|
+
# Scrapy stuff:
|
|
69
|
+
.scrapy
|
|
70
|
+
|
|
71
|
+
# Sphinx documentation
|
|
72
|
+
docs/_build/
|
|
73
|
+
|
|
74
|
+
# PyBuilder
|
|
75
|
+
.pybuilder/
|
|
76
|
+
target/
|
|
77
|
+
|
|
78
|
+
# Jupyter Notebook
|
|
79
|
+
.ipynb_checkpoints
|
|
80
|
+
|
|
81
|
+
# IPython
|
|
82
|
+
profile_default/
|
|
83
|
+
ipython_config.py
|
|
84
|
+
|
|
85
|
+
# pyenv
|
|
86
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
87
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
88
|
+
# .python-version
|
|
89
|
+
|
|
90
|
+
# pipenv
|
|
91
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
92
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
93
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
94
|
+
# install all needed dependencies.
|
|
95
|
+
#Pipfile.lock
|
|
96
|
+
|
|
97
|
+
# UV
|
|
98
|
+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
|
99
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
100
|
+
# commonly ignored for libraries.
|
|
101
|
+
#uv.lock
|
|
102
|
+
|
|
103
|
+
# poetry
|
|
104
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
105
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
106
|
+
# commonly ignored for libraries.
|
|
107
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
108
|
+
#poetry.lock
|
|
109
|
+
|
|
110
|
+
# pdm
|
|
111
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
112
|
+
#pdm.lock
|
|
113
|
+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
|
|
114
|
+
# in version control.
|
|
115
|
+
# https://pdm.fming.dev/latest/usage/project/#working-with-version-control
|
|
116
|
+
.pdm.toml
|
|
117
|
+
.pdm-python
|
|
118
|
+
.pdm-build/
|
|
119
|
+
|
|
120
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
121
|
+
__pypackages__/
|
|
122
|
+
|
|
123
|
+
# Celery stuff
|
|
124
|
+
celerybeat-schedule
|
|
125
|
+
celerybeat.pid
|
|
126
|
+
|
|
127
|
+
# SageMath parsed files
|
|
128
|
+
*.sage.py
|
|
129
|
+
|
|
130
|
+
# Environments
|
|
131
|
+
.env
|
|
132
|
+
.venv
|
|
133
|
+
env/
|
|
134
|
+
venv/
|
|
135
|
+
ENV/
|
|
136
|
+
env.bak/
|
|
137
|
+
venv.bak/
|
|
138
|
+
|
|
139
|
+
# Spyder project settings
|
|
140
|
+
.spyderproject
|
|
141
|
+
.spyproject
|
|
142
|
+
|
|
143
|
+
# Rope project settings
|
|
144
|
+
.ropeproject
|
|
145
|
+
|
|
146
|
+
# mkdocs documentation
|
|
147
|
+
/site
|
|
148
|
+
|
|
149
|
+
# mypy
|
|
150
|
+
.mypy_cache/
|
|
151
|
+
.dmypy.json
|
|
152
|
+
dmypy.json
|
|
153
|
+
|
|
154
|
+
# Pyre type checker
|
|
155
|
+
.pyre/
|
|
156
|
+
|
|
157
|
+
# pytype static type analyzer
|
|
158
|
+
.pytype/
|
|
159
|
+
|
|
160
|
+
# Cython debug symbols
|
|
161
|
+
cython_debug/
|
|
162
|
+
|
|
163
|
+
# PyCharm
|
|
164
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
165
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
166
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
167
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
168
|
+
#.idea/
|
|
169
|
+
|
|
170
|
+
# Ruff stuff:
|
|
171
|
+
.ruff_cache/
|
|
172
|
+
|
|
173
|
+
# PyPI configuration file
|
|
174
|
+
.pypirc
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025-present Proxima Fusion Gmbh <info@proximafusion.com>
|
|
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,102 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: constellaration
|
|
3
|
+
Version: 0.1.2
|
|
4
|
+
Summary: Code for analyzing and evaluating stellarator plasma shapes
|
|
5
|
+
Project-URL: Documentation, https://github.com/proximafusion/constellaration#readme
|
|
6
|
+
Project-URL: Issues, https://github.com/proximafusion/constellaration/issues
|
|
7
|
+
Project-URL: Source, https://github.com/proximafusion/constellaration
|
|
8
|
+
Author-email: Maria Pascu <mariap@proximafusion.com>
|
|
9
|
+
License-Expression: MIT
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Programming Language :: Python
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
18
|
+
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
19
|
+
Requires-Python: >=3.9
|
|
20
|
+
Requires-Dist: booz-xform==0.0.8
|
|
21
|
+
Requires-Dist: ipython
|
|
22
|
+
Requires-Dist: jaxtyping
|
|
23
|
+
Requires-Dist: matplotlib==3.9.2
|
|
24
|
+
Requires-Dist: nbformat
|
|
25
|
+
Requires-Dist: numpy==2.1.3
|
|
26
|
+
Requires-Dist: plotly
|
|
27
|
+
Requires-Dist: pydantic
|
|
28
|
+
Requires-Dist: pymoo==0.6.1.3
|
|
29
|
+
Requires-Dist: qicna==0.3.4
|
|
30
|
+
Requires-Dist: scipy
|
|
31
|
+
Requires-Dist: simsopt==1.8.1
|
|
32
|
+
Requires-Dist: vmecpp==0.4.2
|
|
33
|
+
Description-Content-Type: text/markdown
|
|
34
|
+
|
|
35
|
+
<picture>
|
|
36
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/user-attachments/assets/978b76bc-cd9b-4af8-b1f3-18efde7c079f">
|
|
37
|
+
<source media="(prefers-color-scheme: light)" srcset="https://github.com/user-attachments/assets/ec4e391a-9044-44ae-93f0-9dd8bed70001">
|
|
38
|
+
<img alt="A dark Proxima logo in light color mode and a light one in dark color mode." src="https://github.com/user-attachments/assets/ec4e391a-9044-44ae-93f0-9dd8bed70001" width=400px>
|
|
39
|
+
</picture>
|
|
40
|
+
|
|
41
|
+
# ConStellaration: A dataset of QI-like stellarator plasma boundaries and optimization benchmarks
|
|
42
|
+
|
|
43
|
+
ConStellaration is a dataset of diverse QI-like stellarator plasma boundary shapes, paired with their ideal-MHD equilibria and performance metrics.
|
|
44
|
+
The dataset is available on [Hugging Face](https://huggingface.co/datasets/proxima-fusion/constellaration).
|
|
45
|
+
The repository contains a suite of tools and notebooks for exploring the dataset, including a forward model for plasma simulation and scoring functions for optimization evaluation.
|
|
46
|
+
|
|
47
|
+
## Installation
|
|
48
|
+
|
|
49
|
+
The following instructions have been tested on **Ubuntu 22.04**. Other platforms may require additional steps and have not been validated.
|
|
50
|
+
|
|
51
|
+
The system dependency `libnetcdf-dev` is required for running the forward model. On Ubuntu, please ensure it is installed before proceeding, by running:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
sudo apt-get install libnetcdf-dev
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
1. Clone the repository:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
git clone https://github.com/proximafusion/constellaration.git
|
|
61
|
+
cd constellaration
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
2. Install the required Python dependencies:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
pip install .
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### Install directly from GitHub
|
|
71
|
+
|
|
72
|
+
To install the package directly from the GitHub repository without cloning, ensure the system dependency is installed first, then run:
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
pip install git+https://github.com/proximafusion/constellaration.git
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### Running with Docker
|
|
79
|
+
|
|
80
|
+
If you prefer not to install system dependencies, you can use the provided Dockerfile to build a Docker image and run your scripts in a container.
|
|
81
|
+
|
|
82
|
+
1. Build the Docker image:
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
docker build -t constellaration .
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
2. Run your scripts by mounting a volume to the container:
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
docker run --rm -v $(pwd):/workspace constellaration python relative/path/to/your_script.py
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Replace `your_script.py` with the path to your script. The `$(pwd)` command mounts the current directory to `/workspace` inside the container.
|
|
95
|
+
|
|
96
|
+
## Explanation Notebook
|
|
97
|
+
|
|
98
|
+
You can explore the functionalities of the repo through the [Boundary Explorer Notebook](./notebooks/boundary_explorer.ipynb).
|
|
99
|
+
|
|
100
|
+
## Citation
|
|
101
|
+
|
|
102
|
+
If you find this work useful, please cite us:
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
<picture>
|
|
2
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/user-attachments/assets/978b76bc-cd9b-4af8-b1f3-18efde7c079f">
|
|
3
|
+
<source media="(prefers-color-scheme: light)" srcset="https://github.com/user-attachments/assets/ec4e391a-9044-44ae-93f0-9dd8bed70001">
|
|
4
|
+
<img alt="A dark Proxima logo in light color mode and a light one in dark color mode." src="https://github.com/user-attachments/assets/ec4e391a-9044-44ae-93f0-9dd8bed70001" width=400px>
|
|
5
|
+
</picture>
|
|
6
|
+
|
|
7
|
+
# ConStellaration: A dataset of QI-like stellarator plasma boundaries and optimization benchmarks
|
|
8
|
+
|
|
9
|
+
ConStellaration is a dataset of diverse QI-like stellarator plasma boundary shapes, paired with their ideal-MHD equilibria and performance metrics.
|
|
10
|
+
The dataset is available on [Hugging Face](https://huggingface.co/datasets/proxima-fusion/constellaration).
|
|
11
|
+
The repository contains a suite of tools and notebooks for exploring the dataset, including a forward model for plasma simulation and scoring functions for optimization evaluation.
|
|
12
|
+
|
|
13
|
+
## Installation
|
|
14
|
+
|
|
15
|
+
The following instructions have been tested on **Ubuntu 22.04**. Other platforms may require additional steps and have not been validated.
|
|
16
|
+
|
|
17
|
+
The system dependency `libnetcdf-dev` is required for running the forward model. On Ubuntu, please ensure it is installed before proceeding, by running:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
sudo apt-get install libnetcdf-dev
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
1. Clone the repository:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
git clone https://github.com/proximafusion/constellaration.git
|
|
27
|
+
cd constellaration
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
2. Install the required Python dependencies:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
pip install .
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### Install directly from GitHub
|
|
37
|
+
|
|
38
|
+
To install the package directly from the GitHub repository without cloning, ensure the system dependency is installed first, then run:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
pip install git+https://github.com/proximafusion/constellaration.git
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### Running with Docker
|
|
45
|
+
|
|
46
|
+
If you prefer not to install system dependencies, you can use the provided Dockerfile to build a Docker image and run your scripts in a container.
|
|
47
|
+
|
|
48
|
+
1. Build the Docker image:
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
docker build -t constellaration .
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
2. Run your scripts by mounting a volume to the container:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
docker run --rm -v $(pwd):/workspace constellaration python relative/path/to/your_script.py
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Replace `your_script.py` with the path to your script. The `$(pwd)` command mounts the current directory to `/workspace` inside the container.
|
|
61
|
+
|
|
62
|
+
## Explanation Notebook
|
|
63
|
+
|
|
64
|
+
You can explore the functionalities of the repo through the [Boundary Explorer Notebook](./notebooks/boundary_explorer.ipynb).
|
|
65
|
+
|
|
66
|
+
## Citation
|
|
67
|
+
|
|
68
|
+
If you find this work useful, please cite us:
|
|
File without changes
|