API: vaft.process
Generated from each module's __all__ by python -m vaft._api_catalog:
799 published objects in 54 modules.
Signatures and summaries are read from the source; nothing here is written by hand.
All API pages
No object matches.
vaft.process
Processing namespace for VAFT’s scientific and numerical kernels.
BACKGROUND_FRAMES_2500FPS
data
BACKGROUND_FRAMES_2500FPS = 3
BACKGROUND_FRAMES_50KFPS
data
BACKGROUND_FRAMES_50KFPS = 15
BASES
data
BASES = ('thermal_main', 'fuel', 'impurity', 'fast_ion')
CLASSICAL_MODEL
data
CLASSICAL_MODEL = <builtins.dict>
COIL_EXCITATION_CONVENTION
data
COIL_EXCITATION_CONVENTION = <builtins.dict>
COINCIDENT_POLICIES
data
COINCIDENT_POLICIES = ('envelope', 'rss')
COMPOSITION_KINDS
data
COMPOSITION_KINDS = ('measured', 'explicit', 'derived', 'assumed')
COMPOSITION_ORIGINS
data
COMPOSITION_ORIGINS = ('measured', 'assumed', 'derived', 'inferred')
CONNECTION_LENGTH_FORMS
data
CONNECTION_LENGTH_FORMS = ('inverse', 'exponential', 'none')
CONNECTION_LENGTH_REDUCTIONS
data
CONNECTION_LENGTH_REDUCTIONS = ('shortest', 'total')
CONVENTIONS
data
CONVENTIONS = <builtins.dict>
COORDINATES
data
COORDINATES = ('rho_tor_norm', 'rho_pol_norm', 'psi_norm')
COVERAGE_TIERS
data
COVERAGE_TIERS = <builtins.dict>
DCON_JACOBIAN_ANGLE_WEIGHTS
data
DCON_JACOBIAN_ANGLE_WEIGHTS = <builtins.mappingproxy>
DEFAULT_COLUMNS
data
DEFAULT_COLUMNS = <builtins.dict>
DEFAULT_Q_NOISE_ATOL
data
DEFAULT_Q_NOISE_ATOL = 0.02
DEFAULT_Q_NOISE_RTOL
data
DEFAULT_Q_NOISE_RTOL = 0.02
DEFAULT_RATIONALS
data
DEFAULT_RATIONALS = <builtins.tuple>
DEFAULT_RHO_MAX
data
DEFAULT_RHO_MAX = 0.95
DEFAULT_SURFACES
data
DEFAULT_SURFACES = (0.3, 0.4, 0.5, 0.6, 0.7, 0.8)
DEFAULT_TIME_TOLERANCE_S
data
DEFAULT_TIME_TOLERANCE_S = 0.0005
DEFAULT_VEST_MAGNETICS_PROCESSING
data
DEFAULT_VEST_MAGNETICS_PROCESSING = <vaft.process.magnetics.VestMagneticsProcessingConfig>
DELTA_E_COMBINATIONS
data
DELTA_E_COMBINATIONS = ('quadrature', 'linear')
DILUTION_MODES
data
DILUTION_MODES = ('species', 'none')
EFIT_LINEAGES
data
EFIT_LINEAGES = ('magnetics', 'electron_kinetic')
EFIT_QUALITIES
data
EFIT_QUALITIES = ('good', 'admissible')
EMISSION_NORMALISATION_FRAMES_50KFPS
data
EMISSION_NORMALISATION_FRAMES_50KFPS = 10
FLUX_SURFACE_QUANTITIES
data
FLUX_SURFACE_QUANTITIES = ('gm1', 'gm5', 'gm8', 'gm9', 'dvolume_dpsi', 'darea_dpsi', 'volume', 'area', 'surface', 'elongation', 'triangularity_...
FOOTPRINT_PROXY_MODELS
data
FOOTPRINT_PROXY_MODELS = <builtins.dict>
IMPA_CHANNEL_COUNT
data
IMPA_CHANNEL_COUNT = 8
IMPURITY_SOURCES
data
IMPURITY_SOURCES = ('profile', 'configured', 'inferred_from_zeff', 'none')
INDEPENDENT_LINEAGES
data
INDEPENDENT_LINEAGES = ('magnetics',)
LEGACY_COORDINATE
data
LEGACY_COORDINATE = 'psi_norm'
LEGACY_WINDOWS
data
LEGACY_WINDOWS = <builtins.dict>
MAGNETICS_CLUSTER_GAP_FRACTION
data
MAGNETICS_CLUSTER_GAP_FRACTION = 0.4
MHD_BAND_HALF_WIDTH_HZ
data
MHD_BAND_HALF_WIDTH_HZ = 500.0
MIN_ANNULUS_CELLS
data
MIN_ANNULUS_CELLS = 16.0
MIN_FLUX_SURFACE_POINTS
data
MIN_FLUX_SURFACE_POINTS = 16
MODE_FREQUENCY_MODELS
data
MODE_FREQUENCY_MODELS = ('toroidal_rotation',)
MODE_FREQUENCY_STATUSES
data
MODE_FREQUENCY_STATUSES = ('valid', 'no_equilibrium_profile', 'no_surface', 'outside_rotation_time', 'no_surface_coordinate', 'outside_rotation...
NE_DYNAMIC_RANGE_MAX
data
NE_DYNAMIC_RANGE_MAX = 1000.0
NEGATIVE_EIGENVALUE_POLICIES
data
NEGATIVE_EIGENVALUE_POLICIES = ('raise', 'abs', 'drop')
NORMALIZATIONS
data
NORMALIZATIONS = ('ne_weighted_mean', 'axis', 'fixed', 'resistive_closure')
NTV_QUADRATIC_STATUSES
data
NTV_QUADRATIC_STATUSES = ('qualified', 'rejected', 'insufficient')
OPERATING_SPACE_ROLES
data
OPERATING_SPACE_ROLES = ('scan', 'reference', 'analytic_optimum', 'numerical_optimum', 'gpec_confirmation', 'probe', 'held_out', 'invariance')
OPERATING_SPACE_STATUSES
data
OPERATING_SPACE_STATUSES = ('valid', 'infeasible', 'failed', 'not_computed', 'undefined')
PAPER_JUMP_WIDTH
data
PAPER_JUMP_WIDTH = <vaft.process.perturbation.JumpWidthModel>
PEDESTAL_FALLBACK_PSI_NORM
data
PEDESTAL_FALLBACK_PSI_NORM = 0.85
PEDESTAL_RESOLUTION_FACTOR
data
PEDESTAL_RESOLUTION_FACTOR = 3.0
PHYSICAL_EDGE_MAX
data
PHYSICAL_EDGE_MAX = 0.98
PHYSICAL_PSIN_MAX
data
PHYSICAL_PSIN_MAX = 0.98
POPULATIONS
data
POPULATIONS = ('thermal', 'nbi_fast', 'fusion_born', 'rf_minority', 'fast_unspecified', 'other')
PROJECTION_METHODS
data
PROJECTION_METHODS = <builtins.dict>
PROJECTION_POLICY
data
PROJECTION_POLICY = <builtins.dict>
RADIAL_COORDINATES
data
RADIAL_COORDINATES = <builtins.dict>
RATIONAL_SURFACE_ABSENT
data
RATIONAL_SURFACE_ABSENT = 'absent'
RATIONAL_SURFACE_PRESENT
data
RATIONAL_SURFACE_PRESENT = 'present'
RATIONAL_SURFACE_RTOL
data
RATIONAL_SURFACE_RTOL = 1e-09
REFERENCE_LENGTHS
data
REFERENCE_LENGTHS = (None, 'a_minor', 'R_major_axis', 'R_major_surface', 'L_ref')
REFERENCE_SEARCH_RANGE_HZ
data
REFERENCE_SEARCH_RANGE_HZ = (3000.0, 15000.0)
RESOLVER_VERSION
data
RESOLVER_VERSION = 2
RESONANT_FIELDS
data
RESONANT_FIELDS = ('Phi_res', 'Phi_res_v')
RESONANT_RESPONSE_COLUMNS
data
RESONANT_RESPONSE_COLUMNS = ('Phi_res', 'Phi_res_v', 'Phi_res_crit', 'Phi_res_crit_callen', 'Delta', 'B_pen', 'I_res', 'w_isl', 'w_isl_v', 'w_isl...
RESONANT_STATISTICS
data
RESONANT_STATISTICS = ('rms', 'max', 'min', 'mean', 'sum')
ROMERO_VOLTAGE_CONVENTION
data
ROMERO_VOLTAGE_CONVENTION = 'romero:V=-dpsi/dt,full_Wb'
SINGULAR_OFFSET
data
SINGULAR_OFFSET = 0.0005
SPECTRAL_WINDOW_FRAMES_50KFPS
data
SPECTRAL_WINDOW_FRAMES_50KFPS = 50
SURFACE_MEMBERSHIPS
data
SURFACE_MEMBERSHIPS = ('resonant', 'non_resonant', 'absent')
TE_POSITIVE_EDGE_MAX
data
TE_POSITIVE_EDGE_MAX = 0.98
TE_POSITIVE_PSIN_MAX
data
TE_POSITIVE_PSIN_MAX = 0.98
TI_FLAGS
data
TI_FLAGS = ('p_i_nonpositive', 'p_i_not_significant', 'non_finite_input')
TI_NOTES
data
TI_NOTES = ('sigma_unavailable',)
TOTAL_PRESSURE_LEAVES
data
TOTAL_PRESSURE_LEAVES = ('pressure_thermal', 'pressure', 'pressure_ion_total', 'pressure_ion_total_thermal', 'pressure_parallel', 'pressure_p...
UNSET
data
UNSET = <vaft.process.profile_gradients._Unset>
ZERO_MEANS_NOT_COMPUTED
data
ZERO_MEANS_NOT_COMPUTED = ('Phi_res_crit', 'Phi_res_crit_callen', 'w_isl_v_crit', 'w_isl_sat', 'w_isl_min')
vaft.process.atomic
Atomic-radiation processing on OMAS data structures.
compute_line_radiation_power_series — Line-radiation power for matched equilibrium slices, from the stored kinetic profiles. Reference source
Also exported as vaft.process.compute_line_radiation_power_series.
compute_time_match_atol — An absolute time-matching tolerance adapted to the native time spacing. Reference source
Also exported as vaft.process.compute_time_match_atol.
find_time_match_index — Index of the time closest to target_time, within the adaptive tolerance. Reference source
Also exported as vaft.process.find_time_match_index.
IMPURITY_SOURCES
data
IMPURITY_SOURCES = ('profile', 'configured', 'inferred_from_zeff', 'none')
vaft.process.camera_fluctuation
Fluctuation analysis of FAST-camera image sequences.
BACKGROUND_FRAMES_2500FPS
data
BACKGROUND_FRAMES_2500FPS = 3
BACKGROUND_FRAMES_50KFPS
data
BACKGROUND_FRAMES_50KFPS = 15
EMISSION_NORMALISATION_FRAMES_50KFPS
data
EMISSION_NORMALISATION_FRAMES_50KFPS = 10
MHD_BAND_HALF_WIDTH_HZ
data
MHD_BAND_HALF_WIDTH_HZ = 500.0
mhd_band_power — Integrate each pixel’s spectrogram over a band around the MHD frequency. Reference source
Also exported as vaft.process.mhd_band_power.
normalize_by_local_emission — Divide MHD-band power by each pixel’s local average emission. Reference source
Also exported as vaft.process.normalize_by_local_emission.
PixelSpectrogram
class
source
PixelSpectrogram(time: np.ndarray, frequency: np.ndarray, magnitude: np.ndarray) -> None
A short-time Fourier magnitude map held for every pixel of a frame.
Also exported as vaft.process.PixelSpectrogram.
3 fields · 1 members
time: np.ndarrayfrequency: np.ndarraymagnitude: np.ndarraypixel_shapeproperty — The image shape each spectrogram belongs to. source
pixelwise_spectrogram — Treat every pixel as its own signal and take its short-time Fourier magnitude. Reference source
Also exported as vaft.process.pixelwise_spectrogram.
poisson_window — The exponentially decreasing peak-shaped window the published analysis uses. Reference source
Also exported as vaft.process.poisson_window.
REFERENCE_SEARCH_RANGE_HZ
data
REFERENCE_SEARCH_RANGE_HZ = (3000.0, 15000.0)
SPECTRAL_WINDOW_FRAMES_50KFPS
data
SPECTRAL_WINDOW_FRAMES_50KFPS = 50
subtract_temporal_background — Remove each pixel’s slowly varying emission by subtracting its local temporal mean. Reference source
Also exported as vaft.process.subtract_temporal_background.
vaft.process.camera_geometry
Pinhole camera projection math for the VEST FAST camera.
CameraProjection
class
source
CameraProjection(camera_matrix: np.ndarray, dist_coeffs: np.ndarray, rvec: np.ndarray, tvec: np.ndarray, method: str = 'calibrated', provenance: Mapping[str, Any] = <factory>) -> None
How machine coordinates become camera pixels (issue #261 sections 20-21).
Also exported as vaft.process.CameraProjection.
6 fields · 3 members
camera_matrix: np.ndarraydist_coeffs: np.ndarrayrvec: np.ndarraytvec: np.ndarraymethod: strprovenance: Mapping[str, Any]projectmethod —(pixel_uv, valid_mask)for 3-D world points in centimetres. sourceproject_rzmethod — Valid pixels of a poloidal (R, Z) curve swept toroidally overtheta_rad. sourceproject_ringmethod — Valid pixels of one toroidal ring at (R, Z). source
project_points — Project world points into camera pixels, flagging the ones the model cannot be trusted for. Reference source
Also exported as vaft.process.project_points.
sweep_toroidal — Sweep poloidal points through toroidal angles into world points. Reference source
Also exported as vaft.process.sweep_toroidal.
vaft.process.catalog
Searchable catalog of the processing layer, read out of the docstrings.
CATEGORIES
data
CATEGORIES = ('profile', 'equilibrium', 'camera_geometry', 'signal_processing', 'fluctuation', 'soft_x_rays', 'electromagnetics', ...
categories
function
source
categories() -> list[CategoryDoc]
Every submodule as a documentation category.
CategoryDoc
class
source
CategoryDoc(name: str, module: str, title: str, overview: str, notation: tuple, conventions: str, count: int, documented: int) -> None
One submodule as a documentation category.
describe
function
source
describe(name: str) -> ProcessSpec
The spec of one processing function.
documentation_snapshot
function
source
documentation_snapshot(category: str | None = None, provenance: Mapping[str, str] | None = None) -> dict
Deterministic, site-ready representation of the whole catalog.
export_documentation_snapshot
function
source
export_documentation_snapshot(output: str | Path, category: str | None = None, provenance: Mapping[str, str] | None = None) -> Path
Write the YAML snapshot and return its path.
list_processes
function
source
list_processes(category: str | None = None) -> list[ProcessSpec]
Specs of every processing function, or of one category, in category-then-name order.
ProcessSpec
class
source
ProcessSpec(name: str, category: str, module: str, signature: str, summary: str, description: str, parameters: tuple[ParamDoc, ...], returns: tuple[ReturnDoc, ...], sections: tuple[tuple[str, str], ...], references: tuple[Reference, ...], machine_scope: str | None, convention_sensitive: bool, deprecated: bool, aliases: tuple[str, ...] = (), errors: tuple[str, ...] = (), raises: tuple[RaiseDoc, ...] = (), source_path: str = '', source_line: int = 0, source_end_line: int = 0, source_code: str = '', semantics: Semantics | None = None) -> None
Everything the catalog knows about one public processing function.
21 fields · 5 members
name: strcategory: strmodule: strsignature: strsummary: strdescription: strparameters: tuple[ParamDoc, ...]returns: tuple[ReturnDoc, ...]sections: tuple[tuple[str, str], ...]references: tuple[Reference, ...]machine_scope: str | Noneconvention_sensitive: booldeprecated: boolaliases: tuple[str, ...]errors: tuple[str, ...]raises: tuple[RaiseDoc, ...]source_path: strsource_line: intsource_end_line: intsource_code: strsemantics: Semantics | Nonequalnameproperty —category.name, the unambiguous catalog key. sourceconformingproperty sourcesectionmethod — Text of one section, orNonewhen the docstring lacks it. sourcerendermethod — Terminal-friendly description: signature, units, sections, provenance. sourceas_dictmethod — The snapshot row: plain scalars and lists, Sphinx roles stripped. source
search
function
source
search(text: str, *, category: str | None = None) -> list[ProcessSpec]
Functions whose name, prose, sections, parameters or provenance mention text.
vaft.process.cocos
Operational COCOS handling: consistency checking against Sauter Eq. 23.
cocos_consistency_signs — Observed sign of each Sauter Eq. 23 quantity, or None where not determinable. Reference source
cocos_field_scales — The two sign multipliers that carry an equilibrium from one COCOS to another. Reference source
CONTOUR_Q_LEVELS
data
CONTOUR_Q_LEVELS = (np.float64(0.1), np.float64(0.15000000000000002), np.float64(0.2), np.float64(0.25), np.float64(0.30000000000000004)...
CONTOUR_Q_LOG_TOLERANCE
data
CONTOUR_Q_LOG_TOLERANCE = 0.13976194237515868
CONTOUR_Q_MIN_SURFACES
data
CONTOUR_Q_MIN_SURFACES = 3
ContourQNormalization
class
source
ContourQNormalization(exponent: int | None, log_ratio_per_radian: float | None, log_ratio_weber: float | None, separation: float | None, surface_count: int, reason: str = '') -> None
What the contour-q discriminator measured, and what it concluded.
6 fields
exponent: int | Nonelog_ratio_per_radian: float | Nonelog_ratio_weber: float | Noneseparation: float | Nonesurface_count: intreason: str
FLUX_EXPONENT_TOLERANCE
data
FLUX_EXPONENT_TOLERANCE = 0.15
identify_convention — Candidate COCOS indices for an equilibrium, from its observable signs. Reference source
identify_flux_exponent — Decide whether psi is stored in weber or weber per radian, from Ampere’s law. Reference source
vaft.process.coil_operating_space
The common result of a non-axisymmetric coil operating-space study (#1178).
COIL_EXCITATION_CONVENTION
data
COIL_EXCITATION_CONVENTION = <builtins.dict>
CoilOperatingSpace
class
source
CoilOperatingSpace(n: int, groups: tuple[str, ...], samples: Any, values: Any, convention: Mapping[str, str], grid: Mapping[str, Any], provenance: Mapping[str, Mapping[str, Any]] = <factory>, profiles: Mapping[str, Any] = <factory>) -> None
Operating points of K coil groups and the metrics evaluated at each (#1178).
Also exported as vaft.process.CoilOperatingSpace.
8 fields · 3 members
n: intgroups: tuple[str, ...]samples: Anyvalues: Anyconvention: Mapping[str, str]grid: Mapping[str, Any]provenance: Mapping[str, Mapping[str, Any]]profiles: Mapping[str, Any]phasorsmethod —(N, K)excitation phasorsA_g exp(+i delta_g)in sample order [A per turn]. sourcemetricsmethod — The metric names present, in first-appearance order [-]. sourceto_framemethod — Long form: one row per (sample, metric), with the coordinates and relative coordinates. source
OPERATING_SPACE_ROLES
data
OPERATING_SPACE_ROLES = ('scan', 'reference', 'analytic_optimum', 'numerical_optimum', 'gpec_confirmation', 'probe', 'held_out', 'invariance')
OPERATING_SPACE_STATUSES
data
OPERATING_SPACE_STATUSES = ('valid', 'infeasible', 'failed', 'not_computed', 'undefined')
vaft.process.coils_non_axisymmetric
Kernels on non-axisymmetric coil sets: toroidal mode content and vacuum field.
biot_savart_filaments — Vacuum magnetic field of closed polyline filaments at probe points. Reference source
Also exported as vaft.process.biot_savart_filaments.
vaft.process.confinement
Power balance and slice qualification for energy-confinement scaling (vaft #548).
assess_predictor_identifiability — Collinearity of log predictors: correlation, VIF, condition number and rank. Reference source
Also exported as vaft.process.assess_predictor_identifiability.
bootstrap_confinement_scaling — Group (shot) bootstrap of the log-linear scaling coefficients. Reference source
Also exported as vaft.process.bootstrap_confinement_scaling.
closure_constraint — Linear constraint on I, B, P (and n) exponents fixing the Kadomtsev-completed $\mu_\rho$. Reference source
Also exported as vaft.process.closure_constraint.
confinement_exclusion_table — How many slices each quality rule removes, alone and in sequence. Reference source
Also exported as vaft.process.confinement_exclusion_table.
confinement_power_balance — Ohmic heating, stored-energy change, loss powers and confinement times of a discharge. Reference source
Also exported as vaft.process.confinement_power_balance.
confinement_slice_decision — Pass/fail of each slice-quality rule, and their conjunction, for given thresholds. Reference source
Also exported as vaft.process.confinement_slice_decision.
confinement_slice_evidence — Rates and ratios that decide whether a time slice is quasi-stationary enough to fit. Reference source
Also exported as vaft.process.confinement_slice_evidence.
ConfinementPowerBalance
class
source
ConfinementPowerBalance(time: np.ndarray, p_ohmic: np.ndarray, dwdt: np.ndarray, p_net: np.ndarray, p_transport: np.ndarray, tau_e_net: np.ndarray, tau_e_transport: np.ndarray) -> None
Ohmic power balance on one time base, with both loss-power definitions.
Also exported as vaft.process.ConfinementPowerBalance.
7 fields
time: np.ndarrayp_ohmic: np.ndarraydwdt: np.ndarrayp_net: np.ndarrayp_transport: np.ndarraytau_e_net: np.ndarraytau_e_transport: np.ndarray
ConfinementScalingFit
class
source
ConfinementScalingFit(names: tuple, coef: np.ndarray, stderr: np.ndarray, cov: np.ndarray, ci95: np.ndarray, stderr_iid: np.ndarray, n: int, n_groups: int, r2: float, rmse_log: float, residuals: np.ndarray, leverage: np.ndarray, cooks_distance: np.ndarray, mask: np.ndarray, robust: bool) -> None
A log-linear confinement scaling fit with group-aware uncertainty.
Also exported as vaft.process.ConfinementScalingFit.
15 fields · 1 members
names: tuplecoef: np.ndarraystderr: np.ndarraycov: np.ndarrayci95: np.ndarraystderr_iid: np.ndarrayn: intn_groups: intr2: floatrmse_log: floatresiduals: np.ndarrayleverage: np.ndarraycooks_distance: np.ndarraymask: np.ndarrayrobust: boolexponentsmethod — Predictor exponents keyed by name, without the intercept. source
ConfinementSliceEvidence
class
source
ConfinementSliceEvidence(ip_abs: np.ndarray, ip_rate: np.ndarray, ip_change_per_tau: np.ndarray, dwdt_fraction: np.ndarray, finite: np.ndarray) -> None
Per-slice measurements a confinement slice is judged on; no thresholds.
Also exported as vaft.process.ConfinementSliceEvidence.
5 fields
ip_abs: np.ndarrayip_rate: np.ndarrayip_change_per_tau: np.ndarraydwdt_fraction: np.ndarrayfinite: np.ndarray
dimensionless_confinement_indices — Kadomtsev-completed dimensionless indices $(\mu_\rho, \mu_\beta, \mu_\nu, \mu_q)$ with their covariance. Reference source
Also exported as vaft.process.dimensionless_confinement_indices.
fit_confinement_scaling — Log-linear power-law fit $y = C \prod_j x_j^{\alpha_j}$ with errors clustered by group. Reference source
Also exported as vaft.process.fit_confinement_scaling.
fit_confinement_scaling_odr — Errors-in-variables (orthogonal distance) power-law fit in log space. Reference source
Also exported as vaft.process.fit_confinement_scaling_odr.
fit_constrained_confinement_scaling — Log-linear power-law fit under one linear equality constraint on the exponents. Reference source
Also exported as vaft.process.fit_constrained_confinement_scaling.
infer_kadomtsev_size_exponent — Size exponent the Kadomtsev constraint implies for fitted I, B, P (and n) exponents. Reference source
Also exported as vaft.process.infer_kadomtsev_size_exponent.
leave_one_group_out_scaling — Leave-one-group-out refits: coefficient stability and out-of-group prediction error. Reference source
Also exported as vaft.process.leave_one_group_out_scaling.
ObservedConfinement
class
source
ObservedConfinement(tau: np.ndarray, energy_basis_required: str, energy_basis_used: np.ndarray, approximation: Optional[str], reason: Optional[str]) -> None
The observed confinement time a scaling is compared with, and how it was obtained.
Also exported as vaft.process.ObservedConfinement.
5 fields
tau: np.ndarrayenergy_basis_required: strenergy_basis_used: np.ndarrayapproximation: Optional[str]reason: Optional[str]
ohmic_confinement_series — Ohmic power balance and confinement time from a loop voltage, the internal inductance and a stored energy. Reference source
Also exported as vaft.process.ohmic_confinement_series.
OhmicConfinement
class
source
OhmicConfinement(time: np.ndarray, i_p: np.ndarray, v_loop: np.ndarray, dip_dt: np.ndarray, li_3: np.ndarray, dli3_dt: np.ndarray, r0: float, l_int: np.ndarray, v_ind_current: np.ndarray, v_ind_profile: np.ndarray, v_ind: np.ndarray, v_res: np.ndarray, r_p: np.ndarray, li3_rate_fallback: np.ndarray, w: np.ndarray, dwdt: np.ndarray, p_ohmic: np.ndarray, p_net: np.ndarray, p_transport: np.ndarray, tau_e_net: np.ndarray, tau_e_transport: np.ndarray, missing_reason: np.ndarray, orientation: float, settings: Mapping[str, object], assumptions: Mapping[str, str]) -> None
The Ohmic confinement chain of one discharge, every intermediate kept (#1905 Sec. 3.4).
Also exported as vaft.process.OhmicConfinement.
25 fields · 1 members
time: np.ndarrayi_p: np.ndarrayv_loop: np.ndarraydip_dt: np.ndarrayli_3: np.ndarraydli3_dt: np.ndarrayr0: floatl_int: np.ndarrayv_ind_current: np.ndarrayv_ind_profile: np.ndarrayv_ind: np.ndarrayv_res: np.ndarrayr_p: np.ndarrayli3_rate_fallback: np.ndarrayw: np.ndarraydwdt: np.ndarrayp_ohmic: np.ndarrayp_net: np.ndarrayp_transport: np.ndarraytau_e_net: np.ndarraytau_e_transport: np.ndarraymissing_reason: np.ndarrayorientation: floatsettings: Mapping[str, object]assumptions: Mapping[str, str]power_balancemethod — TheConfinementPowerBalanceview of this chain. source
predictor_principal_directions — Principal directions of the log predictors: which exponent combinations the data constrain. Reference source
Also exported as vaft.process.predictor_principal_directions.
resistive_loop_voltage — Inductive and resistive parts of a loop voltage, and the plasma resistance, from the internal inductance. Reference source
Also exported as vaft.process.resistive_loop_voltage.
ResistiveLoopVoltage
class
source
ResistiveLoopVoltage(v_ind: np.ndarray, v_res: np.ndarray, r_p: np.ndarray, l_int: np.ndarray, v_ind_current: Optional[np.ndarray] = None, v_ind_profile: Optional[np.ndarray] = None, li3_rate_fallback: Optional[np.ndarray] = None) -> None
Loop voltage split into its internal-inductive and resistive parts.
Also exported as vaft.process.ResistiveLoopVoltage.
7 fields
v_ind: np.ndarrayv_res: np.ndarrayr_p: np.ndarrayl_int: np.ndarrayv_ind_current: Optional[np.ndarray]v_ind_profile: Optional[np.ndarray]li3_rate_fallback: Optional[np.ndarray]
vaft.process.electromagnetics
Axisymmetric electromagnetic response: what a current does elsewhere, and how the vessel answers.
calc_grid — Assemble the response of every coil and passive loop on a rectangular grid. Reference source
Also exported as vaft.process.calc_grid.
compute_br_bz_phi — Field and flux of one unit-current ring at a set of observation points. Reference source
Also exported as vaft.process.compute_br_bz_phi.
compute_impedance_matrices — Assemble the resistance and inductance matrices of the passive circuit. Reference source
Also exported as vaft.process.compute_impedance_matrices.
compute_mutual_passive_active — Mutual inductance between passive loops and active coils, derived from geometry. Reference source
Also exported as vaft.process.compute_mutual_passive_active.
compute_point_response_matrices — Broadcast response of point sources at observation points, with exact kernels. Reference source
Also exported as vaft.process.compute_point_response_matrices.
compute_response_matrix — Flux and field response at arbitrary observation points, per source. Reference source
Also exported as vaft.process.compute_response_matrix.
compute_response_vector — The same response as the matrix form, with the arguments in the legacy order. Reference source
Also exported as vaft.process.compute_response_vector.
compute_vacuum_fields_1d — Contract current histories with response matrices into field histories. Reference source
Also exported as vaft.process.compute_vacuum_fields_1d.
vaft.process.equilibrium
Axisymmetric equilibrium: from a flux map to the quantities derived from it.
as_equilibrium — Adapt a GEQDSK, ODS, IMAS handle, or native model to one equilibrium record. Reference source
Also exported as vaft.process.as_equilibrium.
calculate_average_boundary_poloidal_field — Contour-length average of the poloidal field around a closed boundary. Reference source
Also exported as vaft.process.calculate_average_boundary_poloidal_field.
calculate_diamagnetism — Diamagnetism from its volume-integral definition. Reference source
Also exported as vaft.process.calculate_diamagnetism.
calculate_q_profile_from_psi — Calculate the safety factor profile q(psi) from a 2D poloidal flux map and F(psi). Reference source
Also exported as vaft.process.calculate_q_profile_from_psi.
calculate_reconstructed_diamagnetic_flux — Diamagnetic flux reconstructed from the equilibrium’s own toroidal field. Reference source
Also exported as vaft.process.calculate_reconstructed_diamagnetic_flux.
check_equilibrium_requirements — Whether an equilibrium carries what a named algorithm needs to run. Reference source
Also exported as vaft.process.check_equilibrium_requirements.
CoilFitResult
class
source
CoilFitResult(coil_names: tuple[str, ...], currents_A: Mapping[str, float], boundary_points_m: np.ndarray, x_points_m: np.ndarray, plasma_psi_Wb: np.ndarray, coil_psi_Wb: np.ndarray, plasma_br_T: np.ndarray, plasma_bz_T: np.ndarray, coil_br_T: np.ndarray, coil_bz_T: np.ndarray, residuals: Mapping[str, np.ndarray], rms_relative_flux: float, max_relative_flux: float, rms_normal_field_T: float | None, max_saddle_field_T: float | None, singular_values: np.ndarray, rank: int, condition_number: float, regularization_norm: float, active_bounds: tuple[str, ...], bounds_complete: bool, integrated_ip_A: float, plasma_current_rel_error: float | None, optimizer_success: bool, accepted: bool, status: str) -> None
A direct inverse fit; flux fields are Wb, fields T, currents A.
Also exported as vaft.process.CoilFitResult.
26 fields
coil_names: tuple[str, ...]currents_A: Mapping[str, float]boundary_points_m: np.ndarrayx_points_m: np.ndarrayplasma_psi_Wb: np.ndarraycoil_psi_Wb: np.ndarrayplasma_br_T: np.ndarrayplasma_bz_T: np.ndarraycoil_br_T: np.ndarraycoil_bz_T: np.ndarrayresiduals: Mapping[str, np.ndarray]rms_relative_flux: floatmax_relative_flux: floatrms_normal_field_T: float | Nonemax_saddle_field_T: float | Nonesingular_values: np.ndarrayrank: intcondition_number: floatregularization_norm: floatactive_bounds: tuple[str, ...]bounds_complete: boolintegrated_ip_A: floatplasma_current_rel_error: float | Noneoptimizer_success: boolaccepted: boolstatus: str
compare_contours — How far apart two closed contours are, point to curve. Reference source
Also exported as vaft.process.compare_contours.
computed_diamagnetism_from_phi — EFIT-style diamagnetism from an already-computed diamagnetic flux. Reference source
Also exported as vaft.process.computed_diamagnetism_from_phi.
connection_length_map — Connection length of the field line through each of many starting points. Reference source
Also exported as vaft.process.connection_length_map.
contour_shape_parameters — Shape parameters of one closed flux-surface contour. Reference source
Also exported as vaft.process.contour_shape_parameters.
contour_shaping_observables — Model-independent shaping observables of one closed contour: indentation and asymmetry. Reference source
Also exported as vaft.process.contour_shaping_observables.
convert_cocos — Convert an equilibrium between two explicitly known COCOS conventions. Reference source
Also exported as vaft.process.convert_cocos.
current_centroid — Total toroidal current and its centroid, from a gridded current density. Reference source
Also exported as vaft.process.current_centroid.
current_covariance — Second central moment tensor of a gridded current density. Reference source
Also exported as vaft.process.current_covariance.
current_moment — One moment integral (R - R_0)**p (Z - Z_0)**q J_phi dA of a gridded current density. Reference source
Also exported as vaft.process.current_moment.
DCON_JACOBIAN_ANGLE_WEIGHTS
data
DCON_JACOBIAN_ANGLE_WEIGHTS = <builtins.mappingproxy>
derive_boundary_representation — Classify the plasma boundary and derive its geometric diagnostics. Reference source
Also exported as vaft.process.derive_boundary_representation.
derive_current_moments — Reduce an equilibrium’s toroidal current density to its low-order moments. Reference source
Also exported as vaft.process.derive_current_moments.
derive_global_descriptors — Global scalar descriptors of one equilibrium, each with its derivation record. Reference source
Also exported as vaft.process.derive_global_descriptors.
derive_radial_coordinates — The three normalized radial coordinates, each with its derivation record. Reference source
Also exported as vaft.process.derive_radial_coordinates.
efit_virial_volume_integrals — EFIT-style weighted volume integrals for the virial closures. Reference source
Also exported as vaft.process.efit_virial_volume_integrals.
ejiri_mirror_geometry — Ejiri mirror-confinement proxy for one magnetic snapshot. Reference source
Also exported as vaft.process.ejiri_mirror_geometry.
equilibrium_field_on_grid — (B_R, B_Z, B_phi) on the whole (R, Z) grid, each (nR, nZ). Reference source
Also exported as vaft.process.equilibrium_field_on_grid.
evaluate_fourier_surface — Points on a Fourier-represented flux surface at given arc-length angles. Reference source
Also exported as vaft.process.evaluate_fourier_surface.
evaluate_guazzotto_freidberg — Normalized flux and its analytic derivatives of a Guazzotto-Freidberg equilibrium. Reference source
Also exported as vaft.process.evaluate_guazzotto_freidberg.
evaluate_miller — Points on a Miller-parameterized flux surface at given poloidal angles. Reference source
Also exported as vaft.process.evaluate_miller.
evaluate_mxh_chebyshev — Flux-surface points of an MXH-Chebyshev representation. Reference source
Also exported as vaft.process.evaluate_mxh_chebyshev.
evaluate_solovev — Evaluate an analytic Solov’ev equilibrium on a set of points. Reference source
Also exported as vaft.process.evaluate_solovev.
extract_flux_surface_contours — Iso-flux contours at requested normalized levels, by marching squares. Reference source
Also exported as vaft.process.extract_flux_surface_contours.
find_rational_surfaces — Where a toroidal mode resonates: the surfaces with q = m / n. Reference source
Also exported as vaft.process.find_rational_surfaces.
find_stationary_points — Locate the O-points and saddles of psi to sub-grid accuracy. Reference source
Also exported as vaft.process.find_stationary_points.
fit_fourier_surface — Represent one closed flux-surface contour as a truncated Fourier series. Reference source
Also exported as vaft.process.fit_fourier_surface.
fit_fourier_surface_sequence — Represent a sequence of internal flux surfaces as Fourier series. Reference source
Also exported as vaft.process.fit_fourier_surface_sequence.
fit_free_boundary_coils — Fit physical PF circuit currents to a prescribed LCFS in free space. Reference source
Also exported as vaft.process.fit_free_boundary_coils.
fit_miller_sequence — Fit Miller parameters across a sequence of flux surfaces, with radial derivatives. Reference source
Also exported as vaft.process.fit_miller_sequence.
fit_miller_surface — Fit the Miller shape parameters to one closed flux-surface contour. Reference source
Also exported as vaft.process.fit_miller_surface.
fit_mxh_chebyshev — Represent an equilibrium’s flux surfaces by MXH shapes with Chebyshev radial profiles. Reference source
Also exported as vaft.process.fit_mxh_chebyshev.
fit_solovev — Represent an equilibrium by the Solov’ev solution closest to its flux map. Reference source
Also exported as vaft.process.fit_solovev.
FLUX_SURFACE_QUANTITIES
data
FLUX_SURFACE_QUANTITIES = ('gm1', 'gm5', 'gm8', 'gm9', 'dvolume_dpsi', 'darea_dpsi', 'volume', 'area', 'surface', 'elongation', 'triangularity_...
flux_surface_quantities — Flux-surface averages and shape parameters on each normalized flux level. Reference source
Also exported as vaft.process.flux_surface_quantities.
fractional_cell_weights_from_boundary — Fractional area of each grid cell that lies inside the plasma boundary. Reference source
Also exported as vaft.process.fractional_cell_weights_from_boundary.
grad_shafranov_operator — The Grad-Shafranov elliptic operator on a rectangular grid. Reference source
Also exported as vaft.process.grad_shafranov_operator.
grad_shafranov_residual — How far an equilibrium is from satisfying its own force balance, surface by surface. Reference source
Also exported as vaft.process.grad_shafranov_residual.
grad_shafranov_residual_modes — Project the Grad-Shafranov residual onto poloidal harmonics on nested flux surfaces. Reference source
Also exported as vaft.process.grad_shafranov_residual_modes.
GradShafranovResidual
class
source
GradShafranovResidual(psi_norm: np.ndarray, residual: np.ndarray, relative: np.ndarray, scale: float, delta_star: np.ndarray, source: np.ndarray, mask: np.ndarray) -> None
How far an equilibrium is from satisfying force balance, surface by surface.
Also exported as vaft.process.GradShafranovResidual.
7 fields
psi_norm: numpy.ndarrayresidual: numpy.ndarrayrelative: numpy.ndarrayscale: floatdelta_star: numpy.ndarraysource: numpy.ndarraymask: numpy.ndarray
guazzotto_freidberg_parameters — The dimensionless plasma parameters of Section 6 for a Guazzotto-Freidberg equilibrium. Reference source
Also exported as vaft.process.guazzotto_freidberg_parameters.
guazzotto_freidberg_to_equilibrium — Export a Guazzotto-Freidberg equilibrium as a gridded record in physical units. Reference source
Also exported as vaft.process.guazzotto_freidberg_to_equilibrium.
integrate_romero_closure — Integrate Romero’s first-order closure from a boundary-voltage history. Reference source
Also exported as vaft.process.integrate_romero_closure.
lab_to_straight_field_line — Relabel a geometric poloidal angle into the straight-field-line one. Reference source
Also exported as vaft.process.lab_to_straight_field_line.
make_equilibrium_field_interpolator — Build a callable giving the full magnetic field anywhere on one time slice. Reference source
Also exported as vaft.process.make_equilibrium_field_interpolator.
make_vacuum_field_interpolator — Build a callable giving the vacuum magnetic field anywhere on one grid. Reference source
Also exported as vaft.process.make_vacuum_field_interpolator.
miller_surfaces — A family of Miller surfaces for a shape scan. Reference source
Also exported as vaft.process.miller_surfaces.
MIN_ANNULUS_CELLS
data
MIN_ANNULUS_CELLS = 16.0
MIN_FLUX_SURFACE_POINTS
data
MIN_FLUX_SURFACE_POINTS = 16
parallel_current_from_toroidal — Convert a shell toroidal driven current to the IMAS parallel current. Reference source
Also exported as vaft.process.parallel_current_from_toroidal.
ParallelCurrentResult
class
source
ParallelCurrentResult(j_parallel: np.ndarray, current_parallel_inside: Optional[np.ndarray], lambda_: np.ndarray, b_phi_area_integral: np.ndarray, shell_current_tor: np.ndarray) -> None
Parallel current density derived from an enclosed toroidal current.
Also exported as vaft.process.ParallelCurrentResult.
5 fields
j_parallel: numpy.ndarraycurrent_parallel_inside: numpy.ndarray | Nonelambda_: numpy.ndarrayb_phi_area_integral: numpy.ndarrayshell_current_tor: numpy.ndarray
pest_angle_from_jacobian_angle — Relabel a DCON flux-surface angle into the PEST angle, from R alone. Reference source
Also exported as vaft.process.pest_angle_from_jacobian_angle.
plasma_cell_weights — Fraction of each grid cell that is plasma, from the boundary outline when there is one. Reference source
Also exported as vaft.process.plasma_cell_weights.
poloidal_field_at_boundary — Poloidal field on a boundary contour, from the flux map by bicubic spline. Reference source
Also exported as vaft.process.poloidal_field_at_boundary.
prepare_boundary_for_shafranov — Condition a boundary contour into the form the Shafranov integrals require. Reference source
Also exported as vaft.process.prepare_boundary_for_shafranov.
psi_to_radial — Inboard and outboard major radius of each flux value, along the axis row. Reference source
Also exported as vaft.process.psi_to_radial.
psi_to_rho — Normalized toroidal-flux radius at one poloidal flux value, by integrating q. Reference source
Also exported as vaft.process.psi_to_rho.
psi_to_rz — Map a flux-surface profile onto the two-dimensional grid through psi. Reference source
Also exported as vaft.process.equilibrium.psi_to_RZ, vaft.process.psi_to_RZ, vaft.process.psi_to_rz.
r_at_z_extremum — Major radius where a contour reaches its highest or lowest point. Reference source
Also exported as vaft.process.r_at_z_extremum.
radial_to_psi — Poloidal flux at a major radius on the midplane row of the flux map. Reference source
Also exported as vaft.process.radial_to_psi.
RATIONAL_SURFACE_ABSENT
data
RATIONAL_SURFACE_ABSENT = 'absent'
RATIONAL_SURFACE_PRESENT
data
RATIONAL_SURFACE_PRESENT = 'present'
RATIONAL_SURFACE_RTOL
data
RATIONAL_SURFACE_RTOL = 1e-09
rational_surfaces — Every flux surface where the safety factor takes a requested rational value. Reference source
Also exported as vaft.process.rational_surfaces.
RationalSurface
class
source
RationalSurface(q_target: float, harmonics: tuple[tuple[int, int], ...], requested_q: bool, status: str, roots: tuple[RationalSurfaceRoot, ...], method: str = 'linear interpolation of |q| - q_target between bracketing samples') -> None
Every surface of one requested rational value, and who asked for it.
Also exported as vaft.process.RationalSurface.
6 fields · 1 members
q_target: floatharmonics: tuple[tuple[int, int], ...]requested_q: boolstatus: strroots: tuple[vaft.process.equilibrium.RationalSurfaceRoot, ...]method: strpresentproperty — Whether the profile reachesq_targetanywhere. source
RationalSurfaceRoot
class
source
RationalSurfaceRoot(psi_norm: float, rho_pol_norm: float | None, rho_tor_norm: float | None, root_index: int) -> None
One flux surface where |q| equals a requested value.
Also exported as vaft.process.RationalSurfaceRoot.
4 fields
psi_norm: floatrho_pol_norm: float | Nonerho_tor_norm: float | Noneroot_index: int
resistive_layer_at — Resistivity and mass density at flux surfaces someone else located. Reference source
Also exported as vaft.process.resistive_layer_at.
resistive_layer_parameters — Resistivity and mass density at each rational surface of a toroidal mode. Reference source
Also exported as vaft.process.resistive_layer_parameters.
rho_to_psi — Poloidal flux at one normalized toroidal-flux radius, by root finding. Reference source
Also exported as vaft.process.rho_to_psi.
romero_flux_balance — Romero’s exact voltage and volt-second balance over a sampled discharge. Reference source
Also exported as vaft.process.romero_flux_balance.
scale_boundary_conformal — Scale a closed boundary about a centre, giving a contour conformal to it. Reference source
Also exported as vaft.process.scale_boundary_conformal.
shafranov_integrals — The three Shafranov boundary integrals and the virial coefficient. Reference source
Also exported as vaft.process.shafranov_integrals.
solovev_example — Build a shaped analytic Solov’ev equilibrium in a chosen boundary topology. Reference source
Also exported as vaft.process.solovev_example.
solovev_shape_constraints — The Cerfon-Freidberg boundary conditions for a shaped, possibly diverted, plasma. Reference source
Also exported as vaft.process.solovev_shape_constraints.
solovev_to_equilibrium — Export an analytic Solov’ev model as a gridded equilibrium record. Reference source
Also exported as vaft.process.solovev_to_equilibrium.
solovev_xpoint_constraints — The three conditions that make a point an X-point on the boundary flux surface. Reference source
Also exported as vaft.process.solovev_xpoint_constraints.
solve_guazzotto_freidberg — Solve the Guazzotto-Freidberg analytic equilibrium for a shape and a beta parameter. Reference source
Also exported as vaft.process.solve_guazzotto_freidberg.
solve_solovev_constraints — Solve for the Solov’ev coefficients that satisfy a set of geometric constraints. Reference source
Also exported as vaft.process.solve_solovev_constraints.
straight_field_line_angle_on_grid — The PEST straight-field-line angle on every node of a flux map. Reference source
Also exported as vaft.process.straight_field_line_angle_on_grid.
straight_field_line_map — The PEST straight-field-line poloidal angle of a flux map, built once. Reference source
Also exported as vaft.process.straight_field_line_map.
straight_field_line_tables — Per-surface tables taking the geometric poloidal angle to the code’s own. Reference source
Also exported as vaft.process.straight_field_line_tables.
StraightFieldLineMap
class
source
StraightFieldLineMap(spline, psi_axis, psi_boundary, magnetic_axis, x_levels, theta, rho, nu, rho_boundary)
The PEST straight-field-line angle of one flux map, evaluable anywhere.
Also exported as vaft.process.StraightFieldLineMap.
8 members
outboard_radiusmethod — Major radius where each normalized flux surface crosses the outboard midplane [m]. sourcepsimethod — Flux at the points, from the bicubic spline [flux unit of the map]. sourcepsi_normmethod — Normalized flux at the points [-]. sourcegrad_psimethod —|grad psi|at the points [flux unit per metre]. sourcegeometric_anglemethod —atan2(z - z_axis, r - r_axis)wrapped to[0, 2 pi)[rad]. sourceinsidemethod — True inside the boundary surface, measured along the axis ray [bool]. sourcetheta_starmethod — Straight-field-line angle in[0, 2 pi); NaN outside the boundary [rad]. sourcesurfacemethod — One flux surface on the geometric-angle grid, solved exactly. source
trace_field_line — Trace one magnetic field line through the equilibrium field. Reference source
Also exported as vaft.process.trace_field_line.
validate_equilibrium Deprecated — Deprecated compatibility wrapper for check_equilibrium_requirements. Reference source
Also exported as vaft.process.validate_equilibrium.
virial_alpha_conformal_annulus — Virial closure coefficient from a thin annulus conformal to the LCFS. Reference source
Also exported as vaft.process.virial_alpha_conformal_annulus.
vaft.process.field_line_topology
Relative heat-load proxies from field-line tracing products (issue #1099).
CONNECTION_LENGTH_FORMS
data
CONNECTION_LENGTH_FORMS = ('inverse', 'exponential', 'none')
CONNECTION_LENGTH_REDUCTIONS
data
CONNECTION_LENGTH_REDUCTIONS = ('shortest', 'total')
connection_length_weight — Parallel-loss weight from a field line’s connection length. Reference source
Also exported as vaft.process.connection_length_weight.
footprint_heat_load_proxy — A relative heat-load proxy over a divertor target’s footprint grid. Reference source
Also exported as vaft.process.footprint_heat_load_proxy.
footprint_incident_total — The proxy integrated over one target. Reference source
Also exported as vaft.process.footprint_incident_total.
footprint_proxy_model — One named footprint proxy model. Reference source
Also exported as vaft.process.footprint_proxy_model.
FOOTPRINT_PROXY_MODELS
data
FOOTPRINT_PROXY_MODELS = <builtins.dict>
FootprintProxy
class
source
FootprintProxy(density: np.ndarray, area: np.ndarray, flux_weight: np.ndarray, incidence: np.ndarray, connection_weight: np.ndarray, model: FootprintProxyModel, incidence_applied: bool) -> None
One relative footprint proxy and the factors it was built from.
Also exported as vaft.process.FootprintProxy.
7 fields · 2 members
density: np.ndarrayarea: np.ndarrayflux_weight: np.ndarrayincidence: np.ndarrayconnection_weight: np.ndarraymodel: FootprintProxyModelincidence_applied: boolrelativeproperty — The proxy scaled to a peak of one; a map with no peak stays zero [-]. sourcedescribemethod — Model and incidence choice as one line, for a provenance record. source
FootprintProxyModel
class
source
FootprintProxyModel(name: str, decay_width: float, separatrix_flux: float, connection_length_scale: float, connection_length_form: str, connection_length_reduction: str, clip_inside: bool) -> None
The coefficients one relative footprint proxy is built from.
Also exported as vaft.process.FootprintProxyModel.
7 fields · 1 members
name: strdecay_width: floatseparatrix_flux: floatconnection_length_scale: floatconnection_length_form: strconnection_length_reduction: strclip_inside: booldescribemethod — The model as one line, for a provenance record. source
incidence_factor — The projection of a field line onto the surface it strikes. Reference source
Also exported as vaft.process.incidence_factor.
reduce_traced_directions — Reduce a quantity traced in both directions to one value per line. Reference source
Also exported as vaft.process.reduce_traced_directions.
target_incident_fractions — Each target’s share of the proxy incident on all of them. Reference source
Also exported as vaft.process.target_incident_fractions.
toroidal_surface_cell_areas — Area of every quadrilateral cell of a surface mesh in (R, z, phi). Reference source
Also exported as vaft.process.toroidal_surface_cell_areas.
vaft.process.fluctuation
Diagnostic-independent spectral analysis of scalar fluctuation time series.
analyze_fluctuation_spectrum — Run the spectral chain on one signal: density, then whatever else was asked for. Reference source
Also exported as vaft.process.analyze_fluctuation_spectrum.
coherent_components — Decompose PSD-normalized matrices into coherent spectral components. Reference source
Also exported as vaft.process.coherent_components.
CoherentComponents
class
source
CoherentComponents(time: np.ndarray, frequency: np.ndarray, names: tuple[str, ...], sources: tuple[str | None, ...], reference: str, eigenvalues: np.ndarray, eigenvectors: np.ndarray, dominant_power: np.ndarray, coherent_fraction: np.ndarray, participation: np.ndarray, phase: np.ndarray, n_diagnostics: np.ndarray, component_defined: np.ndarray, normalization: str) -> None
Eigensystem and dominant spectral component, without mode identification.
Also exported as vaft.process.CoherentComponents.
14 fields
time: numpy.ndarrayfrequency: numpy.ndarraynames: tuple[str, ...]sources: tuple[str | None, ...]reference: streigenvalues: numpy.ndarrayeigenvectors: numpy.ndarraydominant_power: numpy.ndarraycoherent_fraction: numpy.ndarrayparticipation: numpy.ndarrayphase: numpy.ndarrayn_diagnostics: numpy.ndarraycomponent_defined: numpy.ndarraynormalization: str
compute_band_power — Integrate spectral power over named frequency bands, and optionally their ratios. Reference source
Also exported as vaft.process.compute_band_power.
compute_psd — One-sided power spectral density by Welch’s method. Reference source
Also exported as vaft.process.compute_psd.
compute_spectrogram — Short-time Fourier magnitude map of a fluctuation signal. Reference source
Also exported as vaft.process.compute_spectrogram.
cross_spectral_matrix — Estimate an arbitrary-N time-resolved cross-spectral matrix. Reference source
Also exported as vaft.process.cross_spectral_matrix.
cross_spectrogram — Time-resolved cross-spectrum, coherence and y-relative-to-x phase. Reference source
Also exported as vaft.process.cross_spectrogram.
cross_spectrum — Cross-spectral density, coherence and relative phase of two fluctuation records. Reference source
Also exported as vaft.process.cross_spectrum.
CrossSpectralMatrix
class
source
CrossSpectralMatrix(time: np.ndarray, frequency: np.ndarray, names: tuple[str, ...], units: tuple[str, ...], sources: tuple[str | None, ...], raw_csd: np.ndarray, matrix: np.ndarray, raw_valid: np.ndarray, valid: np.ndarray, shared_segments: np.ndarray, normalization: str, normalization_scales: tuple[float, ...] | None, sample_rate: float, time_range: tuple[float, float], nperseg: int, segments_per_window: int, window_step_samples: int, frequency_resolution_hz: float, window_duration_s: float, window: str, detrend: str | bool, resampling: tuple[ResamplingProvenance, ...]) -> None
One-sided spectral matrices indexed by (frequency, time, i, j).
Also exported as vaft.process.CrossSpectralMatrix.
22 fields
time: numpy.ndarrayfrequency: numpy.ndarraynames: tuple[str, ...]units: tuple[str, ...]sources: tuple[str | None, ...]raw_csd: numpy.ndarraymatrix: numpy.ndarrayraw_valid: numpy.ndarrayvalid: numpy.ndarrayshared_segments: numpy.ndarraynormalization: strnormalization_scales: tuple[float, ...] | Nonesample_rate: floattime_range: tuple[float, float]nperseg: intsegments_per_window: intwindow_step_samples: intfrequency_resolution_hz: floatwindow_duration_s: floatwindow: strdetrend: str | boolresampling: tuple[vaft.process.fluctuation.ResamplingProvenance, ...]
CrossSpectrogram
class
source
CrossSpectrogram(time: np.ndarray, frequency: np.ndarray, csd: np.ndarray, coherence: np.ndarray, phase: np.ndarray, psd_x: np.ndarray, psd_y: np.ndarray, sample_rate: float, time_range: tuple[float, float], nperseg: int, segments_per_window: int, window_step_samples: int, frequency_resolution_hz: float, window_duration_s: float, window: str, detrend: str | bool, common_bandwidth_hz: float, bandwidth_source: tuple[str, str], units_x: str, units_y: str, resampling: tuple[ResamplingProvenance, ResamplingProvenance]) -> None
Locally Welch-averaged, one-sided pair spectra on the shot timebase.
Also exported as vaft.process.CrossSpectrogram.
21 fields · 2 members
time: numpy.ndarrayfrequency: numpy.ndarraycsd: numpy.ndarraycoherence: numpy.ndarrayphase: numpy.ndarraypsd_x: numpy.ndarraypsd_y: numpy.ndarraysample_rate: floattime_range: tuple[float, float]nperseg: intsegments_per_window: intwindow_step_samples: intfrequency_resolution_hz: floatwindow_duration_s: floatwindow: strdetrend: str | boolcommon_bandwidth_hz: floatbandwidth_source: tuple[str, str]units_x: strunits_y: strresampling: tuple[vaft.process.fluctuation.ResamplingProvenance, vaft.process.fluctuation.ResamplingProvenance]cross_spectral_densityproperty — Descriptive alias forcsd. sourceresampledproperty — Names of inputs whose samples were projected onto another grid. source
CrossSpectrum
class
source
CrossSpectrum(frequency: np.ndarray, csd: np.ndarray, coherence: np.ndarray, phase: np.ndarray, n_segments: int, significance_95: float, sample_rate: float, time_range: tuple[float, float], nperseg: int, noverlap: int, resampled: tuple[str, ...] = ()) -> None
Cross-spectral density, coherence and phase of two records on one grid.
Also exported as vaft.process.CrossSpectrum.
11 fields
frequency: numpy.ndarraycsd: numpy.ndarraycoherence: numpy.ndarrayphase: numpy.ndarrayn_segments: intsignificance_95: floatsample_rate: floattime_range: tuple[float, float]nperseg: intnoverlap: intresampled: tuple[str, ...]
find_spectral_break — Fit a two-regime power law, below and above a break frequency. Reference source
Also exported as vaft.process.find_spectral_break.
fit_power_law_spectrum — Fit a power law to a spectrum over an explicitly chosen band. Reference source
Also exported as vaft.process.fit_power_law_spectrum.
FluctuationRecord
class
source
FluctuationRecord(name: str, time: np.ndarray, data: np.ndarray, units: str = 'signal', usable_bandwidth_hz: float | None = None, source: str | None = None) -> None
One named scalar input with optional channel/ROI selection provenance.
Also exported as vaft.process.FluctuationRecord.
6 fields
name: strtime: numpy.ndarraydata: numpy.ndarrayunits: strusable_bandwidth_hz: float | Nonesource: str | None
FluctuationSpectrogram
class
source
FluctuationSpectrogram(time: np.ndarray, frequency: np.ndarray, magnitude: np.ndarray) -> None
Time-frequency magnitude map.
Also exported as vaft.process.FluctuationSpectrogram.
3 fields
time: numpy.ndarrayfrequency: numpy.ndarraymagnitude: numpy.ndarray
FluctuationSpectrum
class
source
FluctuationSpectrum(frequency: np.ndarray, psd: np.ndarray, sample_rate: float, method: str = 'welch', units: str = 'signal**2/Hz', fits: tuple[SpectralFit, ...] = (), spectral_break: SpectralBreak | None = None, band_power: Mapping[str, float] = <factory>) -> None
A PSD plus whatever fits, break and band powers the caller asked for.
Also exported as vaft.process.FluctuationSpectrum.
8 fields
frequency: numpy.ndarraypsd: numpy.ndarraysample_rate: floatmethod: strunits: strfits: tuple[vaft.process.fluctuation.SpectralFit, ...]spectral_break: vaft.process.fluctuation.SpectralBreak | Noneband_power: Mapping[str, float]
FrequencyTrack
class
source
FrequencyTrack(time: np.ndarray, frequency: np.ndarray, power: np.ndarray)
A tracked ridge: one frequency and magnitude per window, NaN where none.
Also exported as vaft.process.FrequencyTrack.
ResamplingProvenance
class
source
ResamplingProvenance(record: str, source_rate: float, target_rate: float, operation: str, anti_alias_cutoff_hz: float | None, usable_bandwidth_hz: float, bandwidth_source: str) -> None
How one input was placed on the common grid (rates and cutoffs in Hz).
Also exported as vaft.process.ResamplingProvenance.
7 fields
record: strsource_rate: floattarget_rate: floatoperation: stranti_alias_cutoff_hz: float | Noneusable_bandwidth_hz: floatbandwidth_source: str
SpectralBreak
class
source
SpectralBreak(alpha_low: float, alpha_high: float, break_frequency: float, r_squared: float, mode: str, low_fit: SpectralFit, high_fit: SpectralFit) -> None
Two-regime power-law fit with a break frequency separating the regimes.
Also exported as vaft.process.SpectralBreak.
7 fields
alpha_low: floatalpha_high: floatbreak_frequency: floatr_squared: floatmode: strlow_fit: vaft.process.fluctuation.SpectralFithigh_fit: vaft.process.fluctuation.SpectralFit
SpectralFit
class
source
SpectralFit(alpha: float, intercept: float, r_squared: float, frequency_range: tuple[float, float], n_points: int, stderr: float, residuals: np.ndarray) -> None
One power-law fit S(f) = 10**intercept * f**alpha over a frequency range.
Also exported as vaft.process.SpectralFit.
7 fields
alpha: floatintercept: floatr_squared: floatfrequency_range: tuple[float, float]n_points: intstderr: floatresiduals: numpy.ndarray
vaft.process.gyrokinetic_comparison
Four independent scientific comparison axes, reusable outside rendering.
assess_comparison — Assess signatures grouped by display/state/model/qualification. Reference source
Also exported as vaft.process.assess_comparison, vaft.process.gyrokinetics.assess_comparison.
ComparisonAssessment
class
source
ComparisonAssessment(intent: str, axes: Mapping[str, Mapping[str, Any]]) -> None
Also exported as vaft.process.ComparisonAssessment, vaft.process.gyrokinetics.ComparisonAssessment.
2 fields · 1 members
intent: straxes: collections.abc.Mapping[str, collections.abc.Mapping[str, typing.Any]]arithmetic_compatibleproperty source
local_result_signature — Non-mutating IMAS signature with explicit missing physical/provenance evidence. Reference source
Also exported as vaft.process.gyrokinetics.local_result_signature, vaft.process.local_result_signature.
vaft.process.gyrokinetics
Turbulence–zonal-flow diagnostics of gyrokinetic time series and the predator–prey fit (issue #1820).
field_transport_contributions — Signed field totals and fractions; cancellation is explicit, never clipped. Reference source
Also exported as vaft.process.field_transport_contributions.
fit_predator_prey_model — Fit the two-variable Lotka–Volterra model to turbulence and zonal-flow traces. Reference source
Also exported as vaft.process.fit_predator_prey_model.
predator_prey_cycle_metrics — Cycle observables of a turbulence / zonal-flow pair: periods, peak lag, correlation lag. Reference source
Also exported as vaft.process.predator_prey_cycle_metrics.
PredatorPreyCycleMetrics
class
source
PredatorPreyCycleMetrics(n_cycles: int, turbulence_peak_times: np.ndarray, zonal_peak_times: np.ndarray, periods: np.ndarray, peak_response_lags: np.ndarray, period_mean: float, period_std: float, peak_response_lag_mean: float, peak_response_lag_std: float, correlation_lag: float, correlation_lags: np.ndarray, cross_correlation: np.ndarray, qualified: bool, reasons: tuple[str, ...], transport_cycles: Optional[dict] = None) -> None
Cycle-level observables of a turbulence / zonal-flow pair of traces.
Also exported as vaft.process.PredatorPreyCycleMetrics.
15 fields
n_cycles: intturbulence_peak_times: np.ndarrayzonal_peak_times: np.ndarrayperiods: np.ndarraypeak_response_lags: np.ndarrayperiod_mean: floatperiod_std: floatpeak_response_lag_mean: floatpeak_response_lag_std: floatcorrelation_lag: floatcorrelation_lags: np.ndarraycross_correlation: np.ndarrayqualified: boolreasons: tuple[str, ...]transport_cycles: Optional[dict]
PredatorPreyFit
class
source
PredatorPreyFit(gamma_eff: float, coupling_suppression: float, coupling_drive: float, gamma_zonal: float, turbulence_fit: np.ndarray, zonal_fit: np.ndarray, rms_turbulence: float, rms_zonal: float, success: bool, reasons: tuple[str, ...], time_window: tuple[float, float], normalization: dict = <factory>, initial_state: tuple[float, float] = (nan, nan), method: str = 'trajectory', r2_turbulence: float = nan, r2_zonal: float = nan, warnings: tuple[str, ...] = ()) -> None
Lotka–Volterra coefficients fitted to a turbulence / zonal-flow pair.
Also exported as vaft.process.PredatorPreyFit.
17 fields
gamma_eff: floatcoupling_suppression: floatcoupling_drive: floatgamma_zonal: floatturbulence_fit: np.ndarrayzonal_fit: np.ndarrayrms_turbulence: floatrms_zonal: floatsuccess: boolreasons: tuple[str, ...]time_window: tuple[float, float]normalization: dictinitial_state: tuple[float, float]method: strr2_turbulence: floatr2_zonal: floatwarnings: tuple[str, ...]
radial_correlation_from_spectrum — Cosine autocorrelation 1/e crossing and integral scale; unresolved is a bound. Reference source
Also exported as vaft.process.radial_correlation_from_spectrum.
rebin_contributions — Conserve signed flux using piecewise-uniform density within audited bins. Reference source
Also exported as vaft.process.rebin_contributions.
reconstruct_field — Reconstruct CGYRO’s half-sum Re phi exp(+ikxx-iky*y). Reference source
Also exported as vaft.process.reconstruct_field.
reduce_time_series — Time-weighted window reduction with explicit coverage and independent evidence. Reference source
Also exported as vaft.process.reduce_time_series.
saturated_intensity — TGLF moment intensity = QL intensity weight * saturated phi intensity. Reference source
Also exported as vaft.process.saturated_intensity.
SpatialField
class
source
SpatialField(x: np.ndarray, y: np.ndarray, values: np.ndarray, metadata: Mapping[str, Any]) -> None
One local saved-theta plane; values are native CGYRO potential units.
Also exported as vaft.process.SpatialField.
4 fields
x: np.ndarrayy: np.ndarrayvalues: np.ndarraymetadata: Mapping[str, Any]
spectral_integral — Integrate signed bin contributions or densities with explicit bin edges. Reference source
Also exported as vaft.process.spectral_integral.
time_window_average — Average aligned scalar or multi-channel histories with the shared gap policy. Reference source
Also exported as vaft.process.time_window_average.
zonal_fraction — I_Z/(I_Z+I_T); all-zero intensity is undefined, not zero. Reference source
Also exported as vaft.process.zonal_fraction.
zonal_shear_proxy — Spectral proxies for the zonal-flow energy and the zonal shear. Reference source
Also exported as vaft.process.zonal_shear_proxy.
zonal_turbulence_intensity — Split fluctuation intensity into its zonal ($k_y = 0$) and non-zonal parts. Reference source
Also exported as vaft.process.zonal_turbulence_intensity.
ZonalShearProxy
class
source
ZonalShearProxy(flow: np.ndarray, shear: np.ndarray, normalization: str) -> None
Spectral zonal-flow and zonal-shear proxies per time sample.
Also exported as vaft.process.ZonalShearProxy.
3 fields
flow: np.ndarrayshear: np.ndarraynormalization: str
ZonalTurbulenceIntensity
class
source
ZonalTurbulenceIntensity(turbulence: np.ndarray, zonal: np.ndarray, ratio: np.ndarray, weighting: str) -> None
Zonal and non-zonal potential intensity per time sample.
Also exported as vaft.process.ZonalTurbulenceIntensity.
4 fields · 1 members
turbulence: np.ndarrayzonal: np.ndarrayratio: np.ndarrayweighting: strfractionproperty source
vaft.process.impa
Generic algorithms for the VEST Internal Magnetic Probe Array.
find_tf_calibration_window — Find the interval where the toroidal field alone drives the probes. Reference source
Also exported as vaft.process.find_tf_calibration_window.
fit_impa_crosstalk — Fit the toroidal-field bleed into each vertical sensor. Reference source
Also exported as vaft.process.fit_impa_crosstalk.
fit_impa_geometry — Self-calibrate the array’s radial position from the toroidal-field profile. Reference source
Also exported as vaft.process.fit_impa_geometry.
fit_impa_tf_coupling — Fit each probe’s coupling to the toroidal field, at known radii. Reference source
Also exported as vaft.process.fit_impa_tf_coupling.
grade_impa_quality — Grade whether an array’s measurements can be trusted, and say why not. Reference source
Also exported as vaft.process.grade_impa_quality.
impa_calibrate_signals — Filter, scale and baseline raw probe records into field units. Reference source
Also exported as vaft.process.impa_calibrate_signals.
IMPA_CHANNEL_COUNT
data
IMPA_CHANNEL_COUNT = 8
impa_lowpass — Zero-phase low pass reproducing the legacy filter design. Reference source
Also exported as vaft.process.impa_lowpass.
ImpaCouplingFit
class
source
ImpaCouplingFit(alpha: np.ndarray, beta: np.ndarray, tilt_deg: np.ndarray, coupling_ratio: np.ndarray, rmse: np.ndarray, nrmse: np.ndarray, r_squared: np.ndarray, residual_trend: np.ndarray, n_samples: int, bound_hit: np.ndarray, method: str = 'linear_regression') -> None
Per-channel TF coupling from a multi-sample regression.
Also exported as vaft.process.ImpaCouplingFit.
11 fields
alpha: np.ndarraybeta: np.ndarraytilt_deg: np.ndarraycoupling_ratio: np.ndarrayrmse: np.ndarraynrmse: np.ndarrayr_squared: np.ndarrayresidual_trend: np.ndarrayn_samples: intbound_hit: np.ndarraymethod: str
ImpaCrosstalkFit
class
source
ImpaCrosstalkFit(slope_v_per_t: np.ndarray, offset: np.ndarray, r_squared: np.ndarray, nrmse: np.ndarray, n_samples: int, sin_angle: np.ndarray, angle_deg: np.ndarray, bound_hit: np.ndarray) -> None
Toroidal-field bleed into each vertical-field sensor.
Also exported as vaft.process.ImpaCrosstalkFit.
8 fields
slope_v_per_t: np.ndarrayoffset: np.ndarrayr_squared: np.ndarraynrmse: np.ndarrayn_samples: intsin_angle: np.ndarrayangle_deg: np.ndarraybound_hit: np.ndarray
ImpaGeometryFit
class
source
ImpaGeometryFit(r: np.ndarray, z: np.ndarray, method: str, r0: float | None = None, pitch: float | None = None, nominal_pitch: float | None = None, incident_angle_deg: float | None = None, rmse: float | None = None, nrmse: float | None = None, monotonic: bool = True, within_bounds: bool = True, bound_hit: bool = False, n_samples: int = 0, n_channels_fitted: int = 0) -> None
Resolved probe positions and how they were obtained.
Also exported as vaft.process.ImpaGeometryFit.
14 fields
r: np.ndarrayz: np.ndarraymethod: strr0: float | Nonepitch: float | Nonenominal_pitch: float | Noneincident_angle_deg: float | Nonermse: float | Nonenrmse: float | Nonemonotonic: boolwithin_bounds: boolbound_hit: booln_samples: intn_channels_fitted: int
ImpaProcessingConfig
class
source
ImpaProcessingConfig(sample_rate: float = 25000.0, signal_lowpass_hz: float = 250.0, position_lowpass_hz: float = 2500.0, gain: float = -0.13333333333333333, baseline: str = 'first_sample', baseline_samples: int = 2500, tf_turns: int = 24, tilt_bounds_deg: tuple[float, float] = (-10.0, 10.0), orientation: str = 'toroidal', alpha_tolerance: float = 0.15) -> None
Signal-conditioning and TF-compensation knobs for the IMPA.
Also exported as vaft.process.ImpaProcessingConfig.
10 fields
sample_rate: floatsignal_lowpass_hz: floatposition_lowpass_hz: floatgain: floatbaseline: strbaseline_samples: inttf_turns: inttilt_bounds_deg: tuple[float, float]orientation: stralpha_tolerance: float
ImpaQuality
class
source
ImpaQuality(status: str, checks: Mapping[str, str], reasons: tuple[str, ...] = ()) -> None
Structured verdict; status is valid/warning/invalid.
Also exported as vaft.process.ImpaQuality.
3 fields · 1 members
status: strchecks: Mapping[str, str]reasons: tuple[str, ...]is_usableproperty source
ImpaResult
class
source
ImpaResult(time: np.ndarray, b_measured: np.ndarray, tf_pickup: np.ndarray, b_z: np.ndarray, channel_valid: np.ndarray, geometry: ImpaGeometryFit, coupling: ImpaCouplingFit | None, window: TfCalibrationWindow | None, quality: ImpaQuality, bz_r: np.ndarray | None = None, b_z_raw: np.ndarray | None = None, b_z_corrected: np.ndarray | None = None, crosstalk: ImpaCrosstalkFit | None = None, bz_channel_valid: np.ndarray | None = None, provenance: Mapping[str, Any] = <factory>) -> None
Everything one IMPA shot produces, including its provenance.
Also exported as vaft.process.ImpaResult.
15 fields
time: np.ndarrayb_measured: np.ndarraytf_pickup: np.ndarrayb_z: np.ndarraychannel_valid: np.ndarraygeometry: ImpaGeometryFitcoupling: ImpaCouplingFit | Nonewindow: TfCalibrationWindow | Nonequality: ImpaQualitybz_r: np.ndarray | Noneb_z_raw: np.ndarray | Noneb_z_corrected: np.ndarray | Nonecrosstalk: ImpaCrosstalkFit | Nonebz_channel_valid: np.ndarray | Noneprovenance: Mapping[str, Any]
legacy_impa_compensation — Faithful port of the legacy compensation script, at one time sample. Reference source
Also exported as vaft.process.legacy_impa_compensation.
legacy_impa_position — Faithful port of the legacy position script, at one time sample. Reference source
Also exported as vaft.process.legacy_impa_position.
process_impa — Run the whole array chain for one shot, from raw records to a graded result. Reference source
Also exported as vaft.process.process_impa.
remove_bz_crosstalk — Subtract a vertical sensor’s toroidal crosstalk. Reference source
Also exported as vaft.process.remove_bz_crosstalk.
remove_tf_pickup — Recover the vertical field by removing a probe’s toroidal pickup. Reference source
Also exported as vaft.process.remove_tf_pickup.
TfCalibrationWindow
class
source
TfCalibrationWindow(start_time: float, end_time: float, indices: np.ndarray, metrics: Mapping[str, float] = <factory>) -> None
A contiguous same-shot interval judged to be TF-dominated.
Also exported as vaft.process.TfCalibrationWindow.
TfWindowCriteria
class
source
TfWindowCriteria(tf_current_min: float = 500.0, tf_current_min_fraction: float = 0.5, ip_max: float = 3000.0, pf_current_max: float = 500.0, min_duration: float = 0.005, tf_dynamic_range_min: float = 0.02, smoothing_samples: int = 25) -> None
Signal-based conditions a clean TF calibration interval must satisfy.
Also exported as vaft.process.TfWindowCriteria.
7 fields
tf_current_min: floattf_current_min_fraction: floatip_max: floatpf_current_max: floatmin_duration: floattf_dynamic_range_min: floatsmoothing_samples: int
vaft.process.impurity
Impurity composition: which mixture a plasma is assumed, derived or measured to carry, resolved once.
charge_state_moments — Charge-state distribution of one element and its first two charge moments. Reference source
Also exported as vaft.process.charge_state_moments.
composition_from_fractions — An impurity composition from parallel lists of elements, relative fractions and charge states. Reference source
Also exported as vaft.process.composition_from_fractions.
composition_from_model — An impurity composition from a parsed machine impurity_model record. Reference source
Also exported as vaft.process.composition_from_model.
COMPOSITION_KINDS
data
COMPOSITION_KINDS = ('measured', 'explicit', 'derived', 'assumed')
COMPOSITION_ORIGINS
data
COMPOSITION_ORIGINS = ('measured', 'assumed', 'derived', 'inferred')
composition_record_origin — The origin a composition record states, or None when it states none. Reference source
Also exported as vaft.process.composition_record_origin.
composition_record_text — The record a writer stores beside a composition or Z_eff it put into core_profiles. Reference source
Also exported as vaft.process.composition_record_text.
ImpurityComposition
class
source
ImpurityComposition(species: tuple[ImpuritySpecies, ...], target_zeff: Optional[float], main_ion: str = 'H', reduction: str = 'preserve_charge_z2_mass', status: str = 'explicit', source: str = 'caller', input_record: Mapping[str, Any] = <factory>) -> None
A relative impurity composition and the effective charge it is closed at.
Also exported as vaft.process.ImpurityComposition.
7 fields · 4 members
species: tuple[ImpuritySpecies, ...]target_zeff: Optional[float]main_ion: strreduction: strstatus: strsource: strinput_record: Mapping[str, Any]weightsproperty — Relative densities normalised to sum to one. sourcechargesproperty sourcemassesproperty sourcemain_ion_chargeproperty source
ImpuritySpecies
class
source
ImpuritySpecies(element: str, charge_state: float, relative_density: float = 1.0, mass: Optional[float] = None) -> None
One impurity species: an element in one charge state, with its relative density.
Also exported as vaft.process.ImpuritySpecies.
NORMALIZATIONS
data
NORMALIZATIONS = ('ne_weighted_mean', 'axis', 'fixed', 'resistive_closure')
populate_impurity_profiles — A copy of ods whose core_profiles slice carries the resolved ion composition. Reference source
Also exported as vaft.process.populate_impurity_profiles.
populate_radial_impurity_profiles — A copy of ods whose core_profiles slice carries a charge-state-resolved composition. Reference source
Also exported as vaft.process.populate_radial_impurity_profiles.
populate_zeff_profile — A copy of ods whose core_profiles slice carries the resolved Z_eff(rho). Reference source
Also exported as vaft.process.populate_zeff_profile.
RadialImpurityComposition
class
source
RadialImpurityComposition(kind: str, rho: np.ndarray, te_eV: np.ndarray, ne_m3: np.ndarray, elements: tuple[str, ...], weights: np.ndarray, scale: float, elemental_fractions: np.ndarray, charge_state_fractions: tuple[np.ndarray, ...], mean_charge: np.ndarray, mean_square_charge: np.ndarray, S1: np.ndarray, S2: np.ndarray, effective_charge: np.ndarray, zeff: np.ndarray, main_ion_fraction: np.ndarray, dilution_fraction: np.ndarray, coronal_mean_charge: np.ndarray, relaxation_time_s: np.ndarray, coronal_valid: Optional[np.ndarray], main_ion: str = 'H', time: Optional[float] = None, normalization: Mapping[str, Any] = <factory>, provenance: Mapping[str, Any] = <factory>) -> None
Charge-state-resolved impurity composition on a radial grid.
Also exported as vaft.process.RadialImpurityComposition.
24 fields · 3 members
kind: strrho: np.ndarrayte_eV: np.ndarrayne_m3: np.ndarrayelements: tuple[str, ...]weights: np.ndarrayscale: floatelemental_fractions: np.ndarraycharge_state_fractions: tuple[np.ndarray, ...]mean_charge: np.ndarraymean_square_charge: np.ndarrayS1: np.ndarrayS2: np.ndarrayeffective_charge: np.ndarrayzeff: np.ndarraymain_ion_fraction: np.ndarraydilution_fraction: np.ndarraycoronal_mean_charge: np.ndarrayrelaxation_time_s: np.ndarraycoronal_valid: Optional[np.ndarray]main_ion: strtime: Optional[float]normalization: Mapping[str, Any]provenance: Mapping[str, Any]zeff_sourceproperty sourcesourceproperty sourceas_rowsmethod — One row per rho, prefixed bykey(e.g. the #1454 state key). source
resolve_impurity_composition — Resolve the impurity composition that applies, close it at its Z_eff and reduce it. Reference source
Also exported as vaft.process.resolve_impurity_composition.
resolve_radial_composition — Radial Z_eff and reduced impurity from an elemental composition and atomic-data charge states. Reference source
Also exported as vaft.process.resolve_radial_composition.
ResolvedImpurityComposition
class
source
ResolvedImpurityComposition(kind: str, source: str, species: tuple[ImpuritySpecies, ...], main_ion: str, weights: np.ndarray, impurity_fractions: np.ndarray, main_ion_fraction: Union[float, np.ndarray], zeff: Union[float, np.ndarray], zeff_source: str, S1: Union[float, np.ndarray], S2: Union[float, np.ndarray], A_bar: Union[float, np.ndarray], effective_charge: Union[float, np.ndarray], effective_fraction: Union[float, np.ndarray], effective_mass: Union[float, np.ndarray], dilution_fraction: Union[float, np.ndarray], rho: Optional[np.ndarray] = None, time: Optional[float] = None, resistive_zeff: Optional[Mapping[str, Any]] = None, candidates: tuple[Mapping[str, Any], ...] = (), provenance: Mapping[str, Any] = <factory>, mean_charge: Optional[np.ndarray] = None, mean_square_charge: Optional[np.ndarray] = None) -> None
The composition that applies, its closure, its reduction and why it was chosen.
Also exported as vaft.process.ResolvedImpurityComposition.
23 fields · 2 members
kind: strsource: strspecies: tuple[ImpuritySpecies, ...]main_ion: strweights: np.ndarrayimpurity_fractions: np.ndarraymain_ion_fraction: Union[float, np.ndarray]zeff: Union[float, np.ndarray]zeff_source: strS1: Union[float, np.ndarray]S2: Union[float, np.ndarray]A_bar: Union[float, np.ndarray]effective_charge: Union[float, np.ndarray]effective_fraction: Union[float, np.ndarray]effective_mass: Union[float, np.ndarray]dilution_fraction: Union[float, np.ndarray]rho: Optional[np.ndarray]time: Optional[float]resistive_zeff: Optional[Mapping[str, Any]]candidates: tuple[Mapping[str, Any], ...]provenance: Mapping[str, Any]mean_charge: Optional[np.ndarray]mean_square_charge: Optional[np.ndarray]fractionmethod —n / n_eof one species (summed over charge states when none is named). sourceas_recordmethod — A JSON-ready summary (scalars as floats, profiles as lists). source
vaft.process.kinetic_closure
Analytic kinetic closure: dilution-aware thermal pressure and a classical fast-ion estimate (issue #1606).
assemble_pressure — Electron, per-species ion, thermal, fast and total pressure, each kept separate. Reference source
Also exported as vaft.process.assemble_pressure.
DILUTION_MODES
data
DILUTION_MODES = ('species', 'none')
fast_ion_slowing_down_estimate — Classical slowing-down density, energy and pressure of one fast-ion source on a grid. Reference source
Also exported as vaft.process.fast_ion_slowing_down_estimate.
FastIonEstimate
class
source
FastIonEstimate(source_rate: np.ndarray, beam_energy_eV: float, A_b: float, Z_b: float, v_b: float, v_c: np.ndarray, E_c_eV: np.ndarray, tau_s: np.ndarray, tau_thermalisation: np.ndarray, n_fast: np.ndarray, W_fast: np.ndarray, p_fast: np.ndarray, provenance: Mapping[str, Any] = <factory>, time: Optional[float] = None, rho: Optional[np.ndarray] = None) -> None
A classical slowing-down estimate of one fast-ion population on a grid.
Also exported as vaft.process.FastIonEstimate.
15 fields
source_rate: np.ndarraybeam_energy_eV: floatA_b: floatZ_b: floatv_b: floatv_c: np.ndarrayE_c_eV: np.ndarraytau_s: np.ndarraytau_thermalisation: np.ndarrayn_fast: np.ndarrayW_fast: np.ndarrayp_fast: np.ndarrayprovenance: Mapping[str, Any]time: Optional[float]rho: Optional[np.ndarray]
INDEPENDENT_LINEAGES
data
INDEPENDENT_LINEAGES = ('magnetics',)
Also exported as vaft.validation.kinetic_state.INDEPENDENT_LINEAGES.
infer_kinetic_closure — Densities, temperatures and separated pressures of one core_profiles slice, dilution-aware. Reference source
Also exported as vaft.process.infer_kinetic_closure.
infer_ti_pressure_partition — Ion temperature from the equilibrium pressure partition, T_i = p_eq / (e f n_e) - T_e / f. Reference source
Also exported as vaft.process.infer_ti_pressure_partition.
KineticClosure
class
source
KineticClosure(time: Optional[float], rho: Optional[np.ndarray], n_e: np.ndarray, T_e: np.ndarray, ion_densities: Mapping[str, np.ndarray], ion_temperatures: Mapping[str, np.ndarray], pressure: PressureAssembly, composition: Any = None, fast_ion: Optional[FastIonEstimate] = None, provenance: Mapping[str, Any] = <factory>) -> None
A resolved kinetic state: composition, densities, temperatures, pressures, provenance.
Also exported as vaft.process.KineticClosure.
10 fields
time: Optional[float]rho: Optional[np.ndarray]n_e: np.ndarrayT_e: np.ndarrayion_densities: Mapping[str, np.ndarray]ion_temperatures: Mapping[str, np.ndarray]pressure: PressureAssemblycomposition: Anyfast_ion: Optional[FastIonEstimate]provenance: Mapping[str, Any]
PressureAssembly
class
source
PressureAssembly(p_e: np.ndarray, p_i_species: Mapping[str, np.ndarray], p_i_thermal: np.ndarray, p_thermal: np.ndarray, p_fast: Optional[np.ndarray], p_total: np.ndarray, provenance: Mapping[str, Any] = <factory>) -> None
Pressure contributions on one grid, kept apart [Pa].
Also exported as vaft.process.PressureAssembly.
7 fields
p_e: np.ndarrayp_i_species: Mapping[str, np.ndarray]p_i_thermal: np.ndarrayp_thermal: np.ndarrayp_fast: Optional[np.ndarray]p_total: np.ndarrayprovenance: Mapping[str, Any]
TI_FLAGS
data
TI_FLAGS = ('p_i_nonpositive', 'p_i_not_significant', 'non_finite_input')
Also exported as vaft.validation.kinetic_state.TI_FLAGS.
TI_NOTES
data
TI_NOTES = ('sigma_unavailable',)
Also exported as vaft.validation.kinetic_state.TI_NOTES.
vaft.process.langmuir
Backend-independent VEST triple Langmuir probe physics.
calibrate_current — Convert a raw probe current record to amperes. Reference source
Also exported as vaft.process.calibrate_current.
calibrate_voltage — Convert a raw probe voltage record to physical volts. Reference source
Also exported as vaft.process.calibrate_voltage.
electron_density — Electron density from the ion saturation current and the solved temperature. Reference source
Also exported as vaft.process.electron_density.
median_filter_signal — Median-filter a waveform along its only axis. Reference source
Also exported as vaft.process.median_filter_signal.
probe_surface_area — Collection area of a cylindrical probe tip. Reference source
Also exported as vaft.process.probe_surface_area.
process_triple_probe — Run the full triple-probe chain on one voltage and current channel pair. Reference source
Also exported as vaft.process.process_triple_probe.
vaft.process.line_of_sight
Line integrals of a poloidal-plane field along diagnostic sightlines (issue #886).
build_line_integral_operator — The path-length matrix of chords through the cells of an (R, Z) grid. Reference source
Also exported as vaft.process.build_line_integral_operator.
clip_segment_to_polygon — The parameter intervals of a segment that lie inside a closed polygon. Reference source
Also exported as vaft.process.clip_segment_to_polygon.
project_emissivity — Line integrals of one or many (R, Z) fields through a path-length operator. Reference source
Also exported as vaft.process.project_emissivity.
Sightlines
class
source
Sightlines(r1: np.ndarray, z1: np.ndarray, r2: np.ndarray, z2: np.ndarray, phi: np.ndarray, labels: tuple[str, ...] = ()) -> None
Straight chords in poloidal planes: end points, toroidal angle, labels.
Also exported as vaft.process.Sightlines.
6 fields · 1 members
r1: np.ndarrayz1: np.ndarrayr2: np.ndarrayz2: np.ndarrayphi: np.ndarraylabels: tuple[str, ...]subsetmethod — The chords selected by an index or boolean mask [-]. source
vaft.process.local_mhd_criteria
Local MHD stability criteria evaluated from one reconstructed equilibrium (#1902).
curvature_map — kappa_n, kappa_g and local shear on the (R, Z) grid inside the plasma. Reference source
Also exported as vaft.process.curvature_map.
flux_surface_curvature — Normal and geodesic field-line curvature and local shear along flux surfaces. Reference source
Also exported as vaft.process.flux_surface_curvature.
interchange_comparison — Equilibrium-native D_I, D_R against a stability code’s di, dr. Reference source
Also exported as vaft.process.interchange_comparison.
InterchangeProfile
class
source
InterchangeProfile(psi_n: np.ndarray, D_I: np.ndarray, D_R: np.ndarray, H: np.ndarray, E_plus_F: np.ndarray, dV_dchi: np.ndarray, q: np.ndarray, dq_dchi: np.ndarray, averages: Mapping[str, np.ndarray], provenance: Mapping[str, Any] = <factory>) -> None
Mercier / GGJ interchange indices on flux surfaces of one equilibrium.
Also exported as vaft.process.InterchangeProfile.
10 fields · 2 members
psi_n: np.ndarrayD_I: np.ndarrayD_R: np.ndarrayH: np.ndarrayE_plus_F: np.ndarraydV_dchi: np.ndarrayq: np.ndarraydq_dchi: np.ndarrayaverages: Mapping[str, np.ndarray]provenance: Mapping[str, Any]mercier_unstableproperty —D_I > 0: the universal Mercier criterion, nothing more [-]. sourceresistive_interchange_unstableproperty —D_R > 0: the universal GGJ criterion [-]. source
mercier_ggj_from_ods — Mercier / GGJ indices of one ODS equilibrium slice. Reference source
Also exported as vaft.process.mercier_ggj_from_ods.
mercier_ggj_profile — Mercier D_I, GGJ H and D_R on flux surfaces of a flux map. Reference source
Also exported as vaft.process.mercier_ggj_profile.
s_alpha_from_ods — Per-surface s-alpha coordinates of one ODS equilibrium slice. Reference source
Also exported as vaft.process.s_alpha_from_ods.
s_alpha_profile — Per-surface s and alpha of local ballooning theory and the s-alpha first-stability boundary. Reference source
Also exported as vaft.process.s_alpha_profile.
SAlphaProfile
class
source
SAlphaProfile(psi_n: np.ndarray, s: np.ndarray, alpha: np.ndarray, alpha_first: np.ndarray, alpha_second: np.ndarray, volume: np.ndarray, provenance: Mapping[str, Any] = <factory>) -> None
Per-surface s-alpha ballooning coordinates and the model’s first-stability boundary (#1902).
Also exported as vaft.process.SAlphaProfile.
7 fields · 1 members
psi_n: np.ndarrays: np.ndarrayalpha: np.ndarrayalpha_first: np.ndarrayalpha_second: np.ndarrayvolume: np.ndarrayprovenance: Mapping[str, Any]s_alpha_unstableproperty —alphainside the model’s unstable band – an indicator for a shaped plasma, not a verdict [-]. source
SurfaceCurvature
class
source
SurfaceCurvature(psi_n: np.ndarray, surfaces: tuple[Mapping[str, np.ndarray], ...], checks: Mapping[str, np.ndarray], provenance: Mapping[str, Any] = <factory>) -> None
Field-line curvature and local shear along flux surfaces (#1902).
Also exported as vaft.process.SurfaceCurvature.
4 fields
psi_n: np.ndarraysurfaces: tuple[Mapping[str, np.ndarray], ...]checks: Mapping[str, np.ndarray]provenance: Mapping[str, Any]
vaft.process.magnetic_island
An analytic magnetic island placed on an axisymmetric equilibrium (issue #886).
equilibrium_safety_factor — The magnitude of the safety factor on normalized flux, as the equilibrium knows it. Reference source
Also exported as vaft.process.equilibrium_safety_factor.
island_emissivity — A soft-X-ray emissivity phantom from an island topology. Reference source
Also exported as vaft.process.island_emissivity.
IslandTopology
class
source
IslandTopology(spec: MagneticIslandSpec, r: np.ndarray, z: np.ndarray, psi_n: np.ndarray, inside_boundary: np.ndarray, psi_n_s: float, q_s: float, helicity: int, grad_psi_s: float, width_psi_n: float, time: float, phi: float, theta_star: np.ndarray, normal_displacement: np.ndarray, helical_phase: np.ndarray, helical_flux: np.ndarray, inside_separatrix: np.ndarray, o_points: np.ndarray, x_points: np.ndarray, rational_surface: np.ndarray, sfl_map: StraightFieldLineMap) -> None
The helical flux of one island on an equilibrium grid, at one (t, phi).
Also exported as vaft.process.IslandTopology.
21 fields · 1 members
spec: MagneticIslandSpecr: np.ndarrayz: np.ndarraypsi_n: np.ndarrayinside_boundary: np.ndarraypsi_n_s: floatq_s: floathelicity: intgrad_psi_s: floatwidth_psi_n: floattime: floatphi: floattheta_star: np.ndarraynormal_displacement: np.ndarrayhelical_phase: np.ndarrayhelical_flux: np.ndarrayinside_separatrix: np.ndarrayo_points: np.ndarrayx_points: np.ndarrayrational_surface: np.ndarraysfl_map: StraightFieldLineMaprephasemethod — The same island at another time and/or toroidal angle [-]. source
magnetic_island_topology — The helical flux of an m/n island placed on an equilibrium. Reference source
Also exported as vaft.process.magnetic_island_topology.
MagneticIslandSpec
class
source
MagneticIslandSpec(m: int, n: int, width: float, phase: float = 0.0, angular_frequency: float = 0.0, t0: float = 0.0, psi_n_s: float | None = None, surface_index: int = 0, helicity: int | None = None) -> None
The prescribed island: mode numbers, width and phase, nothing geometric.
Also exported as vaft.process.MagneticIslandSpec.
9 fields · 1 members
m: intn: intwidth: floatphase: floatangular_frequency: floatt0: floatpsi_n_s: float | Nonesurface_index: inthelicity: int | Nonealphamethod — Island phasealpha(t)[rad]. source
vaft.process.magnetics
Magnetic diagnostics: from a coil voltage to a current, a flux, or a mode number.
b_field_pol_probe_field — Poloidal field from raw probe records, filtered before integration. Reference source
Also exported as vaft.process.b_field_pol_probe_field.
DEFAULT_VEST_MAGNETICS_PROCESSING
data
DEFAULT_VEST_MAGNETICS_PROCESSING = <vaft.process.magnetics.VestMagneticsProcessingConfig>
DegenerateBaselineWindowError
class
source
Raised when a baseline window contains fewer than two valid samples.
Also exported as vaft.process.DegenerateBaselineWindowError.
flux_loop_flux — Poloidal flux from raw flux-loop records, with a two-sided baseline. Reference source
Also exported as vaft.process.flux_loop_flux.
MAGNETICS_CLUSTER_GAP_FRACTION
data
MAGNETICS_CLUSTER_GAP_FRACTION = 0.4
magnetics_sensor_centre — Geometric centre of a magnetic sensor layout. Reference source
Also exported as vaft.process.magnetics_sensor_centre.
magnetics_sensor_poloidal_angle — Poloidal angle of each sensor about the layout centre. Reference source
Also exported as vaft.process.magnetics_sensor_poloidal_angle.
mirnov_preprocess_signal — Condition a Mirnov coil signal for mode analysis. Reference source
Also exported as vaft.process.mirnov_preprocess_signal.
mirnov_spectrogram — Sliding-window amplitude spectrogram of a Mirnov signal. Reference source
Also exported as vaft.process.mirnov_spectrogram.
MirnovSpectrogramResult
class
source
MirnovSpectrogramResult(time: np.ndarray, frequency: np.ndarray, magnitude: np.ndarray) -> None
Time-frequency result for one Mirnov waveform.
Also exported as vaft.process.MirnovSpectrogramResult.
3 fields
time: numpy.ndarrayfrequency: numpy.ndarraymagnitude: numpy.ndarray
rogowski_coil_ip — Plasma current from a Rogowski coil, compensated by a flux-loop reference. Reference source
Also exported as vaft.process.rogowski_coil_ip.
toroidal_mode_analysis — Toroidal mode number from the cross-spectral phase of two coils. Reference source
Also exported as vaft.process.toroidal_mode_analysis.
toroidal_phase_fit_at_time — Toroidal mode numbers from a wrapped-phase fit across an array, at one time. Reference source
Also exported as vaft.process.toroidal_phase_fit_at_time.
ToroidalModeResult
class
source
ToroidalModeResult(frequency: np.ndarray, n: np.ndarray, power: np.ndarray, phase: np.ndarray, spectrum_frequency: np.ndarray, cross_power: np.ndarray, peak_indices: np.ndarray, n_raw: np.ndarray, n_rounded: np.ndarray, coherence: np.ndarray) -> None
Cross-phase toroidal mode-number result.
Also exported as vaft.process.ToroidalModeResult.
10 fields
frequency: numpy.ndarrayn: numpy.ndarraypower: numpy.ndarrayphase: numpy.ndarrayspectrum_frequency: numpy.ndarraycross_power: numpy.ndarraypeak_indices: numpy.ndarrayn_raw: numpy.ndarrayn_rounded: numpy.ndarraycoherence: numpy.ndarray
ToroidalPhaseFitResult
class
source
ToroidalPhaseFitResult(time: float, toroidal_angle: np.ndarray, modes: tuple[ToroidalPhaseModeFit, ...], candidate_n: np.ndarray) -> None
Mode-line fits from a selected time slice.
Also exported as vaft.process.ToroidalPhaseFitResult.
4 fields
time: floattoroidal_angle: numpy.ndarraymodes: tuple[vaft.process.magnetics.ToroidalPhaseModeFit, ...]candidate_n: numpy.ndarray
ToroidalPhaseModeFit
class
source
ToroidalPhaseModeFit(frequency: float, n: int, intercept: float, rms_error: float, phase: np.ndarray, fitted_phase: np.ndarray, amplitude: np.ndarray) -> None
Wrapped toroidal phase fit for one fluctuation frequency.
Also exported as vaft.process.ToroidalPhaseModeFit.
7 fields
frequency: floatn: intintercept: floatrms_error: floatphase: numpy.ndarrayfitted_phase: numpy.ndarrayamplitude: numpy.ndarray
UnsupportedMagneticsDaqModeError
class
source
Raised for a magnetics acquisition era with no ported processing path.
Also exported as vaft.process.UnsupportedMagneticsDaqModeError.
vest_b_field_pol_probe_legacy — Poloidal field at a VEST probe, from its raw record. Reference source
Also exported as vaft.process.vest_b_field_pol_probe_legacy.
vest_equilibrium_magnetics_detailed — Process every magnetic channel of one VEST shot onto the output window. Reference source
Also exported as vaft.process.vest_equilibrium_magnetics_detailed.
vest_equilibrium_magnetics_signals — The processed magnetics of one VEST shot, as the three-array legacy view. Reference source
Also exported as vaft.process.magnetics.vest_md_signals, vaft.process.vest_equilibrium_magnetics_signals, vaft.process.vest_md_signals.
vest_flux_loop_flux_from_voltage — Poloidal flux through a VEST flux loop, from its calibrated voltage. Reference source
Also exported as vaft.process.vest_flux_loop_flux_from_voltage.
vest_flux_loop_legacy — Poloidal flux through a VEST flux loop, from its raw record. Reference source
Also exported as vaft.process.vest_flux_loop_legacy.
vest_flux_loop_voltage — Calibrated flux-loop terminal voltage, before integration. Reference source
Also exported as vaft.process.vest_flux_loop_voltage.
vest_magnetics_time_window — The output time window a VEST shot’s magnetics are resampled onto. Reference source
Also exported as vaft.process.vest_magnetics_time_window.
VestEquilibriumMagneticsResult
class
source
VestEquilibriumMagneticsResult(time: np.ndarray, flux_loops: list[np.ndarray], probes: list[np.ndarray], flux_loop_voltage_time: list[np.ndarray], flux_loop_voltage: list[np.ndarray]) -> None
Processed VEST equilibrium magnetics waveforms with native voltages.
Also exported as vaft.process.VestEquilibriumMagneticsResult.
5 fields
time: numpy.ndarrayflux_loops: list[numpy.ndarray]probes: list[numpy.ndarray]flux_loop_voltage_time: list[numpy.ndarray]flux_loop_voltage: list[numpy.ndarray]
VestMagneticsProcessingConfig
class
source
VestMagneticsProcessingConfig(time_start: float = 0.0, time_end: float = 0.99996, sample_count: int = 25000, fast_sample_rate: float = 250000.0, lowpass_cutoff: float = 2500.0, lowpass_taps: int = 251, default_index_start: int = 6000, default_index_end: int = 8500, default_probe_baseline_end: int = 8500, late_shot_min: int = 41660, transient_shot_min: int = 41446, transient_shot_max: int = 41451, late_index_start: int = 6500, late_index_end: int = 9000, late_probe_baseline_end: int = 5000, flux_baseline_first_start: int = 3499, flux_baseline_first_end: int = 5000, flux_baseline_second_start: int = 11999, flux_baseline_second_end: int = 15000, flux_baseline_late_start: int = 5999, flux_baseline_late_end: int = 7000, flux_baseline_late_loop_numbers: tuple[int, ...] = (9, 10, 11), calibration_mode: str = 'divide', flux_output_per_radian: bool = True, window_override: tuple[int, int, int] | None = None, flux_baseline_window: tuple[float, float] | None = None, flux_baseline_samples: int | None = None, daq_mode: str = 'legacy', allow_zero_fallback: bool = False) -> None
Default VEST magnetics processing settings used by legacy vfit_equilibrium_magnetics.
Also exported as vaft.process.VestMagneticsProcessingConfig.
29 fields · 2 members
time_start: floattime_end: floatsample_count: intfast_sample_rate: floatlowpass_cutoff: floatlowpass_taps: intdefault_index_start: intdefault_index_end: intdefault_probe_baseline_end: intlate_shot_min: inttransient_shot_min: inttransient_shot_max: intlate_index_start: intlate_index_end: intlate_probe_baseline_end: intflux_baseline_first_start: intflux_baseline_first_end: intflux_baseline_second_start: intflux_baseline_second_end: intflux_baseline_late_start: intflux_baseline_late_end: intflux_baseline_late_loop_numbers: tuple[int, ...]calibration_mode: strflux_output_per_radian: boolwindow_override: tuple[int, int, int] | Noneflux_baseline_window: tuple[float, float] | Noneflux_baseline_samples: int | Nonedaq_mode: strallow_zero_fallback: booltimebasemethod sourcewindow_for_shotmethod source
vaft.process.mhd_stability
Post-processing of DCON stability results read back from mhd_linear (#940).
criterion_intervals — Where a radial criterion profile is strictly on its unstable side. Reference source
Also exported as vaft.process.criterion_intervals.
dcon_edge_comparison — Full-edge minus peak-dW-truncated least-stable W_t of one case (#792, #940). Reference source
Also exported as vaft.process.dcon_edge_comparison.
dcon_edge_scan — DCON’s edge scan: where Re dW_edge peaks, where it changes sign, where DCON truncated. Reference source
Also exported as vaft.process.dcon_edge_scan.
dcon_local_stability — DCON’s three local criteria, located: Mercier, resistive interchange, ballooning. Reference source
Also exported as vaft.process.dcon_local_stability.
load_stability_atlas — Read the Tier A stability atlas tables from their directory. Reference source
Also exported as vaft.process.load_stability_atlas.
stability_atlas_populations — The ideal, resistive and local-criterion populations of the stability atlas. Reference source
Also exported as vaft.process.stability_atlas_populations.
StabilityAtlasPopulations
class
source
StabilityAtlasPopulations(ideal_w_t: Mapping[int, np.ndarray], delta_prime_max: Mapping[tuple[str, int], np.ndarray], mercier_max_d_i: np.ndarray, ballooning_min_c_a: np.ndarray, summary: Any, provenance: Mapping[str, Any] = <factory>) -> None
Per-panel value populations of the Tier A stability atlas, with their layers kept apart.
Also exported as vaft.process.StabilityAtlasPopulations.
6 fields
ideal_w_t: Mapping[int, np.ndarray]delta_prime_max: Mapping[tuple[str, int], np.ndarray]mercier_max_d_i: np.ndarrayballooning_min_c_a: np.ndarraysummary: Anyprovenance: Mapping[str, Any]
vaft.process.ml
Backend-neutral machine-learning processing: data to published model (#669).
CalibrationResult
class
source
CalibrationResult(*, name: str, output: str, threshold: float, method: str, quantile: float | None, partition: str, n_samples: int, groups: tuple[str, ...] = (), population: str | None = None, usage: dict | None = None) -> None
A decision threshold on one model output, and the population behind it.
Also exported as vaft.process.CalibrationResult.
10 fields · 1 members
name: stroutput: strthreshold: floatmethod: strquantile: float | Nonepartition: strn_samples: intgroups: tuple[str, ...]population: str | Noneusage: dict | Noneto_dictmethod source
DatasetArtifact
class
source
DatasetArtifact(*, spec: DatasetSpec, inputs: np.ndarray, groups: np.ndarray, targets: np.ndarray | None = None, sample_meta: Mapping[str, np.ndarray] = <factory>, available: np.ndarray | None = None, fingerprint: str = '') -> None
Samples, optional paired targets and the group each sample belongs to.
Also exported as vaft.process.DatasetArtifact.
7 fields · 7 members
spec: DatasetSpecinputs: np.ndarraygroups: np.ndarraytargets: np.ndarray | Nonesample_meta: Mapping[str, np.ndarray]available: np.ndarray | Nonefingerprint: strn_samplesproperty sourceinput_shapeproperty sourcetarget_shapeproperty sourcegroup_labelsproperty — Groups as strings, the form aSplitassigns. sourceavailable_maskproperty —available, withNoneread as every sample available. sourcesubsetmethod — The samples atindices, with their groups, metadata and availability. sourcereplacemethod source
DatasetSpec
class
source
DatasetSpec(*, name: str, task: str, group_key: str = 'group', input_names: tuple[str, ...] = (), target_names: tuple[str, ...] = (), description: str = '', metadata: Mapping[str, Any] = <factory>) -> None
What a dataset is: its task, its independent unit and its columns.
Also exported as vaft.process.DatasetSpec.
7 fields · 1 members
name: strtask: strgroup_key: strinput_names: tuple[str, ...]target_names: tuple[str, ...]description: strmetadata: Mapping[str, Any]to_dictmethod source
EvaluationResult
class
source
EvaluationResult(*, partition: str, metrics: Mapping[str, float], per_group: Mapping[str, Mapping[str, float]], n_samples: int, model_identity: ModelIdentity, provenance: Mapping[str, Any] = <factory>) -> None
Metrics of one model on one partition, overall and per group.
Also exported as vaft.process.EvaluationResult.
6 fields
partition: strmetrics: Mapping[str, float]per_group: Mapping[str, Mapping[str, float]]n_samples: intmodel_identity: ModelIdentityprovenance: Mapping[str, Any]
FeatureDataset
class
source
FeatureDataset(*, spec: DatasetSpec, inputs: np.ndarray, groups: np.ndarray, targets: np.ndarray | None = None, sample_meta: Mapping[str, np.ndarray] = <factory>, available: np.ndarray | None = None, fingerprint: str = '', feature_spec: FeatureSpec) -> None
A 2-D engineered-feature table whose columns follow a FeatureSpec.
Also exported as vaft.process.FeatureDataset.
8 fields · 1 members
spec: DatasetSpecinputs: np.ndarraygroups: np.ndarraytargets: np.ndarray | Nonesample_meta: Mapping[str, np.ndarray]available: np.ndarray | Nonefingerprint: strfeature_spec: FeatureSpecselect_blockmethod — The columns of one feature block, as a fingerprinted dataset of its own. source
FeatureSpec
class
source
FeatureSpec(*, feature_names: tuple[str, ...], blocks: Mapping[str, tuple[str, ...]] = <factory>, version: str = '') -> None
Engineered-feature schema: column names, named blocks and a version.
Also exported as vaft.process.FeatureSpec.
InferenceResult
class
source
InferenceResult(*, outputs: Mapping[str, np.ndarray], model_identity: ModelIdentity, groups: np.ndarray | None = None, sample_meta: Mapping[str, np.ndarray] = <factory>, provenance: Mapping[str, Any] = <factory>) -> None
Model outputs aligned with the input samples.
Also exported as vaft.process.InferenceResult.
5 fields
outputs: Mapping[str, np.ndarray]model_identity: ModelIdentitygroups: np.ndarray | Nonesample_meta: Mapping[str, np.ndarray]provenance: Mapping[str, Any]
MLError
class
source
Base class of every error vaft.process.ml raises on purpose.
Also exported as vaft.process.MLError.
ModelArtifact
class
source
ModelArtifact(*, name: str, model_spec: ModelSpec, state: bytes, input_shape: tuple[int, ...], target_shape: tuple[int, ...] | None, kind: str, outputs: tuple[str, ...], normalization: Mapping[str, np.ndarray] = <factory>, input_names: tuple[str, ...] = (), training: Mapping[str, Any] = <factory>, metrics: Mapping[str, Any] = <factory>, calibration: Mapping[str, CalibrationResult] = <factory>, tensor_schema: Mapping[str, Any] = <factory>, identity: ModelIdentity | None = None) -> None
A trained model and everything that identifies it (#669 section 7).
Also exported as vaft.process.ModelArtifact.
14 fields · 6 members
name: strmodel_spec: ModelSpecstate: bytesinput_shape: tuple[int, ...]target_shape: tuple[int, ...] | Nonekind: stroutputs: tuple[str, ...]normalization: Mapping[str, np.ndarray]input_names: tuple[str, ...]training: Mapping[str, Any]metrics: Mapping[str, Any]calibration: Mapping[str, CalibrationResult]tensor_schema: Mapping[str, Any]identity: ModelIdentity | Nonesupervisedproperty sourcestate_sha256property sourcecontract_sha256property — Bind weights, normalization, configuration and declared use history. sourceresolved_identitymethod — The identity to stamp on a result: the resolved one, else in-memory. sourcewith_calibrationmethod — A copy carryingcalibration; the identity is dropped. sourcereplacemethod source
ModelBundle
class
source
ModelBundle(*, name: str, members: Mapping[str, ModelArtifact], composition: Mapping[str, Any] = <factory>, identity: ModelIdentity | None = None) -> None
Several fitted models released as one logical model.
Also exported as vaft.process.ModelBundle.
4 fields · 1 members
name: strmembers: Mapping[str, ModelArtifact]composition: Mapping[str, Any]identity: ModelIdentity | Nonereplacemethod source
ModelContractError
class
source
Data, split or model do not satisfy the contract they are used under.
Also exported as vaft.process.ModelContractError.
ModelIdentity
class
source
ModelIdentity(*, name: str, state_sha256: str, version: str | None = None, manifest_sha256: str | None = None, stage: str | None = None, status: str | None = None, resolved_by: str = 'in-memory', source: str | None = None, bundle: str | None = None, bundle_manifest_sha256: str | None = None) -> None
Which exact model produced a result (#669 sections 9 and 13).
Also exported as vaft.process.ModelIdentity.
10 fields · 1 members
name: strstate_sha256: strversion: str | Nonemanifest_sha256: str | Nonestage: str | Nonestatus: str | Noneresolved_by: strsource: str | Nonebundle: str | Nonebundle_manifest_sha256: str | Noneto_dictmethod source
ModelResolutionError
class
source
A published model could not be resolved to verified local files.
Also exported as vaft.process.ModelResolutionError.
ModelSpec
class
source
ModelSpec(*, architecture: str, task: str, backend: str = 'torch', hyperparameters: Mapping[str, Any] = <factory>) -> None
A reusable architecture bound to a scientific task.
Also exported as vaft.process.ModelSpec.
4 fields · 1 members
architecture: strtask: strbackend: strhyperparameters: Mapping[str, Any]to_dictmethod source
register_architecture — Make a task-defined network available to a backend by name. Reference source
Also exported as vaft.process.register_architecture.
register_augmentation — Make a train-time augmentation available by name. Reference source
Also exported as vaft.process.register_augmentation.
register_loss — Make a task-defined training loss available by name. Reference source
Also exported as vaft.process.register_loss.
Split
class
source
Split(*, spec: SplitSpec, assignment: Mapping[str, str]) -> None
A group-to-partition assignment, independent of any sample ordering.
Also exported as vaft.process.Split.
SplitSpec
class
source
SplitSpec(*, fractions: Mapping[str, float] = <factory>, seed: int = 0, fixed: Mapping[str, str] = <factory>, method: str = 'permutation') -> None
How groups are assigned to partitions.
Also exported as vaft.process.SplitSpec.
4 fields · 1 members
fractions: Mapping[str, float]seed: intfixed: Mapping[str, str]method: strto_dictmethod source
TrainingConfig
class
source
TrainingConfig(*, seed: int = 0, epochs: int = 100, batch_size: int = 64, learning_rate: float = 0.001, weight_decay: float = 0.0, early_stopping_patience: int | None = 10, normalize_inputs: bool = True, normalize_targets: bool = True, normalize_axes: tuple[int, ...] = (), target_normalize_axes: tuple[int, ...] = (), augmentation: str | None = None, device: str = 'cpu', optimizer: str = 'adam', scheduler: str | None = None, max_grad_norm: float | None = None, precision: str = 'fp32', loader_workers: int = 0, loader_pin_memory: bool = False, checkpoint_path: str | None = None, resume_from: str | None = None, warm_start_from: str | None = None, max_epochs_this_run: int | None = None, train_partition: str = 'train', validation_partition: str | None = 'validation') -> None
Optimisation settings; every field is recorded in the artifact.
Also exported as vaft.process.TrainingConfig.
24 fields · 1 members
seed: intepochs: intbatch_size: intlearning_rate: floatweight_decay: floatearly_stopping_patience: int | Nonenormalize_inputs: boolnormalize_targets: boolnormalize_axes: tuple[int, ...]target_normalize_axes: tuple[int, ...]augmentation: str | Nonedevice: stroptimizer: strscheduler: str | Nonemax_grad_norm: float | Noneprecision: strloader_workers: intloader_pin_memory: boolcheckpoint_path: str | Noneresume_from: str | Nonewarm_start_from: str | Nonemax_epochs_this_run: int | Nonetrain_partition: strvalidation_partition: str | Noneto_dictmethod source
TrainingResult
class
source
TrainingResult(*, artifact: ModelArtifact, history: Mapping[str, tuple[float, ...]], split: Split, best_epoch: int | None, train_indices: np.ndarray | None = None, train_scores: np.ndarray | None = None) -> None
The trained artifact, its per-epoch history and the split it used.
Also exported as vaft.process.TrainingResult.
6 fields
artifact: ModelArtifacthistory: Mapping[str, tuple[float, ...]]split: Splitbest_epoch: int | Nonetrain_indices: np.ndarray | Nonetrain_scores: np.ndarray | None
vaft.process.ml.artifact
On-disk model artifacts: manifest, hashes, export (#669 sections 7, 11, 12).
export_model — Export the network to an inference format and prove it agrees. Reference source
Also exported as vaft.process.export_model, vaft.process.ml.export_model.
vaft.process.ml.bundle
Several fitted models released as one version (#669, #973 section 24).
vaft.process.ml.dataset
Dataset construction, fingerprinting, group splitting and windowing (#669).
build_dataset — Assemble a fingerprinted dataset from arrays. Reference source
Also exported as vaft.process.build_dataset, vaft.process.ml.build_dataset.
dataset_fingerprint — SHA-256 content fingerprint of a dataset. Reference source
Also exported as vaft.process.dataset_fingerprint, vaft.process.ml.dataset_fingerprint.
load_dataset — Load a dataset written by save_dataset, verifying its fingerprint. Reference source
Also exported as vaft.process.load_dataset, vaft.process.ml.load_dataset.
save_dataset — Materialise a dataset on disk so training can run elsewhere. Reference source
Also exported as vaft.process.ml.save_dataset, vaft.process.save_dataset.
vaft.process.ml.experiments
Local JSON experiment records; optional, explicitly selected MLflow index.
experiment_record
function
source
experiment_record(result, *, references=None, run_id=None)
A JSON-only run index retaining immutable model identity and provenance.
index_mlflow
function
source
index_mlflow(record, directory, *, experiment='vaft-local')
Explicit local, server-free MLflow PoC; JSON and model identity stay canonical.
load_experiment
function
source
load_experiment(path)
Inspect a VAFT run or legacy research JSON report without dropping fields.
save_experiment
function
source
save_experiment(record, path)
Write a new local JSON record without overwriting an existing run.
vaft.process.ml.inference
Inference that always records which exact model produced the result.
vaft.process.ml.resolver
Resolve published vaft-nn models to verified local artifacts (#669 section 13).
fetch_model — Download a published model’s release assets into the cache, verified. Reference source
Also exported as vaft.process.fetch_model, vaft.process.ml.fetch_model.
vaft.process.ml.structured
Named, mask-aware scientific samples with bounded-memory source access.
build_structured_dataset — Validate and fingerprint named scientific samples without retaining a corpus. Reference source
Also exported as vaft.process.build_structured_dataset, vaft.process.ml.build_structured_dataset.
StructuredDatasetArtifact
class
source
StructuredDatasetArtifact(*, spec: DatasetSpec, source: object, input_specs: Mapping[str, TensorSpec], target_specs: Mapping[str, TensorSpec], groups: np.ndarray, sample_meta: Mapping = <factory>, available: np.ndarray | None = None, fingerprint: str = '') -> None
Lazy samples and portable schema, grouped using the existing Split.
Also exported as vaft.process.StructuredDatasetArtifact, vaft.process.ml.StructuredDatasetArtifact.
8 fields · 6 members
spec: DatasetSpecsource: objectinput_specs: Mapping[str, TensorSpec]target_specs: Mapping[str, TensorSpec]groups: np.ndarraysample_meta: Mappingavailable: np.ndarray | Nonefingerprint: strn_samplesproperty sourcegroup_labelsproperty sourceavailable_maskproperty sourcesubsetmethod sourceschemamethod sourcesamplemethod source
StructuredSample
class
source
StructuredSample(inputs: Mapping, targets: Mapping = <factory>, target_masks: Mapping = <factory>) -> None
Arrays for one sample. Target masks use True for supervised elements.
Also exported as vaft.process.StructuredSample, vaft.process.ml.StructuredSample.
3 fields
inputs: Mappingtargets: Mappingtarget_masks: Mapping
TensorSpec
class
source
TensorSpec(shape: tuple, dtype: str = 'float32', unit: str = '[-]', mask: str | None = None, normalize: bool = True) -> None
One sample tensor: shape (leading None for a set), dtype, unit and mask.
Also exported as vaft.process.TensorSpec, vaft.process.ml.TensorSpec.
5 fields · 1 members
shape: tupledtype: strunit: strmask: str | Nonenormalize: boolto_dictmethod source
vaft.process.ml.training
Training, evaluation and threshold calibration (#669 sections 6-8).
calibrate_threshold — Set a decision threshold on a per-sample model output from one partition. Reference source
Also exported as vaft.process.calibrate_threshold, vaft.process.ml.calibrate_threshold.
vaft.process.ml.usage
Opt-in declared data roles and observed entrypoint uses (#2047).
vaft.process.mode_frequency
Predicted lab-frame mode-frequency tracks from an equilibrium and a rotation profile.
MODE_FREQUENCY_MODELS
data
MODE_FREQUENCY_MODELS = ('toroidal_rotation',)
MODE_FREQUENCY_STATUSES
data
MODE_FREQUENCY_STATUSES = ('valid', 'no_equilibrium_profile', 'no_surface', 'outside_rotation_time', 'no_surface_coordinate', 'outside_rotation...
mode_frequency_tracks — Predicted lab-frame frequency of each (m, n) from the rotation at |q| = m/n. Reference source
Also exported as vaft.process.mode_frequency_tracks.
ModeFrequencyTrack
class
source
ModeFrequencyTrack(m: int, n: int, q: float, branch: int, time: np.ndarray, psi_norm: np.ndarray, rho_pol_norm: np.ndarray, rho_tor_norm: np.ndarray, r_outboard: np.ndarray, toroidal_rotation_frequency: np.ndarray, predicted_frequency: np.ndarray, valid: np.ndarray, status: tuple[str, ...], model: str = 'toroidal_rotation') -> None
One predicted frequency track: one (m, n) on one root of |q| = m/n.
Also exported as vaft.process.ModeFrequencyTrack.
14 fields · 1 members
m: intn: intq: floatbranch: inttime: np.ndarraypsi_norm: np.ndarrayrho_pol_norm: np.ndarrayrho_tor_norm: np.ndarrayr_outboard: np.ndarraytoroidal_rotation_frequency: np.ndarraypredicted_frequency: np.ndarrayvalid: np.ndarraystatus: tuple[str, ...]model: strlabelproperty —2/1 (q = 2): the mode and the surface it is predicted on. source
ModeFrequencyTracks
class
source
ModeFrequencyTracks(model: str, modes: tuple[tuple[int, int], ...], tracks: tuple[ModeFrequencyTrack, ...], provenance: Mapping[str, Any] = <factory>) -> None
The tracks of one request, the model that drew them and how.
Also exported as vaft.process.ModeFrequencyTracks.
4 fields
model: strmodes: tuple[tuple[int, int], ...]tracks: tuple[ModeFrequencyTrack, ...]provenance: Mapping[str, Any]
vaft.process.nbi
Reduced neutral-beam attenuation along a prescribed 1-D path (vaft #1136).
neutral_beam_attenuation_along_path — Neutral survival, fast-ion birth and shine-through of one beam component on a 1-D path. Reference source
Also exported as vaft.process.neutral_beam_attenuation_along_path.
NeutralBeamAttenuation
class
source
NeutralBeamAttenuation(s: np.ndarray, alpha: np.ndarray, optical_depth: np.ndarray, survival_fraction: np.ndarray, cell_centers: np.ndarray, birth_fraction_per_cell: np.ndarray, birth_fraction_density: np.ndarray, shine_through_fraction: float, absorbed_neutral_fraction: float, particle_rate: Optional[float] = None, birth_rate_density: Optional[np.ndarray] = None, power_birth_profile: Optional[np.ndarray] = None, shine_through_power: Optional[float] = None, absorbed_beam_power: Optional[float] = None) -> None
What the reduced attenuation model says about one beam component along its path.
Also exported as vaft.process.NeutralBeamAttenuation.
14 fields
s: np.ndarrayalpha: np.ndarrayoptical_depth: np.ndarraysurvival_fraction: np.ndarraycell_centers: np.ndarraybirth_fraction_per_cell: np.ndarraybirth_fraction_density: np.ndarrayshine_through_fraction: floatabsorbed_neutral_fraction: floatparticle_rate: Optional[float]birth_rate_density: Optional[np.ndarray]power_birth_profile: Optional[np.ndarray]shine_through_power: Optional[float]absorbed_beam_power: Optional[float]
vaft.process.ntv_coil_response
Quadratic coil-response model of a signed NTV torque, and its qualification.
budgeted_torque_extrema — Largest and smallest signed torque over free complex excitations with c^H D c = budget. Reference source
Also exported as vaft.process.budgeted_torque_extrema.
coil_phasors — Complex excitation phasors A_k exp(+i phi_k) of the coil groups. Reference source
Also exported as vaft.process.coil_phasors.
fit_inhomogeneous_torque — Least-squares T = T0 + 2 Re(b^H c) + c^H Q c, to test whether T0 and b vanish. Reference source
Also exported as vaft.process.fit_inhomogeneous_torque.
fixed_amplitude_phase_extrema — Phases of the largest and smallest signed torque with every group amplitude fixed. Reference source
Also exported as vaft.process.fixed_amplitude_phase_extrema.
hermitian_torque_matrix — The Hermitian Q of T = c^H Q c from the probe torques. Reference source
Also exported as vaft.process.hermitian_torque_matrix.
ntv_operating_space — Direct NTV torques (and a qualified model) as a #1178 coil operating-space result. Reference source
Also exported as vaft.process.ntv_operating_space.
NTV_QUADRATIC_STATUSES
data
NTV_QUADRATIC_STATUSES = ('qualified', 'rejected', 'insufficient')
quadratic_invariance_checks — Tests of a pure quadratic response that need no Q: scaling, sign, common phase. Reference source
Also exported as vaft.process.quadratic_invariance_checks.
quadratic_probe_design — The K^2 unit excitations that determine a Hermitian Q. Reference source
Also exported as vaft.process.quadratic_probe_design.
quadratic_torque — Signed torque c^H Q c of one excitation or a stack of them. Reference source
Also exported as vaft.process.quadratic_torque.
QuadraticTorqueCheck
class
source
QuadraticTorqueCheck(name: str, passed: bool, max_abs_error: float, max_rel_error: float, samples: int) -> None
One test of the quadratic hypothesis against direct evaluations.
Also exported as vaft.process.QuadraticTorqueCheck.
5 fields
name: strpassed: boolmax_abs_error: floatmax_rel_error: floatsamples: int
qualify_torque_matrix — Qualify or reject a Q against direct evaluations it was not built from. Reference source
Also exported as vaft.process.qualify_torque_matrix.
TorqueMatrixQualification
class
source
TorqueMatrixQualification(status: str, Q: np.ndarray, eigenvalues: np.ndarray, checks: tuple[QuadraticTorqueCheck, ...], reasons: tuple[str, ...], provenance: Mapping[str, object] = <factory>) -> None
Whether a reconstructed Q reproduces evaluations it was not built from.
Also exported as vaft.process.TorqueMatrixQualification.
6 fields
status: strQ: np.ndarrayeigenvalues: np.ndarraychecks: tuple[QuadraticTorqueCheck, ...]reasons: tuple[str, ...]provenance: Mapping[str, object]
vaft.process.numerical
Numerical primitives on plain arrays.
vaft.process.onset
Onset and active-window primitives on plain arrays (issue #409).
active_window — The window over which a waveform is active, onset to offset. Reference source
Also exported as vaft.process.active_window.
excess_threshold — Baseline, spread, peak and activity threshold of one waveform. Reference source
Also exported as vaft.process.excess_threshold.
isolated_excursions — How many runs above a threshold are shorter than a given length. Reference source
Also exported as vaft.process.isolated_excursions.
median_smooth — Median filter that removes excursions shorter than half the kernel. Reference source
Also exported as vaft.process.median_smooth.
OnsetRecord
class
source
OnsetRecord(time: float | None, index: int | None, method: str, evidence: Mapping[str, Any] = <factory>, flags: tuple[str, ...] = (), rejected: tuple[tuple[float, str, RunFeatures], ...] = (), accepted: RunFeatures | None = None) -> None
What one detector concluded about one waveform.
Also exported as vaft.process.OnsetRecord.
PeakRecord
class
source
PeakRecord(value: float | None, time: float | None, index: int | None, excess: float | None, method: str = 'robust_peak', evidence: Mapping[str, Any] = <factory>, flags: tuple[str, ...] = (), rejected: tuple[tuple[float, str, RunFeatures], ...] = (), accepted: RunFeatures | None = None) -> None
What robust_peak concluded about one waveform.
Also exported as vaft.process.PeakRecord.
pickup_scale — The record’s own impulsive-excursion amplitude. Reference source
Also exported as vaft.process.pickup_scale.
principal_pulse_onset — Onset of the pulse that contains the global maximum. Reference source
Also exported as vaft.process.principal_pulse_onset.
principal_pulse_window — (onset, offset) of the pulse holding the global maximum. Reference source
Also exported as vaft.process.principal_pulse_window.
PulseWindow
class
source
PulseWindow(onset: OnsetRecord, offset: OnsetRecord, segments: tuple[RunFeatures, ...] = (), flags: tuple[str, ...] = (), evidence: Mapping[str, Any] = <factory>) -> None
When a waveform is active: its onset, its offset, and the segments between.
Also exported as vaft.process.PulseWindow.
5 fields · 7 members
onset: OnsetRecordoffset: OnsetRecordsegments: tuple[RunFeatures, ...]flags: tuple[str, ...]evidence: Mapping[str, Any]foundproperty sourcestartproperty sourceendproperty sourceduration_sproperty — Extent of the window:offset - onset, gaps included. sourceactive_sproperty — How much of the window is actually above threshold. sourceduty_cycleproperty —active_s / duration_s: 1 for one uninterrupted run, less with gaps. sourceas_dictmethod source
robust_baseline — Median and robust sigma (1.4826 * MAD) over the reference samples. Reference source
Also exported as vaft.process.robust_baseline.
robust_peak — The representative peak of a record: its largest sustained excursion, not its loudest sample. Reference source
Also exported as vaft.process.robust_peak.
run_features — Width, peak, prominence and integral of one run above a baseline. Reference source
Also exported as vaft.process.run_features.
RunFeatures
class
source
RunFeatures(start_time: float, end_time: float, width_s: float, samples: int, peak: float, peak_time: float, prominence: float, integral: float) -> None
Temporal-shape features of one contiguous run above threshold.
Also exported as vaft.process.RunFeatures.
8 fields · 1 members
start_time: floatend_time: floatwidth_s: floatsamples: intpeak: floatpeak_time: floatprominence: floatintegral: floatas_dictmethod source
sustained_excess_onset — First run above the threshold that persists and has the right shape. Reference source
Also exported as vaft.process.sustained_excess_onset.
vaft.process.ordering_state
Asymptotic ordering quantities of measured plasma states (#1627 §2, for the #1629 atlas).
contract_population — Evaluate one contract on the table its orderings live on. Reference source
Also exported as vaft.process.contract_population.
COVERAGE_TIERS
data
COVERAGE_TIERS = <builtins.dict>
DEFAULT_COLUMNS
data
DEFAULT_COLUMNS = <builtins.dict>
global_ordering_quantities — The global ordering quantities of one plasma state, NaN where an input is missing. Reference source
Also exported as vaft.process.global_ordering_quantities.
ordering_coverage — The fraction of states (or profile points) with a finite value, per ordering quantity, by #1627 tier. Reference source
Also exported as vaft.process.ordering_coverage.
ordering_inputs_from_ods — The ordering quantities of one ODS state, by name, for an adapter’s advisory check (#1823). Reference source
Also exported as vaft.process.ordering_inputs_from_ods.
ordering_margins — Median ordering margin and the fraction on the permitted side, per assessable ordering. Reference source
Also exported as vaft.process.ordering_margins.
ordering_table — The global and time-history ordering quantities of every state in a table. Reference source
Also exported as vaft.process.ordering_table.
OrderingInputs
class
source
OrderingInputs(state: Mapping[str, float], points: Optional[Mapping[str, Any]] = None, provenance: Mapping[str, Any] = <factory>) -> None
The ordering quantities of one ODS state, ready for an adapter’s advisory check.
Also exported as vaft.process.OrderingInputs.
3 fields
state: Mapping[str, float]points: Optional[Mapping[str, Any]]provenance: Mapping[str, Any]
vaft.process.perturbation
Resonant response at the rational surfaces: windows, reductions, ratios.
align_surfaces_by_q — Match rational surfaces across toroidal mode numbers by their q. Reference source
Also exported as vaft.process.align_surfaces_by_q.
AlignedSurface
class
source
AlignedSurface(q: float, members: tuple[SurfaceMember, ...]) -> None
One rational q, and where each mode stands on it.
Also exported as vaft.process.AlignedSurface.
2 fields · 1 members
q: floatmembers: tuple[SurfaceMember, ...]resonant_modesproperty — The mode numbers that actually have a surface here. source
amplification_ratio — How much larger one run’s resonant response is than another’s. Reference source
Also exported as vaft.process.amplification_ratio.
chirikov — The island-overlap parameter, by either of the two definitions in use. Reference source
Also exported as vaft.process.chirikov.
COINCIDENT_POLICIES
data
COINCIDENT_POLICIES = ('envelope', 'rss')
composite_drive_at_q — Sum one resonant column over every mode that resonates at a given q. Reference source
Also exported as vaft.process.composite_drive_at_q.
CompositeDrive
class
source
CompositeDrive(q: float, modes: tuple[int, ...], contributions: tuple[complex, ...], peak: float, peak_angle: float, quadrature: float, linear_bound: float) -> None
A drive summed over the modes that share one rational surface.
Also exported as vaft.process.CompositeDrive.
7 fields
q: floatmodes: tuple[int, ...]contributions: tuple[complex, ...]peak: floatpeak_angle: floatquadrature: floatlinear_bound: float
critical_island_width — The island width at which a surface’s islands reach its neighbour’s. Reference source
Also exported as vaft.process.critical_island_width.
DELTA_E_COMBINATIONS
data
DELTA_E_COMBINATIONS = ('quadrature', 'linear')
dominant_mode — The leading direction of a coupling matrix, weighted by surface area. Reference source
Also exported as vaft.process.dominant_mode.
DominantMode
class
source
DominantMode(singular_value: float, control_vector: np.ndarray, response_vector: np.ndarray) -> None
The leading direction of an area-weighted coupling matrix.
Also exported as vaft.process.DominantMode.
3 fields
singular_value: floatcontrol_vector: np.ndarrayresponse_vector: np.ndarray
edge_overlap_metric — How much of an external field lands on the dominant coupling mode. Reference source
Also exported as vaft.process.edge_overlap_metric.
EdgeOverlap
class
source
EdgeOverlap(delta_e: float, projection: np.ndarray, singular_values: np.ndarray, dominant_mode: int, b_t0: float) -> None
How much of an external field drives the dominant coupling mode.
Also exported as vaft.process.EdgeOverlap.
5 fields
delta_e: floatprojection: np.ndarraysingular_values: np.ndarraydominant_mode: intb_t0: float
energy_norm_matrix — The inverse square root of an energy matrix, from its eigendecomposition. Reference source
Also exported as vaft.process.energy_norm_matrix.
finite_width_delta — The jump in a field’s radial derivative across a finite-width layer. Reference source
Also exported as vaft.process.finite_width_delta.
group_coincident_islands — Collapse islands that sit on the same surface into one. Reference source
Also exported as vaft.process.group_coincident_islands.
helical_phase_sweep — The composite drive at one surface, as a function of the helical angle. Reference source
Also exported as vaft.process.helical_phase_sweep.
island_overlap_width — How far in from the boundary the islands overlap without a break. Reference source
Also exported as vaft.process.island_overlap_width.
island_pairs — Every adjacent pair of islands, with the gap between their separatrices. Reference source
Also exported as vaft.process.island_pairs.
IslandOverlap
class
source
IslandOverlap(width: float, first_gap_psi_norm: float | None, first_gap_inner: float | None, first_gap_outer: float | None, edge_connected: bool, onset_scale: float | None, max_surface_chirikov: float | None, max_pair_chirikov: float | None, separatrix_psi_norm: float, policy: str) -> None
How far in from the boundary the islands are continuously overlapping.
Also exported as vaft.process.IslandOverlap.
10 fields
width: floatfirst_gap_psi_norm: float | Nonefirst_gap_inner: float | Nonefirst_gap_outer: float | Noneedge_connected: boolonset_scale: float | Nonemax_surface_chirikov: float | Nonemax_pair_chirikov: float | Noneseparatrix_psi_norm: floatpolicy: str
IslandPairs
class
source
IslandPairs(inner_index: np.ndarray, outer_index: np.ndarray, inner_psi_norm: np.ndarray, outer_psi_norm: np.ndarray, spacing: np.ndarray, inner_right: np.ndarray, outer_left: np.ndarray, gap: np.ndarray, chirikov: np.ndarray, overlaps: np.ndarray) -> None
Adjacent island pairs, sorted outward, and whether each touches.
Also exported as vaft.process.IslandPairs.
10 fields
inner_index: np.ndarrayouter_index: np.ndarrayinner_psi_norm: np.ndarrayouter_psi_norm: np.ndarrayspacing: np.ndarrayinner_right: np.ndarrayouter_left: np.ndarraygap: np.ndarraychirikov: np.ndarrayoverlaps: np.ndarray
jump_width — The resistive-layer width a Lundquist number implies. Reference source
Also exported as vaft.process.jump_width.
JumpWidthModel
class
source
JumpWidthModel(floor: float, scale: float, name: str = '') -> None
A resistive-layer width law w = floor + scale * S**(-1/3).
Also exported as vaft.process.JumpWidthModel.
3 fields
floor: floatscale: floatname: str
LEGACY_WINDOWS
data
LEGACY_WINDOWS = <builtins.dict>
lundquist_number — The Lundquist number, the resistive over the Alfven time. Reference source
Also exported as vaft.process.lundquist_number.
nearest_surface_spacing — Distance from each rational surface to its nearest neighbour. Reference source
Also exported as vaft.process.nearest_surface_spacing.
NEGATIVE_EIGENVALUE_POLICIES
data
NEGATIVE_EIGENVALUE_POLICIES = ('raise', 'abs', 'drop')
PAPER_JUMP_WIDTH
data
PAPER_JUMP_WIDTH = <vaft.process.perturbation.JumpWidthModel>
penetration_ratio — Island width as a fraction of the width at which islands would overlap. Reference source
Also exported as vaft.process.penetration_ratio.
q_composite_table — One row per rational surface, summed over the modes that reach it. Reference source
Also exported as vaft.process.q_composite_table.
reduce_delta_e — Combine a per-mode edge-overlap metric into one number. Reference source
Also exported as vaft.process.reduce_delta_e.
reduce_resonant — Reduce one resonant column over one radial window. Reference source
Also exported as vaft.process.reduce_resonant.
resonant_delta — The resonance parameter from the jump in a stored spectral field. Reference source
Also exported as vaft.process.resonant_delta.
resonant_geometric_factor — Measure the surface factor that turns a resonance parameter into a flux. Reference source
Also exported as vaft.process.resonant_geometric_factor.
resonant_metrics — Reduce every named column of a resonant table over every window. Reference source
Also exported as vaft.process.resonant_metrics.
RESONANT_RESPONSE_COLUMNS
data
RESONANT_RESPONSE_COLUMNS = ('Phi_res', 'Phi_res_v', 'Phi_res_crit', 'Phi_res_crit_callen', 'Delta', 'B_pen', 'I_res', 'w_isl', 'w_isl_v', 'w_isl...
RESONANT_STATISTICS
data
RESONANT_STATISTICS = ('rms', 'max', 'min', 'mean', 'sum')
resonant_windows — The core, edge and total radial windows a reduction is taken over. Reference source
Also exported as vaft.process.resonant_windows.
ResonantJump
class
source
ResonantJump(psi_norm: float, m_pol: int, n_tor: int, delta: complex, offset: float) -> None
The discontinuity of one resonant harmonic across its own surface.
Also exported as vaft.process.ResonantJump.
5 fields
psi_norm: floatm_pol: intn_tor: intdelta: complexoffset: float
ResonantWindow
class
source
ResonantWindow(name: str, low: float, high: float, source: str) -> None
A radial interval a reduction was taken over, and where it came from.
Also exported as vaft.process.ResonantWindow.
4 fields · 1 members
name: strlow: floathigh: floatsource: strmaskmethod — Which samples ofpsi_normfall inside, endpoints included. source
rms_resonant_field — Root-mean-square resonant field over a radial window. Reference source
Also exported as vaft.process.rms_resonant_field.
shielded_field — The field a finite-width layer’s shielding current produces. Reference source
Also exported as vaft.process.shielded_field.
SINGULAR_OFFSET
data
SINGULAR_OFFSET = 0.0005
SURFACE_MEMBERSHIPS
data
SURFACE_MEMBERSHIPS = ('resonant', 'non_resonant', 'absent')
SurfaceMember
class
source
SurfaceMember(n: int, membership: str, m: int | None = None, index: int | None = None, psi_norm: float | None = None) -> None
One toroidal mode’s standing at one aligned rational surface.
Also exported as vaft.process.SurfaceMember.
5 fields
n: intmembership: strm: int | Noneindex: int | Nonepsi_norm: float | None
toroidal_phase_audit — Test a stored toroidal harmonic against the same field resampled in real space. Reference source
Also exported as vaft.process.toroidal_phase_audit.
ToroidalPhaseAudit
class
source
ToroidalPhaseAudit(n_tor: int, preferred: str | None, stored_relative_norm: float, conjugate_relative_norm: float, stored_component_relative_norm: tuple[float, ...], conjugate_component_relative_norm: tuple[float, ...], separation_ratio: float, stored_norm: float, measured_norm: float, sample_count: int, phi_sample_count: int) -> None
How a stored set of toroidal harmonics compares with a resampled field.
Also exported as vaft.process.ToroidalPhaseAudit.
11 fields
n_tor: intpreferred: str | Nonestored_relative_norm: floatconjugate_relative_norm: floatstored_component_relative_norm: tuple[float, ...]conjugate_component_relative_norm: tuple[float, ...]separation_ratio: floatstored_norm: floatmeasured_norm: floatsample_count: intphi_sample_count: int
ZERO_MEANS_NOT_COMPUTED
data
ZERO_MEANS_NOT_COMPUTED = ('Phi_res_crit', 'Phi_res_crit_callen', 'w_isl_v_crit', 'w_isl_sat', 'w_isl_min')
vaft.process.profile
Kinetic profiles: from diagnostic points to a stored core_profiles slice.
analytic_hmode_itb_state — H-mode + ITB kinetic state: smooth core, internal barrier and edge pedestal composed. Reference source
Also exported as vaft.process.analytic_hmode_itb_state.
analytic_hmode_state — H-mode-like kinetic state: a smooth core on an edge-localized pedestal. Reference source
Also exported as vaft.process.analytic_hmode_state.
analytic_itb_state — ITB-like kinetic state: a smooth profile with an internal transport barrier per channel. Reference source
Also exported as vaft.process.analytic_itb_state.
analytic_lmode_state — Smooth L-mode-like kinetic state: generalized parabolic profiles with no barrier. Reference source
Also exported as vaft.process.analytic_lmode_state.
compare_flux_mapping — Map one diagnostic’s channels through several equilibria, to see how much the mapping moves them. Reference source
Also exported as vaft.process.compare_flux_mapping.
compose_analytic_profile — Compose one kinetic profile from a smooth core, an optional edge pedestal and an optional ITB. Reference source
Also exported as vaft.process.compose_analytic_profile.
compose_plasma_state — Assemble prescribed n_e, T_e and T_i profiles into one kinetic state with derived pressure. Reference source
Also exported as vaft.process.compose_plasma_state.
COORDINATES
data
COORDINATES = ('rho_tor_norm', 'rho_pol_norm', 'psi_norm')
core_profiles — Evaluate fitted kinetic profiles on the equilibrium grid and store them as a profiles_1d slice. Reference source
Also exported as vaft.process.core_profiles.
core_profiles_from_eq — Build a synthetic core_profiles slice from the equilibrium pressure and an axis T_e. Reference source
Also exported as vaft.process.core_profiles_from_eq.
core_profiles_from_eq_ratio — Build a synthetic core_profiles slice from the equilibrium pressure and a fixed n_e/T_e. Reference source
Also exported as vaft.process.core_profiles_from_eq_ratio.
equilibrium_mapping_charge_exchange — Map charge-exchange channel positions into the equilibrium’s radial coordinates. Reference source
Also exported as vaft.process.equilibrium_mapping_charge_exchange.
equilibrium_mapping_points — Map arbitrary (R, Z) points into the equilibrium’s radial coordinates. Reference source
Also exported as vaft.process.equilibrium_mapping_points.
equilibrium_mapping_thomson_scattering — Map Thomson scattering channel positions into the equilibrium’s radial coordinates. Reference source
Also exported as vaft.process.equilibrium_mapping_thomson_scattering.
evaluate_analytic_profile — Evaluate an analytic profile, or its gradient against normalized flux, anywhere in [0, 1]. Reference source
Also exported as vaft.process.evaluate_analytic_profile.
evaluate_plasma_state — Evaluate one quantity of an analytic plasma state at any normalized flux. Reference source
Also exported as vaft.process.evaluate_plasma_state.
export_electron_profile_txt — Write fitted electron profiles, sampled on a uniform grid, to a text file. Reference source
Also exported as vaft.process.export_electron_profile_txt.
fit_ti_te_ratio — Fit the proportionality coefficient alpha of Ti = alpha * Te. Reference source
Also exported as vaft.process.fit_ti_te_ratio.
FitReport
class
source
FitReport(quantity: str, unit: str, coordinate: str, method: str, order_requested: int | None, order_used: int | None, time: float, time_index: int, position: np.ndarray, value: np.ndarray, sigma: np.ndarray, sigma_used: np.ndarray, fitted: np.ndarray, normalized_residual: np.ndarray, used: np.ndarray, rejected_reason: tuple[str, ...], n_parameters: float, parameter_count_definition: str, chi_squared: float, degrees_of_freedom: float, reduced_chi_squared: float, function: FittedProfile, grid: np.ndarray, curve: np.ndarray, curve_std: np.ndarray | None = None, notes: tuple[str, ...] = ()) -> None
How well one fitted profile reproduces the channels it was fitted to (#952).
Also exported as vaft.process.FitReport.
26 fields · 5 members
quantity: strunit: strcoordinate: strmethod: strorder_requested: int | Noneorder_used: int | Nonetime: floattime_index: intposition: numpy.ndarrayvalue: numpy.ndarraysigma: numpy.ndarraysigma_used: numpy.ndarrayfitted: numpy.ndarraynormalized_residual: numpy.ndarrayused: numpy.ndarrayrejected_reason: tuple[str, ...]n_parameters: floatparameter_count_definition: strchi_squared: floatdegrees_of_freedom: floatreduced_chi_squared: floatfunction: FittedProfilegrid: numpy.ndarraycurve: numpy.ndarraycurve_std: numpy.ndarray | Nonenotes: tuple[str, ...]coefficientsproperty — The fitted coefficients,Nonefor a method without any. sourcerejectedproperty — Channel indices the fit refused. sourcen_usedproperty sourcefitted_stdproperty — The fit’s own uncertainty at each channel, when the method has one (GP). sourcesummarymethod — One line: chi-square, degrees of freedom and what was refused. source
FittedProfile
class
source
FittedProfile(function: object, coordinate: str, method: str, order: int | None, coefficients: object = None, span: tuple[float, float] | None = None) -> None
A fitted 1-D profile that knows which radial coordinate it is a function of.
Also exported as vaft.process.FittedProfile.
6 fields · 1 members
function: objectcoordinate: strmethod: strorder: int | Nonecoefficients: objectspan: tuple[float, float] | Noneparameters_textmethod — The*_fit.parametersrecord: what produced this curve. source
generate_synthetic_kinetic_profiles — Generate n_e, T_e, T_i and the ion densities from an equilibrium and declared assumptions. Reference source
Also exported as vaft.process.generate_synthetic_kinetic_profiles.
LEGACY_COORDINATE
data
LEGACY_COORDINATE = 'psi_norm'
MappedPositions
class
source
MappedPositions(psi_norm: np.ndarray, rho_pol_norm: np.ndarray, rho_tor_norm: np.ndarray | None, rho_tor_norm_unavailable: str | None, source: str) -> None
Diagnostic channel positions in every radial coordinate the equilibrium supports.
Also exported as vaft.process.MappedPositions.
5 fields · 3 members
psi_norm: numpy.ndarrayrho_pol_norm: numpy.ndarrayrho_tor_norm: numpy.ndarray | Nonerho_tor_norm_unavailable: str | Nonesource: strn_channelsproperty sourceavailablemethod — The coordinates this mapping can hand out, in preference order. sourceselectmethod — The channel positions incoordinate, or a refusal saying why not. source
NE_DYNAMIC_RANGE_MAX
data
NE_DYNAMIC_RANGE_MAX = 1000.0
PEDESTAL_FALLBACK_PSI_NORM
data
PEDESTAL_FALLBACK_PSI_NORM = 0.85
PEDESTAL_RESOLUTION_FACTOR
data
PEDESTAL_RESOLUTION_FACTOR = 3.0
pedestal_top — Pedestal-top position of a profile, from an EPED-style fit. Reference source
Also exported as vaft.process.pedestal_top.
PedestalTop
class
source
PedestalTop(position: float, method: str, quantity: str, coordinate: str, width: float | None = None, fit: FittedProfile | None = None, reason: str = '') -> None
Where the pedestal top is, and how that was decided.
Also exported as vaft.process.PedestalTop.
7 fields · 2 members
position: floatmethod: strquantity: strcoordinate: strwidth: float | Nonefit: FittedProfile | Nonereason: strfrom_fitproperty — Whether a pedestal was actually resolved, rather than assumed. sourceinner_edgeproperty — The pedestal’s inner knee,position - width/2;Nonewithout a fit. source
PHYSICAL_EDGE_MAX
data
PHYSICAL_EDGE_MAX = 0.98
PHYSICAL_PSIN_MAX
data
PHYSICAL_PSIN_MAX = 0.98
profile_fit_report_charge_exchange — Fit charge-exchange T_i and V_tor and report how well each fit reproduces its channels. Reference source
Also exported as vaft.process.profile_fit_report_charge_exchange.
profile_fit_report_thomson_scattering — Fit Thomson T_e and n_e and report how well each fit reproduces its channels. Reference source
Also exported as vaft.process.profile_fit_report_thomson_scattering.
profile_fitting_charge_exchange — Fit charge-exchange T_i and V_tor profiles in a chosen radial coordinate. Reference source
Also exported as vaft.process.profile_fitting_charge_exchange.
profile_fitting_thomson_scattering — Fit Thomson-scattering T_e and n_e profiles in a chosen radial coordinate. Reference source
Also exported as vaft.process.profile_fitting_thomson_scattering.
project_flux_function — Map a flux function f(psi_norm) onto an equilibrium’s (R, Z) grid. Reference source
Also exported as vaft.process.project_flux_function.
project_plasma_state — Project one quantity of an analytic plasma state onto an equilibrium’s (R, Z) grid. Reference source
Also exported as vaft.process.project_plasma_state.
spec_from_plasma_state — The generator spec that reproduces a #1045 analytic plasma state on any equilibrium. Reference source
Also exported as vaft.process.spec_from_plasma_state.
strip_electron_only_pressure — Drop slice-total pressure from every core_profiles slice with no ion temperature. Reference source
Also exported as vaft.process.strip_electron_only_pressure.
TE_POSITIVE_EDGE_MAX
data
TE_POSITIVE_EDGE_MAX = 0.98
TE_POSITIVE_PSIN_MAX
data
TE_POSITIVE_PSIN_MAX = 0.98
TOTAL_PRESSURE_LEAVES
data
TOTAL_PRESSURE_LEAVES = ('pressure_thermal', 'pressure', 'pressure_ion_total', 'pressure_ion_total_thermal', 'pressure_parallel', 'pressure_p...
vaft.process.profile_gradients
Profile gradients with an explicit coordinate, gradient coordinate and reference length.
ConventionPreset
class
source
ConventionPreset(name: str, description: str, source: str, gradient_coordinate: str | None = None, reference_length: str | None = None, required: tuple[str, ...] = ()) -> None
What one code’s gradient normalization is, and where that statement comes from.
Also exported as vaft.process.ConventionPreset.
6 fields
name: strdescription: strsource: strgradient_coordinate: str | Nonereference_length: str | Nonerequired: tuple[str, ...]
CONVENTIONS
data
CONVENTIONS = <builtins.dict>
profile_gradient — The normalized logarithmic gradient -L d ln f/dx_g of a radial profile. Reference source
Also exported as vaft.process.profile_gradient.
ProfileGradient
class
source
ProfileGradient(values: np.ndarray, coordinate: np.ndarray, coordinate_name: str, unit: str, metadata: Mapping[str, Any] = <factory>) -> None
A normalized logarithmic gradient, with everything needed to reproduce it.
Also exported as vaft.process.ProfileGradient.
5 fields
values: np.ndarraycoordinate: np.ndarraycoordinate_name: strunit: strmetadata: Mapping[str, Any]
radial_coordinate_map — Every registered radial coordinate on one equilibrium slice’s psi grid. Reference source
Also exported as vaft.process.radial_coordinate_map.
radial_coordinate_map_from_arrays — A coordinate map from per-surface arrays a code or file already carries. Reference source
Also exported as vaft.process.radial_coordinate_map_from_arrays.
RADIAL_COORDINATES
data
RADIAL_COORDINATES = <builtins.dict>
RadialCoordinate
class
source
RadialCoordinate(name: str, unit: str, kind: str, range: tuple[float, float] | None, definition: str) -> None
One radial coordinate of the registry: its name, unit, kind, range and definition.
Also exported as vaft.process.RadialCoordinate.
5 fields
name: strunit: strkind: strrange: tuple[float, float] | Nonedefinition: str
RadialCoordinateMap
class
source
RadialCoordinateMap(coordinates: Mapping[str, Any], a_minor: Any, R_major_axis: Any, time: float | None = None, source: str = 'unknown') -> None
Every registered radial coordinate on one set of flux surfaces.
Also exported as vaft.process.RadialCoordinateMap.
REFERENCE_LENGTHS
data
REFERENCE_LENGTHS = (None, 'a_minor', 'R_major_axis', 'R_major_surface', 'L_ref')
ReferenceLength
class
source
ReferenceLength(name: str | None, symbol: str | None, length: Any = None) -> None
A normalizing length together with what it physically is.
Also exported as vaft.process.ReferenceLength.
resolve_convention — The explicit gradient coordinate and reference length a code convention stands for. Reference source
Also exported as vaft.process.resolve_convention.
resolve_reference_length — The reference length a normalized gradient is multiplied by, with its definition. Reference source
Also exported as vaft.process.resolve_reference_length.
UNSET
data
UNSET = <vaft.process.profile_gradients._Unset>
vaft.process.q_profile_context
Equilibrium context for core low-n MHD interpretation (#1798, child of #1797).
core_q_context — Core q / rational / low-shear / boundary context of one ODS equilibrium slice. Reference source
Also exported as vaft.process.core_q_context.
core_q_context_from_profiles — Core q-profile, rational-surface, low-shear and boundary context from 1-D profiles. Reference source
Also exported as vaft.process.core_q_context_from_profiles.
CoreQContext
class
source
CoreQContext(time_slice: Optional[int], time: Optional[float], coordinate: str, q_sign: int, q_axis: float, psi_n_at_q_axis: float, axis_q_outlier: bool, q_min: float, psi_n_at_q_min: float, rho_at_q_min: float, q_min_on_axis: bool, q_profile_topology: str, shear_sign_changes_rho: tuple[float, ...], q95: Optional[float], q95_reason: str, q_boundary: Optional[float], q_boundary_reason: str, boundary_topology: str, boundary_reason: str, rational_surfaces: tuple[RationalCrossing, ...], rational_proximity: tuple[RationalProximity, ...], double_resonant_pairs: tuple[DoubleResonantPair, ...], low_shear_regions: tuple[LowShearRegion, ...], near_rational_low_shear_regions: tuple[NearRationalLowShearRegion, ...], pressure_inside_q1: tuple[EnclosedPressure, ...], pressure_inside_q1_reason: str, provenance: Mapping[str, Any] = <factory>) -> None
Equilibrium descriptors for core low-n MHD interpretation at one time slice.
Also exported as vaft.process.CoreQContext.
27 fields · 3 members
time_slice: Optional[int]time: Optional[float]coordinate: strq_sign: intq_axis: floatpsi_n_at_q_axis: floataxis_q_outlier: boolq_min: floatpsi_n_at_q_min: floatrho_at_q_min: floatq_min_on_axis: boolq_profile_topology: strshear_sign_changes_rho: tuple[float, ...]q95: Optional[float]q95_reason: strq_boundary: Optional[float]q_boundary_reason: strboundary_topology: strboundary_reason: strrational_surfaces: tuple[RationalCrossing, ...]rational_proximity: tuple[RationalProximity, ...]double_resonant_pairs: tuple[DoubleResonantPair, ...]low_shear_regions: tuple[LowShearRegion, ...]near_rational_low_shear_regions: tuple[NearRationalLowShearRegion, ...]pressure_inside_q1: tuple[EnclosedPressure, ...]pressure_inside_q1_reason: strprovenance: Mapping[str, Any]q1_surfacesproperty sourceq1_surface_countproperty sourceas_recordmethod — A JSON-ready summary; non-finite numbers become None. source
DEFAULT_Q_NOISE_ATOL
data
DEFAULT_Q_NOISE_ATOL = 0.02
DEFAULT_Q_NOISE_RTOL
data
DEFAULT_Q_NOISE_RTOL = 0.02
DEFAULT_RATIONALS
data
DEFAULT_RATIONALS = <builtins.tuple>
DoubleResonantPair
class
source
DoubleResonantPair(m: int, n: int, inner: RationalCrossing, outer: RationalCrossing) -> None
Two consecutive surfaces of the same m/n (a reversed-shear configuration).
Also exported as vaft.process.DoubleResonantPair.
4 fields · 1 members
m: intn: intinner: RationalCrossingouter: RationalCrossingdelta_rhoproperty source
EnclosedPressure
class
source
EnclosedPressure(psi_n: float, rho: float, volume: float, integrated_pressure: float) -> None
Pressure inside one flux surface: integral p dV and its volume mean.
Also exported as vaft.process.EnclosedPressure.
4 fields · 1 members
psi_n: floatrho: floatvolume: floatintegrated_pressure: floatmean_pressureproperty source
low_shear_regions — Connected radial intervals where |s| < threshold. Reference source
Also exported as vaft.process.low_shear_regions.
LowShearRegion
class
source
LowShearRegion(threshold: float, rho_start: float, rho_end: float, psi_n_start: float, psi_n_end: float, contains_axis: bool, contains_q_min: bool, contains_q1_surface: bool, q_low: float, q_high: float, mean_shear: float, max_abs_shear: float, pressure_drop: Optional[float] = None, mean_abs_pressure_gradient: Optional[float] = None, max_abs_pressure_gradient: Optional[float] = None) -> None
One connected radial interval with |s| < threshold (threshold kept explicit).
Also exported as vaft.process.LowShearRegion.
15 fields · 1 members
threshold: floatrho_start: floatrho_end: floatpsi_n_start: floatpsi_n_end: floatcontains_axis: boolcontains_q_min: boolcontains_q1_surface: boolq_low: floatq_high: floatmean_shear: floatmax_abs_shear: floatpressure_drop: Optional[float]mean_abs_pressure_gradient: Optional[float]max_abs_pressure_gradient: Optional[float]width_rhoproperty source
NearRationalLowShearRegion
class
source
NearRationalLowShearRegion(m: int, n: int, shear_threshold: float, delta_q_threshold: float, rho_start: float, rho_end: float, min_abs_delta_q: float, rho_at_min_abs_delta_q: float, mean_abs_shear: float) -> None
Where |s| < shear_threshold and |q - m/n| < delta_q_threshold together.
Also exported as vaft.process.NearRationalLowShearRegion.
9 fields · 1 members
m: intn: intshear_threshold: floatdelta_q_threshold: floatrho_start: floatrho_end: floatmin_abs_delta_q: floatrho_at_min_abs_delta_q: floatmean_abs_shear: floatwidth_rhoproperty source
RationalCrossing
class
source
RationalCrossing(m: int, n: int, q_target: float, psi_n: float, rho: float, shear: Optional[float], root_index: int) -> None
One surface where |q| = m/n, with the signed local shear there.
Also exported as vaft.process.RationalCrossing.
7 fields
m: intn: intq_target: floatpsi_n: floatrho: floatshear: Optional[float]root_index: int
RationalProximity
class
source
RationalProximity(m: int, n: int, q_rational: float, delta_q: float, crossing_count: int, tangent_candidate: bool) -> None
How far q_min sits from m/n: a descriptor, never a surface claim.
Also exported as vaft.process.RationalProximity.
6 fields · 1 members
m: intn: intq_rational: floatdelta_q: floatcrossing_count: inttangent_candidate: boolabs_delta_qproperty source
vaft.process.resistive_zeff
Resistive effective charge from the transformer balance and a conductivity model.
FluxSurfaceState
class
source
FluxSurfaceState(time: float, psi_norm: np.ndarray, volume: np.ndarray, T_e: np.ndarray, n_e: np.ndarray, q: np.ndarray, r_inboard: np.ndarray, r_outboard: np.ndarray, j_dot_b: np.ndarray, b2_average: np.ndarray, I_p: float, trapped_fraction: Optional[np.ndarray] = None, j_bootstrap_dot_b: Optional[np.ndarray] = None, bootstrap_model: str = 'none', source: Mapping[str, Any] = <factory>) -> None
One equilibrium slice and its electron profiles on a common flux grid.
Also exported as vaft.process.FluxSurfaceState.
15 fields · 3 members
time: floatpsi_norm: np.ndarrayvolume: np.ndarrayT_e: np.ndarrayn_e: np.ndarrayq: np.ndarrayr_inboard: np.ndarrayr_outboard: np.ndarrayj_dot_b: np.ndarrayb2_average: np.ndarrayI_p: floattrapped_fraction: Optional[np.ndarray]j_bootstrap_dot_b: Optional[np.ndarray]bootstrap_model: strsource: Mapping[str, Any]scaledmethod — The same state with T_e and n_e multiplied (sensitivity). sourcewithout_bootstrapmethod sourcerestrictedmethod — The surfaces withpsi_min <= psi_norm <= psi_maxonly. source
infer_resistive_zeff — Bounded scalar Z_eff that makes the model resistive voltage match the observed one. Reference source
Also exported as vaft.process.infer_resistive_zeff.
model_resistance — Plasma resistance a conductivity model predicts from the flux-surface Ohmic power. Reference source
Also exported as vaft.process.model_resistance.
ModelResistance
class
source
ModelResistance(time: float, z_eff: Union[float, np.ndarray], conductivity_model: str, ln_lambda: str, bootstrap_model: str, R_p: float, P_ohm_per_I2: float, sigma_parallel: np.ndarray, provenance: Mapping[str, Any], zeff_profile: str = 'constant') -> None
The plasma resistance a conductivity model predicts for one state and Z_eff.
Also exported as vaft.process.ModelResistance.
10 fields
time: floatz_eff: Union[float, np.ndarray]conductivity_model: strln_lambda: strbootstrap_model: strR_p: floatP_ohm_per_I2: floatsigma_parallel: np.ndarrayprovenance: Mapping[str, Any]zeff_profile: str
observed_resistance — Resistive voltage and plasma resistance from Romero’s transformer balance. Reference source
Also exported as vaft.process.observed_resistance.
ObservedResistance
class
source
ObservedResistance(time: np.ndarray, I_p: np.ndarray, I_ni: np.ndarray, L_i: np.ndarray, li_3: np.ndarray, dI_p_dt: np.ndarray, dL_i_dt: np.ndarray, V_B: np.ndarray, V_I: np.ndarray, V_R: np.ndarray, R_p: np.ndarray, inductive_fraction: np.ndarray, flags: tuple, provenance: Mapping[str, Any]) -> None
Romero’s balance evaluated on smoothed data, with the resistance it implies.
Also exported as vaft.process.ObservedResistance.
14 fields · 1 members
time: np.ndarrayI_p: np.ndarrayI_ni: np.ndarrayL_i: np.ndarrayli_3: np.ndarraydI_p_dt: np.ndarraydL_i_dt: np.ndarrayV_B: np.ndarrayV_I: np.ndarrayV_R: np.ndarrayR_p: np.ndarrayinductive_fraction: np.ndarrayflags: tupleprovenance: Mapping[str, Any]as_dictmethod source
parallel_conductivity — Parallel electrical conductivity on every surface of a flux-surface state. Reference source
Also exported as vaft.process.parallel_conductivity.
per_slice_resistive_zeff — Z_eff solved at each state on its own: a diagnostic of the window estimate. Reference source
Also exported as vaft.process.per_slice_resistive_zeff.
resistive_zeff_sensitivity — Nominal resistive Z_eff and how far each input moves it. Reference source
Also exported as vaft.process.resistive_zeff_sensitivity.
ResistiveZeffInference
class
source
ResistiveZeffInference(quantity: str, time_window: tuple, resolved_times: np.ndarray, estimate: Mapping[str, Any], observed: Mapping[str, Any], model: Mapping[str, Any], quality: Mapping[str, Any], provenance: Mapping[str, Any], sensitivity: Mapping[str, Any] = <factory>, reason: Optional[str] = None) -> None
The typed result of #1214 Sec. 11: an estimate, never an IMAS zeff.
Also exported as vaft.process.ResistiveZeffInference.
10 fields · 3 members
quantity: strtime_window: tupleresolved_times: np.ndarrayestimate: Mapping[str, Any]observed: Mapping[str, Any]model: Mapping[str, Any]quality: Mapping[str, Any]provenance: Mapping[str, Any]sensitivity: Mapping[str, Any]reason: Optional[str]zeffproperty sourcestatusproperty sourceas_rowmethod — Flat scalar mapping: survivescode.parametersand a CSV row. source
ROMERO_VOLTAGE_CONVENTION
data
ROMERO_VOLTAGE_CONVENTION = 'romero:V=-dpsi/dt,full_Wb'
RomeroBoundaryFlux
class
source
RomeroBoundaryFlux(time: np.ndarray, I_p: np.ndarray, psi_boundary: np.ndarray, li_3: np.ndarray, R0: float, flux_normalization: str, flux_sign: float, voltage_convention: str = 'romero:V=-dpsi/dt,full_Wb', li_definition: str = 'li_3 = 2 int B_p^2 dV / (mu0^2 I_p^2 R0); L_i = mu0 R0 li_3 / 2', source: Mapping[str, Any] = <factory>) -> None
Boundary flux, plasma current and internal inductance in Romero’s convention.
Also exported as vaft.process.RomeroBoundaryFlux.
10 fields · 2 members
time: np.ndarrayI_p: np.ndarraypsi_boundary: np.ndarrayli_3: np.ndarrayR0: floatflux_normalization: strflux_sign: floatvoltage_convention: strli_definition: strsource: Mapping[str, Any]L_iproperty — Dimensional internal inductancemu0 R0 li_3 / 2[H]. sourcescaled_limethod — The same flux withli_3multiplied byfactor(sensitivity). source
smooth_local_polynomial — Local least-squares polynomial smoothing on a non-uniform time axis. Reference source
Also exported as vaft.process.smooth_local_polynomial.
Smoothing
class
source
Smoothing(method: str, window_s: Optional[float] = None, order: Optional[int] = None) -> None
How the time series are smoothed before they are differentiated.
Also exported as vaft.process.Smoothing.
TabulatedConductivity
class
source
TabulatedConductivity(name: str, psi_norm: np.ndarray, sigma: np.ndarray, z_eff: float, rtol: float = 0.001) -> None
A conductivity computed elsewhere at one fixed Z_eff, as a model callable.
Also exported as vaft.process.TabulatedConductivity.
5 fields
name: strpsi_norm: np.ndarraysigma: np.ndarrayz_eff: floatrtol: float
vaft.process.resonant_coil_response
Resonant-field response of coil-group phasors: a verified linear operator and its optima.
constrained_window_extremum — Stage D: maximize c^H Q_o c with c^H Q_c c <= limit and c^H D c = budget. Reference source
Also exported as vaft.process.constrained_window_extremum.
match_resonant_target — Stage B: the excitation whose resonant response best matches a complex target. Reference source
Also exported as vaft.process.match_resonant_target.
qualify_response_operator — Qualify or reject Phi = H conj(c) against held-out runs. Reference source
Also exported as vaft.process.qualify_response_operator.
RESONANT_FIELDS
data
RESONANT_FIELDS = ('Phi_res', 'Phi_res_v')
resonant_operating_space — Direct resonant-field RMS per window (and a qualified operator’s predictions) as a #1178 result. Reference source
Also exported as vaft.process.resonant_operating_space.
resonant_response_operator — The operator H from the responses to the unit excitations c = e_k. Reference source
Also exported as vaft.process.resonant_response_operator.
ResonantResponseOperator
class
source
ResonantResponseOperator(field: str, H: np.ndarray, psi_n_rational: np.ndarray, m_rational: np.ndarray, n: int, groups: tuple[str, ...], amplitude_unit: float, provenance: Mapping[str, object] = <factory>) -> None
Phi = H conj(c) for one resonant field on fixed surfaces (#1884).
Also exported as vaft.process.ResonantResponseOperator.
8 fields · 2 members
field: strH: np.ndarraypsi_n_rational: np.ndarraym_rational: np.ndarrayn: intgroups: tuple[str, ...]amplitude_unit: floatprovenance: Mapping[str, object]responsemethod — ComplexPhiper surface for one(K,)or(N, K)excitation [T]. sourcequadraticmethod —Qwith(H conj c)^H W (H conj c) = c^H Q c:conj(H^H W H)[T^2 / phasor^2]. source
ResponseOperatorQualification
class
source
ResponseOperatorQualification(status: str, relative_errors: Mapping[str, float], reasons: tuple[str, ...]) -> None
Whether Phi = H conj(c) reproduces runs it was not built from.
Also exported as vaft.process.ResponseOperatorQualification.
3 fields
status: strrelative_errors: Mapping[str, float]reasons: tuple[str, ...]
vaft.process.signal_processing
Conditioning of one waveform on a plain time axis.
anti_alias_filter — Zero-phase FIR low-pass applied on the source grid, ahead of a rate cut. Reference source
Also exported as vaft.process.anti_alias_filter.
butterworth_bandpass — Butterworth band-pass filter along the last axis. Reference source
Also exported as vaft.process.butterworth_bandpass.
butterworth_lowpass — Butterworth low-pass filter along the last axis. Reference source
Also exported as vaft.process.butterworth_lowpass.
define_baseline — Select the baseline samples around a signal’s onset and optional offset. Reference source
Also exported as vaft.process.define_baseline.
describe_time_grid — Measure a timebase’s spacing, uniformity and monotonicity. Reference source
Also exported as vaft.process.describe_time_grid.
detect_active_window — Return the active time window that contains a signal’s main peak. Reference source
Also exported as vaft.process.detect_active_window.
detect_clipped_samples — Return a boolean mask of samples sitting at an acquisition limit. Reference source
Also exported as vaft.process.detect_clipped_samples.
detrend_moving_average — Subtract a centered moving-average trend along the last axis. Reference source
Also exported as vaft.process.detrend_moving_average.
exp_baseline — Exponential model for baseline fitting: y = a * exp(b * x) + c. Reference source
Also exported as vaft.process.exp_baseline.
fir_filter — Linear-phase FIR filter along the last axis. Reference source
Also exported as vaft.process.fir_filter.
fir_filter_coefficients — Window-method FIR coefficients for a linear-phase filter. Reference source
Also exported as vaft.process.fir_filter_coefficients.
infer_signal_orientation — Infer the dominant sign of signal from its active region. Reference source
Also exported as vaft.process.infer_signal_orientation.
is_signal_active — Decide whether a trace carries a signal or is flat. Reference source
Also exported as vaft.process.is_signal_active.
line_average_density — Return line-average electron density given an explicit chord length. Reference source
Also exported as vaft.process.line_average_density.
linear_baseline — Linear model for baseline fitting: y = a * x + b. Reference source
Also exported as vaft.process.linear_baseline.
process_signal — Legacy conditioning wrapper: crop, resample, then filter. Reference source
Also exported as vaft.process.process_signal.
quadratic_baseline — Quadratic model for baseline fitting: y = a * x^2 + b * x + c. Reference source
Also exported as vaft.process.quadratic_baseline.
repair_clipped_interval — Reconstruct samples saturated at an acquisition limit by interpolation. Reference source
Also exported as vaft.process.repair_clipped_interval.
resample_to_time — Project a signal onto target_time, low-passing first if that is a rate cut. Reference source
Also exported as vaft.process.resample_to_time.
ResamplingError
class
source
Raised when a rate change cannot be performed without fabricating signal.
Also exported as vaft.process.ResamplingError.
signal_on_offset — Smooth a waveform, then return the window in which it is above a threshold. Reference source
Also exported as vaft.process.signal_on_offset.
signal_onoffset Deprecated — Deprecated compatibility wrapper for signal_on_offset. Reference source
Also exported as vaft.process.signal_onoffset.
SignalOrientation
class
source
SignalOrientation(multiplier: int, statistic: float, count: int, resolved: bool, reason: str = '') -> None
The dominant sign of a signal over its representative region (#307).
Also exported as vaft.process.SignalOrientation.
5 fields
multiplier: intstatistic: floatcount: intresolved: boolreason: str
SignalRepairError
class
source
Raised when a clipped waveform cannot be defensibly reconstructed.
Also exported as vaft.process.SignalRepairError.
smooth — Apply MATLAB-like moving-average smoothing with edge tapering. Reference source
Also exported as vaft.process.smooth.
subtract_baseline — Fit a baseline through the selected samples and subtract it everywhere. Reference source
Also exported as vaft.process.subtract_baseline.
TimeGrid
class
source
TimeGrid(n: int, t0: float, dt: float, sample_rate: float, uniform: bool, strictly_increasing: bool, max_relative_jitter: float) -> None
Description of a timebase, as measured rather than as declared.
Also exported as vaft.process.TimeGrid.
7 fields
n: intt0: floatdt: floatsample_rate: floatuniform: boolstrictly_increasing: boolmax_relative_jitter: float
vest_coil_current_noise_reduction — Suppress point spikes in coil current traces. Reference source
Also exported as vaft.process.vest_coil_current_noise_reduction.
VEST_CoilCurrentNoiseReduction Deprecated — Deprecated compatibility wrapper for the snake-case function. Reference source
Also exported as vaft.process.VEST_CoilCurrentNoiseReduction.
vaft.process.soft_x_rays
VEST soft X-ray fluctuation and two-filter analysis routines.
hilbert_instantaneous_phase — Instantaneous phase and envelope of a band-limited signal at one time. Reference source
Also exported as vaft.process.hilbert_instantaneous_phase.
load_te_ratio_calibration — Load a ratio-to-temperature table and build its interpolator. Reference source
Also exported as vaft.process.load_te_ratio_calibration.
rank_toroidal_mode_numbers — Rank candidate toroidal mode numbers from phases measured at two locations. Reference source
Also exported as vaft.process.rank_toroidal_mode_numbers.
sxr_band_signals — Baseline, window and band-pass chord signals into named frequency bands. Reference source
Also exported as vaft.process.sxr_band_signals.
sxr_baseline_correction — Zero each channel against the quiet tail after the plasma. Reference source
Also exported as vaft.process.sxr_baseline_correction.
sxr_cwt_spectrogram — Continuous-wavelet magnitude scalogram of one trace. Reference source
Also exported as vaft.process.sxr_cwt_spectrogram.
sxr_electron_temperature — Electron temperature from the two-filter signal ratio, chord by chord. Reference source
Also exported as vaft.process.sxr_electron_temperature.
sxr_subtract_vacuum_reference — Subtract a low-passed vacuum shot to remove poloidal-field pickup. Reference source
Also exported as vaft.process.sxr_subtract_vacuum_reference.
sxr_te_pairs_from_ods — Pair the two filters’ channels of one array by the chord they view. Reference source
Also exported as vaft.process.sxr_te_pairs_from_ods.
SXRBandResult
class
source
SXRBandResult(time: np.ndarray, raw: np.ndarray, bands: Mapping[str, np.ndarray], channels: tuple[int, ...]) -> None
Baseline-corrected chord signals and their band-pass decompositions.
Also exported as vaft.process.SXRBandResult.
4 fields
time: numpy.ndarrayraw: numpy.ndarraybands: Mapping[str, numpy.ndarray]channels: tuple[int, ...]
SXRTemperatureResult
class
source
SXRTemperatureResult(time: np.ndarray, te: np.ndarray, rel_fluctuation: np.ndarray, al_signal: np.ndarray, pairs: tuple[tuple[int, int], ...]) -> None
Two-filter electron temperature per (Be, Al) chord pair.
Also exported as vaft.process.SXRTemperatureResult.
5 fields
time: numpy.ndarrayte: numpy.ndarrayrel_fluctuation: numpy.ndarrayal_signal: numpy.ndarraypairs: tuple[tuple[int, int], ...]
synthetic_island_soft_x_rays — Line-integrated soft-X-ray signals of a rotating island on an equilibrium. Reference source
Also exported as vaft.process.synthetic_island_soft_x_rays.
SyntheticSXRResult
class
source
SyntheticSXRResult(time: np.ndarray, planes: np.ndarray, r: np.ndarray, z: np.ndarray, emissivity: np.ndarray, delta_emissivity: np.ndarray, brightness: np.ndarray, sightlines: Any, topology: Any) -> None
A synthetic soft-X-ray response to a prescribed island.
Also exported as vaft.process.SyntheticSXRResult.
9 fields
time: numpy.ndarrayplanes: numpy.ndarrayr: numpy.ndarrayz: numpy.ndarrayemissivity: numpy.ndarraydelta_emissivity: numpy.ndarraybrightness: numpy.ndarraysightlines: Anytopology: Any
ToroidalModeCandidate
class
source
ToroidalModeCandidate(n: int, offset_deg: float, residual_deg: float) -> None
One candidate toroidal mode number from a two-point phase comparison.
Also exported as vaft.process.ToroidalModeCandidate.
3 fields
n: intoffset_deg: floatresidual_deg: float
vaft.process.species
Canonical species/population state and physics-specific projections of it (issue #1567).
BASES
data
BASES = ('thermal_main', 'fuel', 'impurity', 'fast_ion')
CanonicalSpeciesState
class
source
CanonicalSpeciesState(components: tuple[SpeciesComponent, ...], rho: Optional[np.ndarray] = None, n_e: Optional[np.ndarray] = None, time: Optional[float] = None, provenance: Mapping[str, Any] = <factory>) -> None
The most explicit species/population composition a product supports, on one grid.
Also exported as vaft.process.CanonicalSpeciesState.
5 fields · 5 members
components: tuple[SpeciesComponent, ...]rho: Optional[np.ndarray]n_e: Optional[np.ndarray]time: Optional[float]provenance: Mapping[str, Any]sizeproperty sourcestate_idproperty sourcecharge_densitymethod —sum_a Z_a n_a[m^-3]. sourceelectron_densitymethod — The stored n_e if known, else the quasi-neutralsum_a Z_a n_a[m^-3]. sourceselectmethod — The components of oneBASESbasis. source
composition_moments — Composition moments of a species state, every dilution with its basis named. Reference source
Also exported as vaft.process.composition_moments.
POPULATIONS
data
POPULATIONS = ('thermal', 'nbi_fast', 'fusion_born', 'rf_minority', 'fast_unspecified', 'other')
project_species_state — The species representation one target physics receives, with its conservation contract. Reference source
Also exported as vaft.process.project_species_state.
PROJECTION_METHODS
data
PROJECTION_METHODS = <builtins.dict>
PROJECTION_POLICY
data
PROJECTION_POLICY = <builtins.dict>
species_state_from_composition — The canonical species state a #1565 composition implies for a given electron density. Reference source
Also exported as vaft.process.species_state_from_composition.
species_state_from_core_profiles — The canonical species state of one core_profiles slice, read without creating paths. Reference source
Also exported as vaft.process.species_state_from_core_profiles.
SpeciesComponent
class
source
SpeciesComponent(species: Species, charge: Any, population: str, density: np.ndarray, mass_amu: Any, temperature: Optional[np.ndarray] = None, bundled: bool = False, mean_square_charge: Optional[np.ndarray] = None, origin: str = 'unlabelled', source: str = '', pseudo_of: tuple[str, ...] = (), charge_range: Optional[tuple[float, float]] = None) -> None
One physical component: a nuclide, in one charge state, in one kinetic population.
Also exported as vaft.process.SpeciesComponent.
12 fields · 5 members
species: Speciescharge: Anypopulation: strdensity: np.ndarraymass_amu: Anytemperature: Optional[np.ndarray]bundled: boolmean_square_charge: Optional[np.ndarray]origin: strsource: strpseudo_of: tuple[str, ...]charge_range: Optional[tuple[float, float]]z_nproperty sourcehydrogenicproperty sourcemass_numberproperty sourcecomponent_idproperty —<element>-<A>/Z<charge or range>/<population>, the physics identity. sourcez_momentmethod —<Z^power>on the grid (power 1 or 2). source
SpeciesProjection
class
source
SpeciesProjection(target_physics: str, method: str, components: tuple[SpeciesComponent, ...], source_components: tuple[str, ...], preserves: tuple[str, ...], not_guaranteed: tuple[str, ...], state_id: str, moments: Mapping[str, Any] = <factory>, notes: Mapping[str, Any] = <factory>) -> None
A species representation for one target physics, and what it does and does not keep.
Also exported as vaft.process.SpeciesProjection.
9 fields · 2 members
target_physics: strmethod: strcomponents: tuple[SpeciesComponent, ...]source_components: tuple[str, ...]preserves: tuple[str, ...]not_guaranteed: tuple[str, ...]state_id: strmoments: Mapping[str, Any]notes: Mapping[str, Any]projection_idproperty sourcerecordmethod — A JSON-ready provenance record for a run that used this projection. source
vaft.process.statistical_analysis
Log-linear regression of confinement time against engineering parameters.
analyze_significance — Flag which scaling exponents are statistically significant. Reference source
Also exported as vaft.process.analyze_significance.
compute_metrics — Goodness-of-fit metrics of the regression in original units. Reference source
Also exported as vaft.process.compute_metrics.
confinement_time_histogram — Plot histograms of the scaling parameters in an m x n grid. Reference source
Also exported as vaft.process.confinement_time_histogram.
filter_dataframe — Drop shots with unrealistic loss power and rectify the toroidal field sign. Reference source
Also exported as vaft.process.filter_dataframe.
generate_core_profiles_history_dataframe — Build the scaling table by running the core-profiles history workflow. Reference source
Also exported as vaft.process.generate_core_profiles_history_dataframe.
get_correlation_matrix — Pearson correlation matrix of the log-transformed regressors and target. Reference source
Also exported as vaft.process.get_correlation_matrix.
get_individual_correlations — Pearson correlation of each log regressor with the log target. Reference source
Also exported as vaft.process.get_individual_correlations.
get_residuals — Residuals of the log-space fit. Reference source
Also exported as vaft.process.get_residuals.
load_data_from_excel — Load a confinement-scaling table from an Excel file. Reference source
Also exported as vaft.process.load_data_from_excel.
log_transform — Take natural logarithms of the engineering parameters and the target. Reference source
Also exported as vaft.process.log_transform.
perform_ols_regression — Fit the log-linear scaling by ordinary least squares. Reference source
Also exported as vaft.process.perform_ols_regression.
RegressionResults
class
source
RegressionResults(model, log_df, eng_params, target_param)
Container for regression analysis results.
Also exported as vaft.process.RegressionResults.
vaft.process.transients
Measurements of a plasma-current transient on plain arrays.
current_quench — Time a current quench between 80 % and 20 % of a reference current, and its fastest fall. Reference source
Also exported as vaft.process.current_quench.
current_spike — Measure a short positive rise of the current magnitude above its trend, before a quench. Reference source
Also exported as vaft.process.current_spike.
CurrentQuench
class
source
CurrentQuench(reference_current: float | None, reference_time: float | None, time_80: float | None, time_20: float | None, duration_80_20: float | None, extrapolated_quench_time: float | None, didt_min: float | None, time_didt_min: float | None, polarity: int, reason: str | None = None) -> None
The timing and rate of one current quench, or why none was measured.
Also exported as vaft.process.CurrentQuench.
10 fields · 1 members
reference_current: float | Nonereference_time: float | Nonetime_80: float | Nonetime_20: float | Noneduration_80_20: float | Noneextrapolated_quench_time: float | Nonedidt_min: float | Nonetime_didt_min: float | Nonepolarity: intreason: str | Nonefoundproperty source
CurrentSpike
class
source
CurrentSpike(time: float | None, amplitude: float | None, relative_amplitude: float | None, trend_current: float | None, noise_sigma: float | None, before: float | None, polarity: int, reason: str | None = None) -> None
A positive excursion of the current magnitude above its local trend.
Also exported as vaft.process.CurrentSpike.
8 fields · 1 members
time: float | Noneamplitude: float | Nonerelative_amplitude: float | Nonetrend_current: float | Nonenoise_sigma: float | Nonebefore: float | Nonepolarity: intreason: str | Nonefoundproperty source
vaft.process.transport_state
Resolved transport states: one qualified plasma state shared by TGLF, NEO and classical.
assess_neo_readiness — Decide whether a resolved state can go to NEO. Reference source
Also exported as vaft.process.assess_neo_readiness.
assess_tglf_readiness — Decide whether a resolved state, and each requested surface, can go to TGLF. Reference source
Also exported as vaft.process.assess_tglf_readiness.
classical_heat_fluxes — Classical perpendicular heat fluxes at one surface, from a TGLF local input. Reference source
Also exported as vaft.process.classical_heat_fluxes.
CLASSICAL_MODEL
data
CLASSICAL_MODEL = <builtins.dict>
ClassicalHeatFluxes
class
source
ClassicalHeatFluxes(r_over_a: float, electron_energy_flux_W_m2: float, ion_energy_flux_W_m2: Mapping[str, float], chi_e_m2_s: float, chi_i_m2_s: float, tau_e_s: float, tau_i_s: float, coulomb_logarithm: float, coulomb_logarithm_ion: float, coulomb_log_valid: bool, gamma1_perp: float, b_tesla: float, model: Mapping[str, Any] = <factory>, electron_particle_flux_m2_s: Optional[float] = None, ion_particle_flux_m2_s: Mapping[str, float] = <factory>) -> None
The classical (Braginskii) baseline at one surface (#1435, typed by #1899).
Also exported as vaft.process.ClassicalHeatFluxes.
15 fields · 1 members
r_over_a: floatelectron_energy_flux_W_m2: floation_energy_flux_W_m2: Mapping[str, float]chi_e_m2_s: floatchi_i_m2_s: floattau_e_s: floattau_i_s: floatcoulomb_logarithm: floatcoulomb_logarithm_ion: floatcoulomb_log_valid: boolgamma1_perp: floatb_tesla: floatmodel: Mapping[str, Any]electron_particle_flux_m2_s: Optional[float]ion_particle_flux_m2_s: Mapping[str, float]as_recordmethod — The JSON-ready mapping the atlas driver stores and the core_transport projection reads; the keys of the pre-#1899 dict, unchanged. A deep copy. source
DEFAULT_RHO_MAX
data
DEFAULT_RHO_MAX = 0.95
DEFAULT_SURFACES
data
DEFAULT_SURFACES = (0.3, 0.4, 0.5, 0.6, 0.7, 0.8)
DEFAULT_TIME_TOLERANCE_S
data
DEFAULT_TIME_TOLERANCE_S = 0.0005
EFIT_LINEAGES
data
EFIT_LINEAGES = ('magnetics', 'electron_kinetic')
EFIT_QUALITIES
data
EFIT_QUALITIES = ('good', 'admissible')
inferred_ti_supported — Whether a surface’s solver input is independent of the inferred-Ti gap fill. Reference source
Also exported as vaft.process.inferred_ti_supported.
physics_parameters — The physics half of a GACODE config, with runtime-only fields dropped. Reference source
Also exported as vaft.process.physics_parameters.
project_transport_state — One physics projection of a resolved state’s species, with the profile its solver reads. Reference source
Also exported as vaft.process.project_transport_state.
ReadinessReport
class
source
ReadinessReport(solver: str, status: str, reasons: tuple[str, ...] = (), conditions: tuple[str, ...] = (), surfaces: tuple[SurfaceReadiness, ...] = ()) -> None
A solver’s verdict on one state: ready, conditional or insufficient.
Also exported as vaft.process.ReadinessReport.
resolve_transport_state — Resolve one plasma state into a shared GACODE profile with per-quantity provenance. Reference source
Also exported as vaft.process.resolve_transport_state.
ResolvedTransportState
class
source
ResolvedTransportState(key: TransportStateKey, efit_quality: str, quality_source: str, status: str, reasons: tuple[str, ...] = (), profile: Any = None, times: Mapping[str, Any] = <factory>, ti: Mapping[str, Any] = <factory>, composition: Mapping[str, Any] = <factory>, provenance: Mapping[str, Any] = <factory>, inputs: Mapping[str, Any] = <factory>, settings: Mapping[str, Any] = <factory>, fill_probe: Any = None) -> None
One plasma state ready to be handed to a transport model, or the reasons it is not.
Also exported as vaft.process.ResolvedTransportState.
13 fields · 5 members
key: TransportStateKeyefit_quality: strquality_source: strstatus: strreasons: tuple[str, ...]profile: Anytimes: Mapping[str, Any]ti: Mapping[str, Any]composition: Mapping[str, Any]provenance: Mapping[str, Any]inputs: Mapping[str, Any]settings: Mapping[str, Any]fill_probe: Anyresolvedproperty sourceti_lineageproperty sourceidentity_payloadmethod — Everything that, changed, makes this a different state. sourceidentityproperty — sha256 ofidentity_payload(the upstream half of every run identity). sourcesummarymethod — A JSON-ready record of the state without the profile arrays. source
RESOLVER_VERSION
data
RESOLVER_VERSION = 2
run_identity — Deterministic identity of one solver calculation on one resolved state. Reference source
Also exported as vaft.process.run_identity.
surface_toroidal_field — The toroidal field at a surface’s centre, |B_centr| R_centr / R. Reference source
Also exported as vaft.process.surface_toroidal_field.
SurfaceReadiness
class
source
SurfaceReadiness(r_over_a: float, status: str, detail: str = '', local_input: Any = None) -> None
One requested surface: status is "ready" or a reason code.
Also exported as vaft.process.SurfaceReadiness.
4 fields · 1 members
r_over_a: floatstatus: strdetail: strlocal_input: Anyreadyproperty source
transport_partition — Signed model fluxes and their magnitude partition at one surface of one state. Reference source
Also exported as vaft.process.transport_partition.
transport_species_state — The canonical species state of a resolved transport state: the species its solvers read. Reference source
Also exported as vaft.process.transport_species_state.
TransportProjection
class
source
TransportProjection(canonical_state_id: str, species_state_id: str, projection: Any, profile: Any = None, fill_probe: Any = None) -> None
One physics projection of a resolved state’s species, and the profile it gives the solver.
Also exported as vaft.process.TransportProjection.
TransportStateKey
class
source
TransportStateKey(shot: int, time_efit_s: float, efit_lineage: str) -> None
Which plasma state: (shot, time_efit_s, efit_lineage).
Also exported as vaft.process.TransportStateKey.
vaft.process.wall_modes
Segment-wise eigenmode basis of a passive wall, with global coupling (vaft #473).
allocate_per_segment — Greedy segment-wise allocation M_repr to a response tolerance. Reference source
Also exported as vaft.process.allocate_per_segment.
build_wall_mode_basis — Build the segment-wise eigenbasis of a wall. Reference source
Also exported as vaft.process.build_wall_mode_basis.
canonical_sign — Flip each column so its largest-magnitude entry is positive. Reference source
Also exported as vaft.process.canonical_sign.
check_wall_mode_basis — Metrics of a basis against the matrices it claims to diagonalize; no verdict. Reference source
Also exported as vaft.process.check_wall_mode_basis.
combined_operators — Reduced operators for an arbitrary R-orthonormal basis. Reference source
Also exported as vaft.process.combined_operators.
global_time_constants — The whole wall’s decay times, from the full-rank reduced inductance. Reference source
Also exported as vaft.process.global_time_constants.
mode_scores — Rankings of the retained modes, one value per retained coefficient. Reference source
Also exported as vaft.process.mode_scores.
moment_patterns — Drive-independent wall patterns from the source coupling. Reference source
Also exported as vaft.process.moment_patterns.
orthonormalize_r — An R-orthonormal basis of span(X), canonical in sign. Reference source
Also exported as vaft.process.orthonormalize_r.
reconstruct — Wall currents I_w = V a from modal amplitudes. Reference source
Also exported as vaft.process.reconstruct.
reconstruction_error — How far a reconstruction is from the full current, in the norms that matter. Reference source
Also exported as vaft.process.reconstruction_error.
reduce_response — Reduce any linear response with the wall elements as its columns. Reference source
Also exported as vaft.process.reduce_response.
reduced_operators — Project the full wall matrices onto the retained modes. Reference source
Also exported as vaft.process.reduced_operators.
ReducedWall
class
source
ReducedWall(L_r: np.ndarray, R_r: np.ndarray, M_r: np.ndarray | None, labels: tuple[tuple[str, int], ...], keep: tuple[np.ndarray, ...]) -> None
Reduced operators for one retained selection keep.
Also exported as vaft.process.ReducedWall.
5 fields · 1 members
L_r: np.ndarrayR_r: np.ndarrayM_r: np.ndarray | Nonelabels: tuple[tuple[str, int], ...]keep: tuple[np.ndarray, ...]n_modesproperty —M_repr = (M_1, ..., M_G). source
segment_eigenmodes — Solve one segment’s pencil R_gg v = L_gg v / tau. Reference source
Also exported as vaft.process.segment_eigenmodes.
SegmentModes
class
source
SegmentModes(id: str, index: np.ndarray, tau: np.ndarray, V: np.ndarray, residual: float, min_relative_gap: float) -> None
One segment’s complete local eigenbasis.
Also exported as vaft.process.SegmentModes.
6 fields · 1 members
id: strindex: np.ndarraytau: np.ndarrayV: np.ndarrayresidual: floatmin_relative_gap: floatsizeproperty source
select_all — Keep every mode of every segment: the full-rank selection. Reference source
Also exported as vaft.process.select_all.
select_by_score — Keep the highest-scoring modes across segments. Reference source
Also exported as vaft.process.select_by_score.
select_slowest — Keep the slowest modes, globally or per segment. Reference source
Also exported as vaft.process.select_slowest.
select_tau_range — Keep the modes whose decay time lies in a range, per segment. Reference source
Also exported as vaft.process.select_tau_range.
solve_reduced_eddy — Integrate the reduced circuit L_r da/dt + R_r a = -M_r dI_src/dt. Reference source
Also exported as vaft.process.solve_reduced_eddy.
subspace_angles_r — Principal angles between two mode subspaces in the R inner product. Reference source
Also exported as vaft.process.subspace_angles_r.
symmetrize_inductance — Fold a mutual-inductance matrix onto its symmetric part, with a refusal. Reference source
Also exported as vaft.process.symmetrize_inductance.
WallModeBasis
class
source
WallModeBasis(segments: tuple[SegmentModes, ...], n_elements: int, provenance: Mapping[str, str]) -> None
Every segment’s eigenbasis, plus how it was made.
Also exported as vaft.process.WallModeBasis.
3 fields · 8 members
segments: tuple[SegmentModes, ...]n_elements: intprovenance: Mapping[str, str]n_modesmethod — Full ranks(n_1, ..., n_G); they sum ton_elements. sourceVmethod —V_segfor the retained modes,(n_elements, M_tot), scattered by element index so an interleaved loop order needs no permutation. sourcetaumethod sourcelabelsmethod sourcesegmentmethod sourcedigestmethod — 12-hex fingerprint of the segment ids, decay times and modes. sourceto_npzmethod sourcefrom_npzclassmethod source
WallModeError
class
source
The wall matrices or the segment map cannot support a well-posed basis.
Also exported as vaft.process.WallModeError.
vaft.process.zeff_projection
Resistive projection of an effective-charge profile: Z_eff(rho) -> R_p -> Z_eff^res,equiv.
flat_profile_from_resistive — A flat Z_eff profile from a resistive scalar – only under the stated flat assumption. Reference source
Also exported as vaft.process.flat_profile_from_resistive.
profile_conductivity_model — A conductivity-model callable that evaluates Lane Z’s model at a radially varying Z_eff. Reference source
Also exported as vaft.process.profile_conductivity_model.
project_window_to_resistive_scalar — The window scalar Lane Z’s estimator would infer if the profile were the truth. Reference source
Also exported as vaft.process.project_window_to_resistive_scalar.
project_zeff_profile_to_resistive_scalar — The constant Z_eff whose model resistance equals that of a Z_eff profile, on one slice. Reference source
Also exported as vaft.process.project_zeff_profile_to_resistive_scalar.
ResistiveZeffProjection
class
source
ResistiveZeffProjection(zeff_equivalent: float, model: str, profile_source: str, resistance_profile: np.ndarray, resistance_flat: np.ndarray, time_window: tuple[float, float], bounds: tuple[float, float], convergence: Mapping[str, Any], profile_volume_mean: float, provenance: Mapping[str, Any] = <factory>) -> None
The resistively equivalent scalar of a Z_eff profile, and how it was obtained.
Also exported as vaft.process.ResistiveZeffProjection.
10 fields · 1 members
zeff_equivalent: floatmodel: strprofile_source: strresistance_profile: np.ndarrayresistance_flat: np.ndarraytime_window: tuple[float, float]bounds: tuple[float, float]convergence: Mapping[str, Any]profile_volume_mean: floatprovenance: Mapping[str, Any]as_rowmethod source