alexbauer-pf commited on
Commit
b5dcc57
·
verified ·
1 Parent(s): b6b71f4

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +10 -9
README.md CHANGED
@@ -764,23 +764,24 @@ Boundary | Cross-sections
764
 
765
  Stream and instantiate the VMEC ideal MHD equilibria:
766
  ```python
767
- import datasets
768
  from constellaration.mhd import vmec_utils
769
- from constellaration.geometry import surface_rz_fourier
770
 
771
- vmec_wout_ds = datasets.load_dataset("proxima-fusion/constellaration", "vmecpp_ideal_mhd_equilibria", streaming=True)["train"]
772
- vmec_wout_ds = vmec_wout_ds.filter(lambda row: row["vmecpp_wout_json"] is not None)
 
 
 
 
773
 
774
- row = next(vmec_wout_ds.__iter__())
775
 
776
- vmecpp_wout_json = row["vmecpp_wout_json"]
777
  vmecpp_wout = vmec_utils.VmecppWOut.model_validate_json(vmecpp_wout_json)
 
778
 
779
  # Fetch corresponding boundary
780
- full_json_ds = datasets.load_dataset("proxima-fusion/constellaration", "full_json")["train"]
781
- full_json_df = full_json_ds.to_pandas().set_index("plasma_config_id")
782
  plasma_config_id = row["plasma_config_id"]
783
- boundary_json = full_json_df.loc[plasma_config_id]["boundary.json"]
784
  boundary = surface_rz_fourier.SurfaceRZFourier.model_validate_json(boundary_json)
785
  ```
786
  Plot flux surfaces:
 
764
 
765
  Stream and instantiate the VMEC ideal MHD equilibria:
766
  ```python
 
767
  from constellaration.mhd import vmec_utils
 
768
 
769
+ wout_ds = datasets.load_dataset(
770
+ "proxima-fusion/constellaration",
771
+ "vmecpp_wout",
772
+ split="train",
773
+ streaming=True,
774
+ )
775
 
776
+ row = next(wout_ds.__iter__())
777
 
778
+ vmecpp_wout_json = row["json"]
779
  vmecpp_wout = vmec_utils.VmecppWOut.model_validate_json(vmecpp_wout_json)
780
+ ```
781
 
782
  # Fetch corresponding boundary
 
 
783
  plasma_config_id = row["plasma_config_id"]
784
+ boundary_json = pandas_ds.loc[plasma_config_id]["boundary.json"]
785
  boundary = surface_rz_fourier.SurfaceRZFourier.model_validate_json(boundary_json)
786
  ```
787
  Plot flux surfaces: