Skip to main content

Includes functions to upload DESC and VMEC data to the stellarator database.

Project description

Stellarator-Database

Includes the functions required to upload DESC or VMEC results to the stellarator database. You can access the database here.

This is still a work in progress.

Install using pip

pip install stelladb

Install using GIT

Clone GIT repo

git clone https://github.com/PlasmaControl/Stellarator-Database.git

Once you get the files,

cd Stellarator-Database

Building conda environment

conda create --name db 'python>=3.9, <=3.12'
conda activate db
pip install -r requirements.txt

Sample usage

from desc.examples import get
from stelladb import save_to_db_desc

eq = get("HELIOTRON")

# if you are using DESC, you can directly upload Equilibrium or 
# EquilibriumFamily objects. For EquilibriumFamily, only the last
# Equilibrium will be uploaded.
save_to_db_desc(eq, config_name="test-HELIOTRON", user="username")

# if you have an outfile, supply the name of it without extension
# For DESC example, we need to save it first to get the .h5 file
eq.save("test_output_HELIOTRON.h5")
save_to_db_desc("test_output_HELIOTRON", config_name="another-HELIOTRON", user="username")

# use copy parameter, if you want the local copy of the files that are uploaded
# default value is False
save_to_db_desc(eq, config_name="HELIOTRON-test-name", user="username", copy=True)

You can give config_name as you wish. However, if there is an existing configuration with same parameters in the database, you will get following error,

Configuration data already exists in the database with name: HELIOTRON.

Then, you should change your config_name to match that and try again.

VMEC Utilities are not tested yet!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

stelladb-0.2.7.tar.gz (12.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

stelladb-0.2.7-py3-none-any.whl (14.1 kB view details)

Uploaded Python 3

File details

Details for the file stelladb-0.2.7.tar.gz.

File metadata

  • Download URL: stelladb-0.2.7.tar.gz
  • Upload date:
  • Size: 12.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.19

File hashes

Hashes for stelladb-0.2.7.tar.gz
Algorithm Hash digest
SHA256 c75cd29d7e912b4bf5631cd4768810f67b2ef1a2f0bebdb2002c9eb3cfea0357
MD5 0eafa747a0c165add8627104659dbe11
BLAKE2b-256 a7c51940dc01417a220ae1b16a9a3f84d13d67c772434e1a37ce19347c5a873f

See more details on using hashes here.

File details

Details for the file stelladb-0.2.7-py3-none-any.whl.

File metadata

  • Download URL: stelladb-0.2.7-py3-none-any.whl
  • Upload date:
  • Size: 14.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.19

File hashes

Hashes for stelladb-0.2.7-py3-none-any.whl
Algorithm Hash digest
SHA256 49a60e9b05e80f199bce92691493d9cd92887f3bfaef5ee0ae2a6a17a248496d
MD5 b1a1e749582d02779fae6ce4bfb60fc3
BLAKE2b-256 925951dc7fb652cd724919cccb8ea550da63a760bd670d8715de8b8c33b0e3a1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page