idstools.eqdsk2ids¶
Module Contents¶
- class idstools.eqdsk2ids.GEQDSK(fpath, ipsign_out, b0sign_out, cocos_in)[source]¶
GEQDSK module for IMAS
[1] L.L. Lao, “G EQDSK FORMAT”, https://w3.pppl.gov/ntcc/TORAY/G_EQDSK.pdf [2] O. Sauter and S.Yu. Medvedev, “Tokamak Coordinate Conventions : COCOS”, Comput. Physics Commun. 184 (2013) 293
Read GEQDSK file and set COCOS transformation coefficients
- Parameters:¶
- coef¶
- data¶
- fpath¶
-
idstools.eqdsk2ids.eqdsk2ids(gfile: str | list[str] | None =
None, afile: str | None =None, ipsign: int =0, b0sign: int =0, cocos_in: int | None =None) imaspy.ids.equilibrium.equilibrium[source]¶ Convert one or more GEQDSK files into a merged IMAS equilibrium IDS.
- Parameters:¶
- gfile: str | list[str] | None =
None¶ Path(s) to GEQDSK file(s). Can be: - Single file path - Directory path (all files processed) - Space-separated string of multiple files/patterns - List of file paths - Glob pattern(s) with wildcards (
*,?,[])- afile: str | None =
None¶ Path to AEQDSK file (currently not used).
- ipsign: int =
0¶ Desired sign of plasma current (Ip) in the output.
- b0sign: int =
0¶ Desired sign of toroidal field (B0) in the output.
- cocos_in: int | None =
None¶ Input COCOS convention to coerce. None means autodetect.
- gfile: str | list[str] | None =
- Returns:¶
eq – Combined equilibrium IDS from one or more GEQDSK files.
- Return type:¶
imas.ids.equilibrium.equilibrium
-
idstools.eqdsk2ids.geqdsk2ids(fpath, ipsign=
0, b0sign=0, cocos_in=None)[source]¶ Functional Interface of GEQDSK Converter (geqdsk2ids)
-
idstools.eqdsk2ids.merge_equilibrium(eq1, eq2, sort_by_time=
True)[source]¶ Concatenate two IMAS IDS/equilibrium objects (eq1 appended after eq2), with an option to sort the resulting time slices by time.
- idstools.eqdsk2ids.logger¶