Input Data Details

Traceability

Data/parameters read from database or file must be traceable to its origin. Raw data should be stored for future referencing, together with their INSTRUMENT (DDA in JET) and UID user-ID names (e.g. JETPPF, CHAIN1 or any other private UIDs in JET) and REVISION # (SEQ in JET), or file name for data contained in ASCII/binary files. This ensures tracking of data origin, the possibility to vary calculation/fitting parameters without re-reading the raw data and enables consistency checks vs. derived data e.g.:

  • Demonstrate the quality of the fits to electron/ion profile data (Thomson Scattering, ECE, CXRS, etc.);

  • Demonstrate goodness of inversion algorithm or forward calculation for line-of-sight (LOS) integrated data (SXR, bolometry, passive spectroscopy, etc.).

  • Cross-check toroidal rotation calculated from W density asymmetry vs. the experimental CXRS measurement

Time resolution

For JET plasmas, the time resolution required for the analysis is typically 10-50 ms. Global time array is built given the time window of analysis [t1, t2] and the desired time resolution. All derived quantities are calculated on this axis, which is different from the time resolution of the raw data of each diagnostic which will have to be interpolated accordingly.

Reference radial array

Radial array = normalised poloidal flux coordinate (rho), regular grid [0, 1]. A reference radial array, fixed in time, is used to map all derived and fitted profiles. Currently, a regular grid of 41 points is used across the minor radius, leading to a central resolution of ~ 2 cm which increases at the edge.

issues: in view of future upgrades, e.g. the inclusion of fast transport codes in the loop to resolve the pedestal region, it might be worthwhile to increase the resolution at the edge for rho > 0.85.

Equilibrium data

As all other database data, it is saved to a raw-data variable in its original time resolution. For equilibrium quantities and for conversion of equilibrium quantities (e.g. (R,z)↔ψ flux), the data is retrieved for the equilibrium time-point in closest proximity to the requested time-point. This pattern has been kept inside the code as well.

Because of uncertainties in equilibrium-calculated geometrical quantities such as separatrix position (uncertainties in magnetic measurements) or magnetic axis position (uncertainties in the plasma pressure at runtime), a possibility of an (R,z) shift of the whole equilibrium is included. Since shifting the equilibrium is impossible without re-running the equilibrium code, an alternative solution is to shift ALL diagnostic data of the same amount, but in the opposite direction. The (R,z) shift variables should be time-dependent and included in the equilibrium data since it is a quantity that has to be applied equally to all diagnostics. This provides a fast way to check the boundary position of the equilibrium reconstruction, but should be used mainly to provide feedback to improve the equilibrium reconstruction.

Conversion between coordinates is required for most diagnostic data and equilibrium quantities:

  • (R,z)↔(rho,t) diagnostics’ measurement positions. For Thomson scattering (HRTS, LIDAR in JET) and CXRS these are local measurements; for Bolometric measurements (KB5 in JET), SXR or other line-of-sight (LOS) integrated measurements these are array of values along the LOS. For LOS coordinates, a fixed number of points along all LOS with a constant linear step between points is used to keep a constant spatial resolution along the LOS. Better ways of doing this?

This transformation is also used to calculate a 2D time-dependent poloidal map of rho over a fixed * (R,z) grid used for the 2D maps.

  • (rho,ϑ)↔(R,z,t) where rho is the reference array, ϑ is the poloidal angle (both time-independent). Subset of these transformations that are used very often:

    • (rho,ϑ=0)↔(R_LFS,t) = major radius R, LFS midplane (at z_ax)

    • (rho,ϑ=π)↔(R_HFS,t) = major radius R, HFS midplane (at z_ax)

  • rho↔Vol = volume, for the estimation of volumetric integrals of e.g. total radiation, impurity densities, etc.

  • (rho,ϑ)→minor radius depending on the application, one may want to use values at the LFS ϑ=π or HFS ϑ=π, HFS-LFS averaged values, flux-surface-averaged values ϑ=[0,2π). All are currently used in the code.

  • rho= rhop↔ rhot(t) i.e. conversion from normalized poloidal flux coordinate to normalized toroidal flux coordinate (modelling codes typically use either one or the other). In the current version there is the possibility of choosing which coordinate (rhop or rhot) to use as main (time-independent) rho coordinate, and which one as subordinate (time-dependent).

