Skip to content

NcCurrent

dexter.NcCurrent(path: str, interp_type: Interp1DType)

Numerical plasma current reconstructed from a NetCDF file.

Related quantities are computed by interpolating over the data arrays.

Parameters:

  • path (str) –

    The path to the NetCDF file.

  • interp_type (Interp1DType) –

    The 1D Interpolation type.

Example
NcCurrent creation
>>> current = dex.NcCurrent(path, "Steffen")

Methods:

Attributes:

dexter.NcCurrent.psi_state: FluxState property

The state of the toroidal flux coordinate.

dexter.NcCurrent.psip_state: FluxState property

The state of the poloidal flux coordinate.

dexter.NcCurrent.path: str property

The path of the netCDF file.

dexter.NcCurrent.netcdf_version: NetCDFVersion property

The netCDF convention version (SemVer).

dexter.NcCurrent.equilibrium_type: EquilibriumType property

The object's equilibrium's type.

dexter.NcCurrent.interp_type: str property

The Interpolation type.

dexter.NcCurrent.psi_last: float property

The value of the last closed toroidal flux surface \(\psi_{LCFS}\) in Normalized Units.

dexter.NcCurrent.psip_last: float property

The value of the last closed poloidal flux surface \(\psi_{p,LCFS}\) in Normalized Units.

dexter.NcCurrent.psi_array: Array1 property

The NetCDF \(\psi\) data.

dexter.NcCurrent.psip_array: Array1 property

The NetCDF \(\psi_p\) data.

dexter.NcCurrent.g_array: Array1 property

The NetCDF \(g\) data.

dexter.NcCurrent.i_array: Array1 property

The NetCDF \(I\) data.

dexter.NcCurrent.g_of_psi(psi: ArrayLike) -> NDArray

The \(g(\psi)\) value in Normalized Units.

Parameters:

  • psi (ArrayLike) –

    The toroidal flux \(\psi\) in Normalized Units.

dexter.NcCurrent.g_of_psip(psip: ArrayLike) -> NDArray

The \(g(\psi_p)\) value in Normalized Units.

Parameters:

  • psip (ArrayLike) –

    The poloidal flux \(\psi_p\) in Normalized Units.

dexter.NcCurrent.i_of_psi(psi: ArrayLike) -> NDArray

The \(I(\psi)\) value in Normalized Units.

Parameters:

  • psi (ArrayLike) –

    The toroidal flux \(\psi\) in Normalized Units.

dexter.NcCurrent.i_of_psip(psip: ArrayLike) -> NDArray

The \(I(\psi_p)\) value in Normalized Units.

Parameters:

  • psip (ArrayLike) –

    The poloidal flux \(\psi_p\) in Normalized Units.

dexter.NcCurrent.dg_dpsi(psi: ArrayLike) -> NDArray

The \(dg(\psi)/d\psi\) value in Normalized Units.

Parameters:

  • psi (ArrayLike) –

    The toroidal flux \(\psi\) in Normalized Units.

dexter.NcCurrent.dg_dpsip(psip: ArrayLike) -> NDArray

The \(dg(\psi_p)/d\psi_p\) value in Normalized Units.

Parameters:

  • psip (ArrayLike) –

    The poloidal flux \(\psi\) in Normalized Units.

dexter.NcCurrent.di_dpsi(psi: ArrayLike) -> NDArray

The \(dg(\psi)/d\psi\) value in Normalized Units.

Parameters:

  • psi (ArrayLike) –

    The toroidal flux \(\psi\) in Normalized Units.

dexter.NcCurrent.di_dpsip(psip: ArrayLike) -> NDArray

The \(dg(\psi_p)/d\psi_p\) value in Normalized Units.

Parameters:

  • psip (ArrayLike) –

    The poloidal flux \(\psi\) in Normalized Units.

dexter.NcCurrent.plot_g_of_psi(points: int = 1000, data: bool = False, show: bool = True) -> Canvas

Plots \(g(\psi)\).

