omfit-tglf 2020.12.2.22.59
omfit_tglf
Requires Python: >=3.6

**TGLF** files used as part of the OMFIT project: https://omfit.io/

Provides:
=========
* OMFITtglf_eig_spectrum
* OMFITtglf_wavefunction
* OMFITtglf_flux_spectrum
* OMFITtglf_nete_crossphase_spectrum
* OMFITtglf_potential_spectrum
* OMFITtglf_fluct_spectrum
* OMFITtglf_intensity_spectrum
* OMFITtglf
* OMFITtglf_nsts_crossphase_spectrum
* sum_ky_spectrum

Requires:
=========
* astropy>=2,<4
* matplotlib>=3.1,!=3.2.1,!=3.2.2
* numpy>=1.12
* omas>=0.67.0
* scipy>=1.0
* uncertainties>=3
* xarray>=0.10.8
* omfit_path==2020.12.2.22.59
* omfit_ascii==2020.12.2.22.59
* omfit_dir==2020.12.2.22.59
* omfit_gacode==2020.12.2.22.59
* omfit_base==2020.12.2.22.59
* omfit_gapy==2020.12.2.22.59
* omfit_json==2020.12.2.22.59
* omfit_asciitable==2020.12.2.22.59
* omfit_commonclasses==2020.12.2.22.59

Authors:
=========
https://omfit.io/contributors.html

Documentation:
==============
OMFITtglf_eig_spectrum
----------------------
N/A

OMFITtglf_wavefunction
----------------------
N/A

OMFITtglf_flux_spectrum
-----------------------

    Parse the out.tglf.sum_flux_spectrum file and provide a convenient means for
    plotting it.

    :param filename: Path to the out.tglf.sum_flux_spectrum file

    :param n_species: Number of species

    :param n_fields: Number of fields
    

OMFITtglf_nete_crossphase_spectrum
----------------------------------

    Parse the out.tglf.nete_crossphase_spectrum file and provide a convenient means for
    plotting it.

    :param filename: Path to the out.tglf.nete_crossphase_spectrum file

    :param nmodes: Number of modes computed by TGLF and used in the
    

OMFITtglf_potential_spectrum
----------------------------

    Parse the potential fluctuation spectrum in out.tglf.potential_spectrum and
    provide a convenient means for plotting it.

    :param filename: Path to the out.tglf.potential_spectrum file
    

OMFITtglf_fluct_spectrum
------------------------

    Parse the {density,temperature} fluctuation spectrum in
    out.tglf.{density,temperature}_spectrum  and provide a convenient means for
    plotting it.

    :param filename: Path to the out.tglf.{density,temperature}_spectrum file

    :param ns: Number of species

    :param label: Type of fluctuations ('density' or 'temperature')
    

OMFITtglf_intensity_spectrum
----------------------------

    Parse the intensity fluctuation spectrum in
    out.tglf.{density,temperature}_spectrum  and provide a convenient means for
    plotting it.

    :param filename: Path to the out.tglf.{density,temperature}_spectrum file

    :param ns: Number of species

    :param label: Type of fluctuations ('density' or 'temperature')
    

OMFITtglf
---------

    The purpose of this class is to be able to store all results from a given
    TGLF run in its native format, but parsing the important parts into the tree

    :param filename: Path to TGLF run
    

OMFITtglf_nsts_crossphase_spectrum
----------------------------------

    Parse the out.tglf.nsts_crossphase_spectrum file and provide a convenient means for
    plotting it.

    :param filename: Path to the out.tglf.nsts_crossphase_spectrum file

    :param nmodes: Number of modes computed by TGLF and used in the
    

sum_ky_spectrum
---------------

    Perform the sum over ky spectrum
    The inputs to this function should be already weighted by the intensity function

    nk --> number of elements in ky spectrum
    nm --> number of modes
    ns --> number of species
    nf --> number of fields (1: electrostatic, 2: electromagnetic parallel, 3:electromagnetic perpendicular)

    :param sat_rule_in:

    :param ky_spect: k_y spectrum [nk]

    :param gp: growth rates [nk, nm]

    :param ave_p0: scalar average pressure

    :param R_unit: scalar normalized major radius

    :param kx0_e: spectral shift of the radial wavenumber due to VEXB_SHEAR [nk]

    :param potential: input potential fluctuation spectrum  [nk, nm]

    :param particle_QL: input particle fluctuation spectrum [nk, nm, ns, nf]

    :param energy_QL: input energy fluctuation spectrum [nk, nm, ns, nf]

    :param toroidal_stress_QL: input toroidal_stress fluctuation spectrum [nk, nm, ns, nf]

    :param parallel_stress_QL: input parallel_stress fluctuation spectrum [nk, nm, ns, nf]

    :param exchange_QL: input exchange fluctuation spectrum [nk, nm, ns, nf]

    :param etg_fact: scalar TGLF SAT0 calibration coefficient [1.25]

    :param c0: scalar TGLF SAT0 calibration coefficient [32.48]

    :param c1: scalar TGLF SAT0 calibration coefficient [0.534]

    :param exp1: scalar TGLF SAT0 calibration coefficient [1.547]

    :param cx_cy: scalar TGLF SAT0 calibration coefficient [0.56] (from TGLF 2008 POP Eq.13)

    :param alpha_x: scalar TGLF SAT0 calibration coefficient [1.15] (from TGLF 2008 POP Eq.13)

    :param \**kw: any additional argument should follow the naming convention of the TGLF_inputs
            for SAT1 the TAUS_2 argument is needed

    :return: dictionary with summations over ky spectrum:
            * particle_flux_integral: [nm, ns, nf]
            * energy_flux_integral: [nm, ns, nf]
            * toroidal_stresses_integral: [nm, ns, nf]
            * parallel_stresses_integral: [nm, ns, nf]
            * exchange_flux_integral: [nm, ns, nf]