Process reference: transients

Generated from the docstrings of vaft.process.transients: 2 public functions. Each entry is what vaft.process.describe("transients.<name>") prints. All process categories

Overview

A current quench and the brief rise of current that can precede it are the two features of a plasma-current record a transient-event analysis starts from. Everything here measures them – times, rates, amplitudes – on a (time, current) pair and knows nothing about the machine that produced it.

SymbolMeaningUnit
ttimes
I_pplasma current, as storedA
I_refreference current the fractions are taken ofA
t_80, t_20last 80 % and first 20 % crossings of the quenchs
dI/dtrate of change of the current magnitudeA/s

Numbers, not names. A quench found here is a fall of the current magnitude through two fractions of a reference; a spike is a short positive excursion above the local trend. Neither is called an internal reconnection event or a disruption: that is a classification, and it needs evidence – the magnetic fluctuation, the radiation, the position – that a current record alone does not carry.

The sign of the stored current is removed. Every quantity is measured on polarity * I_p, where polarity is the sign of the current at its largest magnitude, and the polarity is returned, so a machine that stores a negative current gets the same numbers as one that stores a positive one.

Absence is an answer. A record with no quench, or no spike above its own noise, returns a result whose measured fields are None and whose reason says why, never the record bounds or its loudest noise sample.

Functions

current_quenchTime a current quench between 80 % and 20 % of a reference current, and its fastest fall. Convention
current_spikeMeasure a short positive rise of the current magnitude above its trend, before a quench. Convention

current_quench

Machine-independentConvention-sensitive source
current_quench(time, ip, *, window=None, reference_current=None, smoothing_s=None)

Time a current quench between 80 % and 20 % of a reference current, and its fastest fall.

NameTypeUnitDescription
timearray_likes

Strictly increasing sample times.

iparray_likeA

Plasma current, either sign.

windowsequence of float, optionals

(start, stop) the search is restricted to.

reference_currentfloat, optionalA

Current the fractions are taken of; default the largest magnitude in the window.

smoothing_sfloat, optionals

Width of a quadratic Savitzky-Golay window the rate is taken with; None takes centred differences of the record as it is.

Returns
—CurrentQuench-

The reference current in amperes, the 80 % and 20 % crossing times, their separation and its extrapolation to a full quench in seconds, the most negative rate of change of the current magnitude in amperes per second and when it occurred, the polarity, and reason when nothing was measured.

Convention

Measured on the magnitude. didt_min is the most negative rate of the polarity-corrected current, so a falling current reads negative whichever sign the machine stores. The rate is searched between the two crossings only, so the sharp fall at the end of a spike before the 80 % crossing is not mistaken for the quench rate.

extrapolated_quench_time is duration_80_20 / 0.6, the ITPA convention for the time a linear quench would take from 100 % to zero.

Processing steps · Defaults · Applicability · Limitations · Provenance

Processing steps

  1. Restrict to the window and flip the record to positive polarity.
  2. Take the reference current, and the time of the largest magnitude.
  3. Find the first sample after that time below 20 % of the reference, and the last sample before it at or above 80 %; interpolate both crossings. With no sample at or above 80 % in between – a reference_current above the peak divided by 0.8 – stop with a reason.
  4. Differentiate the magnitude – centred differences, or a quadratic Savitzky-Golay derivative over smoothing_s – and take its minimum between the two crossings.

Defaults

The 80 % and 20 % fractions are the conventional ITPA disruption-database values. With no reference_current the largest magnitude in the window is used, a numerical convenience.

Applicability

Machine-independent.

Limitations

The default reference is the largest magnitude, so a spike on the flat top raises it and moves both crossings slightly earlier; pass reference_current to use a plateau value instead. Only the first fall through 20 % after the largest magnitude is timed. A spike inside the quench still contributes the fall that ends it, which can be several times the mean quench rate; time_didt_min says where the minimum was, and current_spike with before= set past it measures the spike. The raw derivative of a noisy record is dominated by the noise; smoothing_s exists for that, and assumes uniform sampling (it uses the median step).

Provenance

  1. A. Savitzky and M. J. E. Golay, Anal. Chem. 36 (1964) 1627, as implemented by scipy.signal.savgol_filter: the smoothed rate.

current_spike

Machine-independentConvention-sensitive source
current_spike(time, ip, *, before=None, lookback_s=0.002, trend_s=0.0005, n_sigma=5.0)

Measure a short positive rise of the current magnitude above its trend, before a quench.

NameTypeUnitDescription
timearray_likes

Strictly increasing sample times.

iparray_likeA

Plasma current, either sign.

beforefloat, optionals

End of the search; default the quench’s 80 % crossing from current_quench.

lookback_sfloat, optionals

Length of the search window ending at before.

trend_sfloat, optionals

Width of the centred median filter that defines the trend.

n_sigmafloat, optional-

Robust standard deviations of the residual a spike must exceed.

Returns
—CurrentSpike-

The time of the largest excursion in seconds, its height above the trend in amperes and as a fraction of the trend current, the trend current and the noise’s robust sigma in amperes, the search end, the polarity, and reason when nothing qualified.

Convention

Positive on the magnitude. A spike is a rise of the polarity-corrected current, so on a machine that stores a negative current it is a more negative excursion of the stored value. Its amplitude is reported positive.

Processing steps · Defaults · Applicability · Limitations · Provenance

Processing steps

  1. Flip the record to positive polarity.
  2. Take before as given, or the 80 % crossing of the quench; with neither, stop with a reason.
  3. Median-filter the magnitude over trend_s and subtract it: an excursion shorter than half that width survives in the residual, the trend does not.
  4. Within [before - lookback_s, before] take the largest residual above the residual’s median, and the noise as the robust sigma of the first differences over the same samples divided by the square root of two.
  5. Accept it only above n_sigma robust sigmas.

Defaults

lookback_s = 2 ms and trend_s = 0.5 ms are empirical, a numerical convenience sized for sub-millisecond excursions on a current that changes over milliseconds, as in a small tokamak; a longer discharge wants both scaled. n_sigma = 5 is a numerical convenience that keeps the largest of a few hundred Gaussian residual samples below the threshold.

Applicability

Machine-independent.

Limitations

One spike: the largest excursion in the window. An excursion longer than half of trend_s is absorbed into the trend and not reported. Pickup from a coil switching at the same time looks identical in a current record; nothing here can tell them apart.

Provenance

results matching ""

    No results matching ""