Parameters:

  • points (int, default: 1000 ) –

    The number of points in which to evaluate \(g(\psi)\). Defaults to 1000.

  • data (bool, default: False ) –

    Whether or not to plot the data array points (numerical equilibria only). Defaults to False.

  • show (bool, default: True ) –

    Whether or not to call plt.show(). Defaults to True.

Returns:

  • Canvas

    The produced Figure and Ax.

dexter.NcCurrent.plot_g_of_psip(points: int = 1000, data: bool = False, show: bool = True) -> Canvas

Plots \(g(\psi_p)\).

Parameters:

  • points (int, default: 1000 ) –

    The number of points in which to evaluate \(g(\psi_p)\). Defaults to 1000.

  • data (bool, default: False ) –

    Whether or not to plot the data array points (numerical equilibria only). Defaults to False.

  • show (bool, default: True ) –

    Whether or not to call plt.show(). Defaults to True.

Returns:

  • Canvas

    The produced Figure and Ax.

dexter.NcCurrent.plot_i_of_psi(points: int = 1000, data: bool = False, show: bool = True) -> Canvas

Plots \(I(\psi)\).

Parameters:

  • points (int, default: 1000 ) –

    The number of points in which to evaluate \(I(\psi)\). Defaults to 1000.

  • data (bool, default: False ) –

    Whether or not to plot the data array points (numerical equilibria only). Defaults to False.

  • show (bool, default: True ) –

    Whether or not to call plt.show(). Defaults to True.

Returns:

  • Canvas

    The produced Figure and Ax.

dexter.NcCurrent.plot_i_of_psip(points: int = 1000, data: bool = False, show: bool = True) -> Canvas

Plots \(I(\psi_p)\).

Parameters:

  • points (int, default: 1000 ) –

    The number of points in which to evaluate \(I(\psi_p)\). Defaults to 1000.

  • data (bool, default: False ) –

    Whether or not to plot the data array points (numerical equilibria only). Defaults to False.

  • show (bool, default: True ) –

    Whether or not to call plt.show(). Defaults to True.

Returns:

  • Canvas

    The produced Figure and Ax.

dexter.NcCurrent.plot_dg_dpsi(points: int = 1000, show: bool = True) -> Canvas

Plots \(dg(\psi)/d\psi\).

Parameters:

  • points (int, default: 1000 ) –

    The number of points in which to evaluate \(dg(\psi)/d\psi\). Defaults to 1000.

  • show (bool, default: True ) –

    Whether or not to call plt.show(). Defaults to True.

Returns:

  • Canvas

    The produced Figure and Ax.

dexter.NcCurrent.plot_dg_dpsip(points: int = 1000, show: bool = True) -> Canvas

Plots \(dg(\psi_p)/d\psi_p\).

Parameters:

  • points (int, default: 1000 ) –

    The number of points in which to evaluate \(dg(\psi_p)/d\psi_p\). Defaults to 1000.

  • show (bool, default: True ) –

    Whether or not to call plt.show(). Defaults to True.

Returns:

  • Canvas

    The produced Figure and Ax.

dexter.NcCurrent.plot_di_dpsi(points: int = 1000, show: bool = True) -> Canvas

Plots \(dI(\psi)/d\psi\).

Parameters:

  • points (int, default: 1000 ) –

    The number of points in which to evaluate \(dI(\psi)/d\psi\). Defaults to 1000.

  • show (bool, default: True ) –

    Whether or not to call plt.show(). Defaults to True.

Returns:

  • Canvas

    The produced Figure and Ax.

dexter.NcCurrent.plot_di_dpsip(points: int = 1000, show: bool = True) -> Canvas

Plots \(dI(\psi_p)/d\psi_p\).

Parameters:

  • points (int, default: 1000 ) –

    The number of points in which to evaluate \(dI(\psi_p)/d\psi_p\). Defaults to 1000.

  • show (bool, default: True ) –

    Whether or not to call plt.show(). Defaults to True.

Returns:

  • Canvas

    The produced Figure and Ax.