Other quantities that should be read from the equilibrium reconstruction are:

  • (R_sep,z_sep,t) of the separatrix coordinates (for each time-point R_sep and z_sep are arrays)

  • (R_ax,z_ax,t) = position of the magnetic axis (for each time-point R_ax and z_ax are scalars)

  • B_tot (R,t) = total magnetic field (for the calculation of the ICRH resonance position, re-mapping of the ECE data, etc.)

Basic diagnostic data structure

Apart from the measured quantity and its estimated error, specific info varies depending on the diagnostic measurement principle. Since the analysis of the data from all diagnostics is performed in an integrated manner on the same equilibrium reconstruction, the raw data should include the least possible derived quantities relying on other database quantities. As an example, the measurement positions of the ECE diagnostic given in the database rely on specific equilibrium quantities: instead of using these quantities, the frequency of each channel is read and the radial location self-consistently calculated within the code using the common equilibrium reconstruction data.

Below is an initial list of information ordered depending on the source (database/file) and details of the diagnostics.

  • UID, INSTRUMENT names and REVISION for database data (e.g. for JET: JETPPF, HRTS, 350)

  • File name, path and origin (e.g. name of originator, publication details if published) for ASCII (e.g. ADAS ionization and recombination files), NetCDF (TRANSP) or other file types. Origin is especially important to trace data-files present on a private repository and not available on a central database.

  • (R,z) of all local measurement positions (e.g. Thomson scattering, CXRS, magnetic probes, etc.) or (R,z) array of lines-of-sight (e.g. bolometry, SXR, passive spectroscopy, etc.)

  • f_channel = acquisition frequency of each channel of the resonators (reflectometry or radiometry diagnostics e.g. ECE, reflectometry)

  • n_harm = harmonic of cyclotron frequency (reflectometry or radiometry diagnostics)

  • (rho,t) calculated with the methods defined above for the equilibrium

  • min_rho for LOS only: it’s called “impact parameter” and it’s the minimum distance (in rho) of each LOS from the magnetic axis. A different sign is typically assigned to LOS on opposite sides of the magnetic axis to avoid that they have same impact parameter. The current convention is -1 for vertical LOS viewing to the HFS of the magnetic axis and for horizontal LOS viewing below the magnetic axis.

  • min_rad as above, but the minimum distance is in physical space (in cm or m)

For JET diagnostics, if the information on the LOS or measurement positions is not available in the PPFs, it is taken from the central database built for SURF (RO is David Taylor). It may not be the most optimized database, but it is a standard and is consistent with what users see on the program SURF. The information therein has been checked for most diagnostics with their ROs.

List of Data to Read

Grouped by measurement quantity, the diagnostics (identified with their INSTRUMENT names) currently included in the program are:

  • Electron density and temperature diagnostics: Thomson scattering, ECE, reflectometry (in JET: HRTS, LIDR, KK3, KG10)

  • Radiation: Bolometry, SXR (in JET: SXR, KB5)

  • Passive spectroscopy: Bremsstrahlung, VUV, X-ray crystal (in JET: KS3, KT7/3, KX1)

  • Charge exchange recombination spectroscopy: CXRS

  • Tomographic reconstruction of total/SXR radiation: Bolometry, SXR (in JET: BOLT, B5NN, B5ML, B5MF)

  • Other tools/diagnostics: analysis of MHD activity through FFT and toroidal mode analysis of Mirnov coils, oscillation amplitudes of fast ECE and SXR.

Below are the details of the data that has to be read for each of these and other quantities that have to be read or computed for a correct functioning of the program. Most of the diagnostic variables are stored in database of which INSTRUMENT and QUANTITY (DTYPE in JET) are specified. When this is not the case, the source of this information will be specified in the column INSTRUMENT:

  • Surf = external databases to read LOS coordinates

  • Flush = libraries for reading specific attributes of the equilibrium of mapping between coordinates

  • ASCII = for quantities stored in ASCII files

  • User = user-defined quantities

and QUANTITY will simply be a variable name.

For Flush there is currently a Python 3 wrapper developed by Bruno Viola . The Surf database is a publicly available ASCII file /home/flush/surf/input/overlays_db.dat and maintained by David Taylor.

Equilibrium

INSTRUMENT

QUANTITY

Axes

Description

EFIT

RMAG, ZMAG

t

Major radius and Z of magnetic axis (m)

User

RHO_EQ

nrho_eq

Reference coordinate for the equilibrium data, nrho_eq = 101 (currently) = user defined # of points

THETA

ntheta

