Update README.md
Browse files
README.md
CHANGED
|
@@ -701,21 +701,28 @@ visualization.plot_boundary(boundary)
|
|
| 701 |
```
|
| 702 |

|
| 703 |

|
| 704 |
-
|
| 705 |
Stream and instantiate the VMEC ideal MHD equilibria:
|
| 706 |
```python
|
| 707 |
import datasets
|
| 708 |
-
from
|
|
|
|
| 709 |
|
| 710 |
ds = datasets.load_dataset("proxima-fusion/constellaration", "vmecpp_ideal_mhd_equilibria", streaming=True)["train"]
|
| 711 |
|
| 712 |
for batch in ds.filter(lambda row: row["vmecpp_wout_json"] is not None).iter(batch_size=1):
|
| 713 |
-
vmecpp_wout_json = batch["vmecpp_wout_json"][0]
|
| 714 |
-
vmecpp_wout = vmec_utils.VmecppWOut.model_validate_json(vmecpp_wout_json)
|
| 715 |
break
|
| 716 |
|
| 717 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 718 |
```
|
|
|
|
| 719 |
|
| 720 |
## Dataset Structure
|
| 721 |
|
|
|
|
| 701 |
```
|
| 702 |

|
| 703 |

|
| 704 |
+
|
| 705 |
Stream and instantiate the VMEC ideal MHD equilibria:
|
| 706 |
```python
|
| 707 |
import datasets
|
| 708 |
+
from constellaration.mhd import vmec_utils
|
| 709 |
+
from constellaration.utils import visualization
|
| 710 |
|
| 711 |
ds = datasets.load_dataset("proxima-fusion/constellaration", "vmecpp_ideal_mhd_equilibria", streaming=True)["train"]
|
| 712 |
|
| 713 |
for batch in ds.filter(lambda row: row["vmecpp_wout_json"] is not None).iter(batch_size=1):
|
|
|
|
|
|
|
| 714 |
break
|
| 715 |
|
| 716 |
+
vmecpp_wout_json = batch["vmecpp_wout_json"][0]
|
| 717 |
+
vmecpp_wout = vmec_utils.VmecppWOut.model_validate_json(vmecpp_wout_json)
|
| 718 |
+
|
| 719 |
+
plasma_config_id = batch["plasma_config_id"][0]
|
| 720 |
+
boundary_json = full_json_df.loc[plasma_config_id]["boundary.surface"]
|
| 721 |
+
boundary = surface_rz_fourier.SurfaceRZFourier.model_validate_json(boundary_json)
|
| 722 |
+
|
| 723 |
+
visualization.plot_flux_surfaces(vmecpp_wout, boundary)
|
| 724 |
```
|
| 725 |
+

|
| 726 |
|
| 727 |
## Dataset Structure
|
| 728 |
|