This public database has been set up by Florian Hindenlang in collaboration with the author of the original data, Eduardo Rodriguez, both from Max-Planck-Institute for Plasma Physics, Germany.
The original data is presented in this publication, and is available as a zip file on zenodo(DOI:10.5281/zenodo.18836863) named Paper_scripts.zip. Only JSON files in the data/N* subdirectories have been parsed.
Each of the original JSON files from zenodo contain a list of configurations, which was cast to individual JSON files and added to this public database, allowing easy access to a single configuration.
You can browse the file tree of the database here: data
wget https://s3.nexus.mpcdf.mpg.de/public-pyqic-database/data/NZ/sweepXXX/NZ_XXX_YYYY.json
Parameters:
NZ – Field period number (integer: Z=1,2, ..., 6)XXX – Sweep ID (format: 03d)YYYY – list index (format: 04d), list is within the original JSON file on zenodo, 0-indexing Each configuration therefore has a unique identifier NZ_XXX_YYYY, which is used as name for the JSON file and should be used for reference.
import requests
import shutil
def download_from_database(nfp, sweep_id, list_id):
#name of downloaded file:
filename = f"N{nfp}_{sweep_id:03d}_{list_id:04d}.json"
#adress for download
url = f"https://s3.nexus.mpcdf.mpg.de/public-pyqic-database/data/N{nfp}/sweep{sweep_id:03d}/{filename}"
with requests.get(url, stream=True) as response, open(filename, "wb") as file:
if not response.ok:
raise RuntimeError(
f"Failed to download configuration nfp={nfp}, sweep_id={sweep_id}, list_id={list_id} from url={url}: {response.status_code} {response.reason}"
)
shutil.copyfileobj(response.raw, file)
print(f'file "{filename}" sucessfully downloaded from {url}')
The data of a single configuration is supposed to be used to initialize a stellarator object in the pyQIC code.
A compatible version of pyQIC is available on github, within the branch change_structure.
from qic import Qic
config_name = 'N2_427_0169'
# Load config from online database and initialize the object
stel_online = Qic.from_db(config_name, online = True)