Array of poloidal angles [0, 2 pi) for calculation of flux-surface-averaged quantities etc., ntheta = 10 (currently) = user defined # of poloidal angles

Flush

RHO_TOR

rho_eq, t

Conversion of reference radial coordinate rho = rho_poloidal to the normalized toroidal flux coordinate used in many modelling codes (flush_getftorprofile)

VOL

Volume within flux surfaces defined by rho_eq (combination of flush_getflux, flush_getvolume)

MAJR_LFS, MAJR_HFS

Map of rho_eq on major radius R at LFS and HFS (combination of flush_getabsoluteflux, flush_getmagaxisflux, flush_getlcfsflux)

MINR_LFS, MINR_HFS

Minor radius on LFS and HFS, calculated from MAJR_LFS and MAJR_LFS

RSEP, ZSEP

nsep, t

Separatrix major radius and z position arrays (m), nsep = 150 (currently) = user defined # of points (Flush_getLCFSboundary)

Flush

BR, BZ, BT, BTOT

R, t

Radial (BR), vertical (BZ), toroidal (BT) components and total (Btot) magnetic field at the midplane, interpolated on [MAJR_HFS, MAJR_LFS] (flush_getBr, flush_getBz, flush_getBt)


Electron density and temperature

HRTS and LIDR (thomson scattering)

INSTRUMENT

QUANTITY

Axes

Description

HRTS, LIDR

NE

R, t

Electron density (m^-3), R (m) maj-R position of measurement, t (s) time of measurement

DNE

Electron density error (m-3)

TE

Electron temperature (eV)

DTE

Electron temperature error (eV)

Z

Z positions of measurements (m)

KK3 (electron-cyclotron-emission)

INSTRUMENT

QUANTITY

Axes

Description

KK3

TE##

t

Electron temperature (eV) of each channel (## = channel_number, identify from PPF DTYPEs starting with ‘TE’)

GEN

Acquisition parameters including:

  • channel_index = np.argwhere(GEN[0, :] > 0);

  • f_chan = GEN[15, :] (GHz) = resonator frequency to calculate channel R_chan from B_tot;

  • nharm_chan = GEN[11, :] = measured harmonic of cyclotron frequency, necessary to calculate channel R_chan from B_tot;

  • cal_chan = GEN[18, :] and GEN[19, :] = channel calibrated if != 0 (if ==0, let user choose whether to use the data)

Surf

z

z position of the viewing LOS (horizontal view). Surf has slightly different vaues from Datahandbook = 0.1335 (m) for JPN < 80318, 0.2485 (m) for JPN > 80318

Flush

R##

Btot, t

Radial position of each channel calculated interpolating the total B-field along the LOS of the KK3 antenna with the B-field of cold resonance calculated using the electron cyclotron frequency formula with info from GEN (flush_getBr, flush_getBz, flush_getBt)

KG10 (reflectometry)

INSTRUMENT

QUANTITY

Axes

Description

KG10

NE

chan, t

Electron density (m**-3)

R

chan

R position of measurement

z

chan

Z position of the measurement

KY6 (Li-beam)

INSTRUMENT

QUANTITY

Axes

Description

KY6

NE


Radiation

SXR (soft X-ray)

INSTRUMENT

QUANTITY

Axes

Description

SXR

V##, T##, H##

t

Brightness (W m^-2) of the each LOS (## = LOS_number) for cameras V, T, H (user to choose which to read)

Surf

(R, z)

channel, nlos

Coordinates (m) of all LOS. Identifying string in Surf database is respectively ‘KJ3-4 V’, ‘KJ3-4 T’, ‘KJ5’, nlos = 100 (currently) = number of points along each los, chosen with identical equally spaced steps for all LOS.

KB5 (bolometry)

INSTRUMENT

QUANTITY

Axes

Description

BOLO

KB5V, KB5H

channel, t

Brightness (W m^-2) of all LOS (channel_number = channel_index + 1) for cameras V, H (user to choose which to read)

Surf

(R, z)

channel, nlos

Coordinates (m) of all LOS. Identifying string in Surf database is ‘KB5’


Spectroscopy

KS3 (Bremsstrahlung)

INSTRUMENT

QUANTITY

Axes

Description

KS3

ZEFH, ZEFV

t

Zeff measurements from horizontal and vertical lines-of-sight

EDG7

LOSH, LOSV

Info on LOS coordinates (mm) for KS3 measurements: R_start = LOSH[1], R_end = LOSH[4], z_start = LOSH[2], z_end = LOSH[5], same for LOSV

KX1 (X-ray crystal spectroscopy)

INSTRUMENT

QUANTITY

Axes

Description

XCS

CNC

t

Nickel concentration from KX1 diagnostic

Surf

(R, z)

Coordinates (m) of the LOS. Identifying string in Surf database is ‘KX1’

KT7/3 (VUV spectroscopy)

INSTRUMENT

QUANTITY

Axes

Description

KT7D

spectra

Spectra has to be read, fitting a-la-Pütterich to be performed

Surf

(R,z)

Coordinates (m) of the LOS. Identifying string in Surf database is ‘KT7D’


Charge exchange recombination spectroscopy

INSTRUMENT

QUANTITY

Axes

Description

Many INSTRUMENTs, e.g. CXG6

TI

x, t

Ion temperature (eV), x_cxrs is an effective position of measurement in the torus frame (m), but the correct R is RPOS (see below)

TIHI, TILO

Upper, lower TI limits (eV): TI_ERR = (TIHI - TILO)/2.

ANGF

Angular rotation frequency (rad)

AFHI, AFLO

Upper, lower ANGF limits (rad): ANGF_ERR = (AFHI - AFLO)/2.

CONC

Concentration (%) of measured impurity

COHI, COLO

Upper, lower CONC limits (rad): CONC_ERR = (COHI - COLO)/2.

RPOS

R position of measurement (m)

POS

z position of measurement (m)

MASS

Atomic mass of measured impurity

TEXP

t

Exposure time (s)


Fast magnetic coils

INSTRUMENT

QUANTITY

Axes

Description

C1M- (JPF nodes)

T001, T002, T008, T009, H302, H303, H304, H305

t

Signals from the toroidal set of fast magnetic coils

(R, z, phi, theta)

Position and orientation of the coils

Additionally to these, all measurement coordinates and LOS will have to be converted from (R, z) to rho using Flush (flush_getabsoluteflux, flush_getmagaxisflux, flush_getlcfsflux). Both coordinate systems should be saved for future use.

LOS coordinates shouldn’t be just the start and end of the LOS, but arrays of values along the LOS which can then be used for performing integrals and other operations, both in (R, z) and rho.


ADAS atomic data files

For each element included in the analysis, files must be read for: ionization (SCD) and recombination rates (ACD), total radiation loss parameters from spectral lines (PLT) and recombination/Bremsstrahlung (PRB), SXR-filtered radiation loss parameters from spectral lines (PLSX) and recombination/Bremsstrahlung (PRSX), SXR-filter function.

ADAS filenames are standard (e.g. scd96_he.dat) and include a class identifier (e.g. “scd” for ionization rate coefficients), a year identifier (e.g. “96”) and the element, fully in lower-case (e.g. “he”) with an underscore in front. All of the files used are stored in the official ADAS repository, apart from SXR-filtered radiation loss parameter files which are often built locally starting from SXR-filter function files (labelled e.g. ‘sxrfil5.dat’). Care must be taken to avoid confusion since on different machines these files can have the same name, but different filter characteristics (e.g. AUG and JET have 75 um and 250 um filters but the files are all labelled plsx5, prsx5, sxrfil5).

The files reported below are the ones currently used. The SXR files are JET-specific for 250 um Be-windows. When using the code on other machines, all files will be the same apart from the SXR-filtered radiation loss parameter files.

Element

Files

Comment

H

scd96, acd96, plt96, prb96, plsx5, prsx5

He

acd96, scd96, plt96, prb96, plsx5, prsx5

Be

acd96, scd96, plt96, prb96, plsx5, prsx5

N

acd96, scd96, plt96, prb96

No SXR-filtered data for 250 um filter

Ne

acd96, scd96, plt96, prb96, plsx5, prsx5

Ar

acd85, scd85, plt00, prb00, plsx5, prsx5

Fe

acd00, scd00, plt00, prb00, plsx5, prsx5

Ni

acd89, scd89, plt01, prb00, plsx5, prsx5

Mo

acd89, scd89, plt89, prb89

No SXR-filtered data for 250 um filter

W

acd89, scd89, plt89, prb89, plsx5, prsx5

Other files from Thomas Pütterich are currently used. Effort to use official ADAS files is under way.

For historical reasons, all of these files are currently locally stored in the ../atomdat/ directory of the STRAHL program . In the new version, it will be worthwhile to decouple this from STRAHL and have a local repository within the main program directory.