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

vaft.process
BACKGROUND_FRAMES_2500FPSdata
BACKGROUND_FRAMES_50KFPSdata
BASESdata
CLASSICAL_MODELdata
COIL_EXCITATION_CONVENTIONdata
COINCIDENT_POLICIESdata
COMPOSITION_KINDSdata
COMPOSITION_ORIGINSdata
CONNECTION_LENGTH_FORMSdata
CONNECTION_LENGTH_REDUCTIONSdata
CONVENTIONSdata
COORDINATESdata
COVERAGE_TIERSdata
DCON_JACOBIAN_ANGLE_WEIGHTSdata
DEFAULT_COLUMNSdata
DEFAULT_Q_NOISE_ATOLdata
DEFAULT_Q_NOISE_RTOLdata
DEFAULT_RATIONALSdata
DEFAULT_RHO_MAXdata
DEFAULT_SURFACESdata
DEFAULT_TIME_TOLERANCE_Sdata
DEFAULT_VEST_MAGNETICS_PROCESSINGdata
DELTA_E_COMBINATIONSdata
DILUTION_MODESdata
EFIT_LINEAGESdata
EFIT_QUALITIESdata
EMISSION_NORMALISATION_FRAMES_50KFPSdata
FLUX_SURFACE_QUANTITIESdata
FOOTPRINT_PROXY_MODELSdata
IMPA_CHANNEL_COUNTdata
IMPURITY_SOURCESdata
INDEPENDENT_LINEAGESdata
LEGACY_COORDINATEdata
LEGACY_WINDOWSdata
MAGNETICS_CLUSTER_GAP_FRACTIONdata
MHD_BAND_HALF_WIDTH_HZdata
MIN_ANNULUS_CELLSdata
MIN_FLUX_SURFACE_POINTSdata
MODE_FREQUENCY_MODELSdata
MODE_FREQUENCY_STATUSESdata
NE_DYNAMIC_RANGE_MAXdata
NEGATIVE_EIGENVALUE_POLICIESdata
NORMALIZATIONSdata
NTV_QUADRATIC_STATUSESdata
OPERATING_SPACE_ROLESdata
OPERATING_SPACE_STATUSESdata
PAPER_JUMP_WIDTHdata
PEDESTAL_FALLBACK_PSI_NORMdata
PEDESTAL_RESOLUTION_FACTORdata
PHYSICAL_EDGE_MAXdata
PHYSICAL_PSIN_MAXdata
POPULATIONSdata
PROJECTION_METHODSdata
PROJECTION_POLICYdata
RADIAL_COORDINATESdata
RATIONAL_SURFACE_ABSENTdata
RATIONAL_SURFACE_PRESENTdata
RATIONAL_SURFACE_RTOLdata
REFERENCE_LENGTHSdata
REFERENCE_SEARCH_RANGE_HZdata
RESOLVER_VERSIONdata
RESONANT_FIELDSdata
RESONANT_RESPONSE_COLUMNSdata
RESONANT_STATISTICSdata
ROMERO_VOLTAGE_CONVENTIONdata
SINGULAR_OFFSETdata
SPECTRAL_WINDOW_FRAMES_50KFPSdata
SURFACE_MEMBERSHIPSdata
TE_POSITIVE_EDGE_MAXdata
TE_POSITIVE_PSIN_MAXdata
TI_FLAGSdata
TI_NOTESdata
TOTAL_PRESSURE_LEAVESdata
UNSETdata
ZERO_MEANS_NOT_COMPUTEDdata
vaft.process.atomic
compute_line_radiation_power_seriesfunction
compute_time_match_atolfunction
find_time_match_indexfunction
IMPURITY_SOURCESdata
integrate_emissivity_profilefunction
normalize_atomic_symbolfunction
vaft.process.camera_fluctuation
BACKGROUND_FRAMES_2500FPSdata
BACKGROUND_FRAMES_50KFPSdata
EMISSION_NORMALISATION_FRAMES_50KFPSdata
MHD_BAND_HALF_WIDTH_HZdata
mhd_band_powerfunction
normalize_by_local_emissionfunction
PixelSpectrogramclass
pixelwise_spectrogramfunction
poisson_windowfunction
REFERENCE_SEARCH_RANGE_HZdata
SPECTRAL_WINDOW_FRAMES_50KFPSdata
subtract_temporal_backgroundfunction
summed_region_signalfunction
track_reference_frequencyfunction
vaft.process.camera_geometry
CameraProjectionclass
project_pointsfunction
sweep_toroidalfunction
toroidal_ringfunction
trajectory_world_pointsfunction
vaft.process.catalog
CATEGORIESdata
categoriesfunction
CategoryDocclass
describefunction
documentation_snapshotfunction
export_documentation_snapshotfunction
list_processesfunction
ProcessSpecclass
searchfunction
vaft.process.cocos
cocos_consistency_signsfunction
cocos_field_scalesfunction
CONTOUR_Q_LEVELSdata
CONTOUR_Q_LOG_TOLERANCEdata
CONTOUR_Q_MIN_SURFACESdata
ContourQNormalizationclass
FLUX_EXPONENT_TOLERANCEdata
identify_conventionfunction
identify_flux_exponentfunction
identify_flux_exponent_from_qfunction
validate_cocosfunction
vaft.process.coil_operating_space
COIL_EXCITATION_CONVENTIONdata
CoilOperatingSpaceclass
OPERATING_SPACE_ROLESdata
OPERATING_SPACE_STATUSESdata
relative_coil_coordinatesfunction
vaft.process.coils_non_axisymmetric
biot_savart_filamentsfunction
phased_sector_currentsfunction
toroidal_mode_decompositionfunction
vaft.process.confinement
assess_predictor_identifiabilityfunction
bootstrap_confinement_scalingfunction
closure_constraintfunction
confinement_exclusion_tablefunction
confinement_power_balancefunction
confinement_slice_decisionfunction
confinement_slice_evidencefunction
ConfinementPowerBalanceclass
ConfinementScalingFitclass
ConfinementSliceEvidenceclass
dimensionless_confinement_indicesfunction
fit_confinement_scalingfunction
fit_confinement_scaling_odrfunction
fit_constrained_confinement_scalingfunction
infer_kadomtsev_size_exponentfunction
leave_one_group_out_scalingfunction
ObservedConfinementclass
ohmic_confinement_seriesfunction
OhmicConfinementclass
predictor_principal_directionsfunction
resistive_loop_voltagefunction
ResistiveLoopVoltageclass
resolve_observed_confinementfunction
smoothed_time_derivativefunction
vaft.process.electromagnetics
calc_gridfunction
compute_br_bz_phifunction
compute_impedance_matricesfunction
compute_mutual_passive_activefunction
compute_point_response_matricesfunction
compute_response_matrixfunction
compute_response_vectorfunction
compute_vacuum_fields_1dfunction
solve_eddy_currentsfunction
wall_propagatorfunction
vaft.process.equilibrium
as_equilibriumfunction
calculate_average_boundary_poloidal_fieldfunction
calculate_diamagnetismfunction
calculate_q_profile_from_psifunction
calculate_reconstructed_diamagnetic_fluxfunction
check_equilibrium_requirementsfunction
CoilFitResultclass
compare_contoursfunction
computed_diamagnetism_from_phifunction
connection_length_mapfunction
contour_shape_parametersfunction
contour_shaping_observablesfunction
convert_cocosfunction
current_centroidfunction
current_covariancefunction
current_momentfunction
DCON_JACOBIAN_ANGLE_WEIGHTSdata
derive_boundary_representationfunction
derive_current_momentsfunction
derive_global_descriptorsfunction
derive_radial_coordinatesfunction
efit_virial_volume_integralsfunction
ejiri_mirror_geometryfunction
equilibrium_field_on_gridfunction
evaluate_fourier_surfacefunction
evaluate_guazzotto_freidbergfunction
evaluate_millerfunction
evaluate_mxh_chebyshevfunction
evaluate_solovevfunction
extract_flux_surface_contoursfunction
find_rational_surfacesfunction
find_stationary_pointsfunction
fit_fourier_surfacefunction
fit_fourier_surface_sequencefunction
fit_free_boundary_coilsfunction
fit_miller_sequencefunction
fit_miller_surfacefunction
fit_mxh_chebyshevfunction
fit_solovevfunction
FLUX_SURFACE_QUANTITIESdata
flux_surface_quantitiesfunction
fractional_cell_weights_from_boundaryfunction
grad_shafranov_operatorfunction
grad_shafranov_residualfunction
grad_shafranov_residual_modesfunction
GradShafranovResidualclass
guazzotto_freidberg_parametersfunction
guazzotto_freidberg_to_equilibriumfunction
integrate_romero_closurefunction
lab_to_straight_field_linefunction
make_equilibrium_field_interpolatorfunction
make_vacuum_field_interpolatorfunction
miller_surfacesfunction
MIN_ANNULUS_CELLSdata
MIN_FLUX_SURFACE_POINTSdata
parallel_current_from_toroidalfunction
ParallelCurrentResultclass
pest_angle_from_jacobian_anglefunction
plasma_cell_weightsfunction
poloidal_field_at_boundaryfunction
prepare_boundary_for_shafranovfunction
psi_to_radialfunction
psi_to_rhofunction
psi_to_rzfunction
r_at_z_extremumfunction
radial_to_psifunction
RATIONAL_SURFACE_ABSENTdata
RATIONAL_SURFACE_PRESENTdata
RATIONAL_SURFACE_RTOLdata
rational_surfacesfunction
RationalSurfaceclass
RationalSurfaceRootclass
resistive_layer_atfunction
resistive_layer_parametersfunction
rho_to_psifunction
romero_flux_balancefunction
scale_boundary_conformalfunction
shafranov_integralsfunction
solovev_examplefunction
solovev_shape_constraintsfunction
solovev_to_equilibriumfunction
solovev_xpoint_constraintsfunction
solve_guazzotto_freidbergfunction
solve_solovev_constraintsfunction
straight_field_line_angle_on_gridfunction
straight_field_line_mapfunction
straight_field_line_tablesfunction
StraightFieldLineMapclass
trace_field_linefunction
validate_equilibriumfunction Deprecated
virial_alpha_conformal_annulusfunction
virial_alpha_thin_annulusfunction
volume_averagefunction
vaft.process.field_line_topology
CONNECTION_LENGTH_FORMSdata
CONNECTION_LENGTH_REDUCTIONSdata
connection_length_weightfunction
footprint_heat_load_proxyfunction
footprint_incident_totalfunction
footprint_proxy_modelfunction
FOOTPRINT_PROXY_MODELSdata
FootprintProxyclass
FootprintProxyModelclass
incidence_factorfunction
reduce_traced_directionsfunction
target_incident_fractionsfunction
toroidal_surface_cell_areasfunction
toroidal_surface_node_areasfunction
upstream_flux_weightfunction
vaft.process.fluctuation
analyze_fluctuation_spectrumfunction
coherent_componentsfunction
CoherentComponentsclass
compute_band_powerfunction
compute_psdfunction
compute_spectrogramfunction
cross_spectral_matrixfunction
cross_spectrogramfunction
cross_spectrumfunction
CrossSpectralMatrixclass
CrossSpectrogramclass
CrossSpectrumclass
find_spectral_breakfunction
fit_power_law_spectrumfunction
FluctuationRecordclass
FluctuationSpectrogramclass
FluctuationSpectrumclass
FrequencyTrackclass
ResamplingProvenanceclass
SpectralBreakclass
SpectralFitclass
track_dominant_frequencyfunction
vaft.process.gyrokinetic_comparison
assess_comparisonfunction
ComparisonAssessmentclass
local_result_signaturefunction
prepare_diagnostic_tracesfunction
select_timefunction
vaft.process.gyrokinetics
field_transport_contributionsfunction
fit_predator_prey_modelfunction
predator_prey_cycle_metricsfunction
PredatorPreyCycleMetricsclass
PredatorPreyFitclass
radial_correlation_from_spectrumfunction
rebin_contributionsfunction
reconstruct_fieldfunction
reduce_time_seriesfunction
saturated_intensityfunction
SpatialFieldclass
spectral_integralfunction
time_window_averagefunction
zonal_fractionfunction
zonal_shear_proxyfunction
zonal_turbulence_intensityfunction
ZonalShearProxyclass
ZonalTurbulenceIntensityclass
vaft.process.impa
find_tf_calibration_windowfunction
fit_impa_crosstalkfunction
fit_impa_geometryfunction
fit_impa_tf_couplingfunction
grade_impa_qualityfunction
impa_calibrate_signalsfunction
IMPA_CHANNEL_COUNTdata
impa_lowpassfunction
ImpaCouplingFitclass
ImpaCrosstalkFitclass
ImpaGeometryFitclass
ImpaProcessingConfigclass
ImpaQualityclass
ImpaResultclass
legacy_impa_compensationfunction
legacy_impa_positionfunction
process_impafunction
remove_bz_crosstalkfunction
remove_tf_pickupfunction
TfCalibrationWindowclass
TfWindowCriteriaclass
toroidal_fieldfunction
validate_impafunction Deprecated
vaft.process.impurity
charge_state_momentsfunction
composition_from_fractionsfunction
composition_from_modelfunction
COMPOSITION_KINDSdata
COMPOSITION_ORIGINSdata
composition_record_originfunction
composition_record_textfunction
ImpurityCompositionclass
ImpuritySpeciesclass
NORMALIZATIONSdata
populate_impurity_profilesfunction
populate_radial_impurity_profilesfunction
populate_zeff_profilefunction
RadialImpurityCompositionclass
resolve_impurity_compositionfunction
resolve_radial_compositionfunction
ResolvedImpurityCompositionclass
surface_composition_profilefunction
vaft.process.kinetic_closure
assemble_pressurefunction
DILUTION_MODESdata
fast_ion_slowing_down_estimatefunction
FastIonEstimateclass
INDEPENDENT_LINEAGESdata
infer_kinetic_closurefunction
infer_ti_pressure_partitionfunction
KineticClosureclass
PressureAssemblyclass
TI_FLAGSdata
TI_NOTESdata
vaft.process.langmuir
calibrate_currentfunction
calibrate_voltagefunction
electron_densityfunction
median_filter_signalfunction
probe_surface_areafunction
process_triple_probefunction
remove_offsetfunction
solve_electron_temperaturefunction
vaft.process.line_of_sight
build_line_integral_operatorfunction
clip_segment_to_polygonfunction
project_emissivityfunction
Sightlinesclass
vaft.process.local_mhd_criteria
curvature_mapfunction
flux_surface_curvaturefunction
interchange_comparisonfunction
InterchangeProfileclass
mercier_ggj_from_odsfunction
mercier_ggj_profilefunction
s_alpha_from_odsfunction
s_alpha_profilefunction
SAlphaProfileclass
SurfaceCurvatureclass
vaft.process.magnetic_island
equilibrium_safety_factorfunction
island_emissivityfunction
IslandTopologyclass
magnetic_island_topologyfunction
MagneticIslandSpecclass
resolve_rational_surfacefunction
vaft.process.magnetics
b_field_pol_probe_fieldfunction
DEFAULT_VEST_MAGNETICS_PROCESSINGdata
DegenerateBaselineWindowErrorclass
flux_loop_fluxfunction
MAGNETICS_CLUSTER_GAP_FRACTIONdata
magnetics_sensor_centrefunction
magnetics_sensor_poloidal_anglefunction
mirnov_preprocess_signalfunction
mirnov_spectrogramfunction
MirnovSpectrogramResultclass
rogowski_coil_ipfunction
toroidal_mode_analysisfunction
toroidal_phase_fit_at_timefunction
ToroidalModeResultclass
ToroidalPhaseFitResultclass
ToroidalPhaseModeFitclass
UnsupportedMagneticsDaqModeErrorclass
vest_b_field_pol_probe_legacyfunction
vest_equilibrium_magnetics_detailedfunction
vest_equilibrium_magnetics_signalsfunction
vest_flux_loop_flux_from_voltagefunction
vest_flux_loop_legacyfunction
vest_flux_loop_voltagefunction
vest_magnetics_time_windowfunction
VestEquilibriumMagneticsResultclass
VestMagneticsProcessingConfigclass
vaft.process.mhd_stability
criterion_intervalsfunction
dcon_edge_comparisonfunction
dcon_edge_scanfunction
dcon_local_stabilityfunction
load_stability_atlasfunction
stability_atlas_populationsfunction
StabilityAtlasPopulationsclass
vaft.process.ml
BackendUnavailableErrorclass
CalibrationResultclass
DatasetArtifactclass
DatasetSpecclass
EvaluationResultclass
FeatureDatasetclass
FeatureSpecclass
InferenceResultclass
MLErrorclass
ModelArtifactclass
ModelBundleclass
ModelContractErrorclass
ModelIdentityclass
ModelResolutionErrorclass
ModelSpecclass
register_architecturefunction
register_augmentationfunction
register_lossfunction
Splitclass
SplitSpecclass
TrainingConfigclass
TrainingResultclass
vaft.process.ml.artifact
export_modelfunction
load_model_artifactfunction
save_model_artifactfunction
vaft.process.ml.bundle
load_model_bundlefunction
save_model_bundlefunction
vaft.process.ml.dataset
build_datasetfunction
dataset_fingerprintfunction
load_datasetfunction
save_datasetfunction
split_groupsfunction
window_datasetfunction
vaft.process.ml.experiments
experiment_recordfunction
index_mlflowfunction
load_experimentfunction
save_experimentfunction
vaft.process.ml.inference
predictfunction
vaft.process.ml.resolver
fetch_modelfunction
load_modelfunction
resolve_modelfunction
vaft.process.ml.structured
build_structured_datasetfunction
StructuredDatasetArtifactclass
StructuredSampleclass
TensorSpecclass
vaft.process.ml.training
calibrate_thresholdfunction
evaluate_modelfunction
train_modelfunction
vaft.process.ml.usage
import_data_rolesfunction
record_data_usefunction
vaft.process.mode_frequency
MODE_FREQUENCY_MODELSdata
MODE_FREQUENCY_STATUSESdata
mode_frequency_tracksfunction
ModeFrequencyTrackclass
ModeFrequencyTracksclass
vaft.process.nbi
neutral_beam_attenuation_along_pathfunction
NeutralBeamAttenuationclass
vaft.process.ntv_coil_response
budgeted_torque_extremafunction
coil_phasorsfunction
fit_inhomogeneous_torquefunction
fixed_amplitude_phase_extremafunction
hermitian_torque_matrixfunction
ntv_operating_spacefunction
NTV_QUADRATIC_STATUSESdata
quadratic_invariance_checksfunction
quadratic_probe_designfunction
quadratic_torquefunction
QuadraticTorqueCheckclass
qualify_torque_matrixfunction
TorqueMatrixQualificationclass
two_group_phase_extremafunction
vaft.process.numerical
time_derivativefunction
vaft.process.onset
active_windowfunction
excess_thresholdfunction
isolated_excursionsfunction
median_smoothfunction
OnsetRecordclass
PeakRecordclass
pickup_scalefunction
principal_pulse_onsetfunction
principal_pulse_windowfunction
PulseWindowclass
robust_baselinefunction
robust_peakfunction
run_featuresfunction
RunFeaturesclass
sustained_excess_onsetfunction
zero_crossing_after_excursionfunction
zero_phase_lowpassfunction
vaft.process.ordering_state
contract_populationfunction
COVERAGE_TIERSdata
DEFAULT_COLUMNSdata
global_ordering_quantitiesfunction
ordering_coveragefunction
ordering_inputs_from_odsfunction
ordering_marginsfunction
ordering_tablefunction
OrderingInputsclass
profile_ordering_quantitiesfunction
time_history_ordering_quantitiesfunction
vaft.process.perturbation
align_surfaces_by_qfunction
AlignedSurfaceclass
amplification_ratiofunction
chirikovfunction
COINCIDENT_POLICIESdata
composite_drive_at_qfunction
CompositeDriveclass
critical_island_widthfunction
DELTA_E_COMBINATIONSdata
dominant_modefunction
DominantModeclass
edge_overlap_metricfunction
EdgeOverlapclass
energy_norm_matrixfunction
finite_width_deltafunction
group_coincident_islandsfunction
helical_phase_sweepfunction
island_overlap_widthfunction
island_pairsfunction
IslandOverlapclass
IslandPairsclass
jump_widthfunction
JumpWidthModelclass
LEGACY_WINDOWSdata
lundquist_numberfunction
nearest_surface_spacingfunction
NEGATIVE_EIGENVALUE_POLICIESdata
PAPER_JUMP_WIDTHdata
penetration_ratiofunction
q_composite_tablefunction
reduce_delta_efunction
reduce_resonantfunction
resonant_deltafunction
resonant_geometric_factorfunction
resonant_metricsfunction
RESONANT_RESPONSE_COLUMNSdata
RESONANT_STATISTICSdata
resonant_windowsfunction
ResonantJumpclass
ResonantWindowclass
rms_resonant_fieldfunction
shielded_fieldfunction
SINGULAR_OFFSETdata
SURFACE_MEMBERSHIPSdata
SurfaceMemberclass
toroidal_phase_auditfunction
ToroidalPhaseAuditclass
ZERO_MEANS_NOT_COMPUTEDdata
vaft.process.profile
analytic_hmode_itb_statefunction
analytic_hmode_statefunction
analytic_itb_statefunction
analytic_lmode_statefunction
compare_flux_mappingfunction
compose_analytic_profilefunction
compose_plasma_statefunction
COORDINATESdata
CoordinateUnavailableErrorclass
core_profilesfunction
core_profiles_from_eqfunction
core_profiles_from_eq_ratiofunction
equilibrium_mapping_charge_exchangefunction
equilibrium_mapping_pointsfunction
equilibrium_mapping_thomson_scatteringfunction
evaluate_analytic_profilefunction
evaluate_plasma_statefunction
export_electron_profile_txtfunction
fit_ti_te_ratiofunction
FitReportclass
FittedProfileclass
generate_synthetic_kinetic_profilesfunction
LEGACY_COORDINATEdata
MappedPositionsclass
NE_DYNAMIC_RANGE_MAXdata
PEDESTAL_FALLBACK_PSI_NORMdata
PEDESTAL_RESOLUTION_FACTORdata
pedestal_topfunction
PedestalTopclass
PHYSICAL_EDGE_MAXdata
PHYSICAL_PSIN_MAXdata
profile_fit_report_charge_exchangefunction
profile_fit_report_thomson_scatteringfunction
profile_fitting_charge_exchangefunction
profile_fitting_thomson_scatteringfunction
project_flux_functionfunction
project_plasma_statefunction
spec_from_plasma_statefunction
strip_electron_only_pressurefunction
TE_POSITIVE_EDGE_MAXdata
TE_POSITIVE_PSIN_MAXdata
TOTAL_PRESSURE_LEAVESdata
write_synthetic_core_profilesfunction
vaft.process.profile_gradients
ConventionPresetclass
CONVENTIONSdata
profile_gradientfunction
ProfileGradientclass
radial_coordinate_mapfunction
radial_coordinate_map_from_arraysfunction
RADIAL_COORDINATESdata
RadialCoordinateclass
RadialCoordinateMapclass
REFERENCE_LENGTHSdata
ReferenceLengthclass
resolve_conventionfunction
resolve_reference_lengthfunction
UNSETdata
vaft.process.q_profile_context
core_q_contextfunction
core_q_context_from_profilesfunction
CoreQContextclass
DEFAULT_Q_NOISE_ATOLdata
DEFAULT_Q_NOISE_RTOLdata
DEFAULT_RATIONALSdata
DoubleResonantPairclass
EnclosedPressureclass
low_shear_regionsfunction
LowShearRegionclass
NearRationalLowShearRegionclass
RationalCrossingclass
RationalProximityclass
vaft.process.resistive_zeff
FluxSurfaceStateclass
infer_resistive_zefffunction
model_resistancefunction
ModelResistanceclass
observed_resistancefunction
ObservedResistanceclass
parallel_conductivityfunction
per_slice_resistive_zefffunction
resistive_zeff_sensitivityfunction
ResistiveZeffInferenceclass
ROMERO_VOLTAGE_CONVENTIONdata
RomeroBoundaryFluxclass
smooth_local_polynomialfunction
Smoothingclass
TabulatedConductivityclass
vaft.process.resonant_coil_response
constrained_window_extremumfunction
match_resonant_targetfunction
qualify_response_operatorfunction
RESONANT_FIELDSdata
resonant_operating_spacefunction
resonant_response_operatorfunction
ResonantResponseOperatorclass
ResponseOperatorQualificationclass
window_weightsfunction
vaft.process.signal_processing
anti_alias_filterfunction
butterworth_bandpassfunction
butterworth_lowpassfunction
define_baselinefunction
describe_time_gridfunction
detect_active_windowfunction
detect_clipped_samplesfunction
detrend_moving_averagefunction
exp_baselinefunction
fir_filterfunction
fir_filter_coefficientsfunction
infer_signal_orientationfunction
is_signal_activefunction
line_average_densityfunction
linear_baselinefunction
process_signalfunction
quadratic_baselinefunction
repair_clipped_intervalfunction
resample_to_timefunction
ResamplingErrorclass
signal_on_offsetfunction
signal_onoffsetfunction Deprecated
SignalOrientationclass
SignalRepairErrorclass
smoothfunction
subtract_baselinefunction
TimeGridclass
vest_coil_current_noise_reductionfunction
VEST_CoilCurrentNoiseReductionfunction Deprecated
vfit_signal_start_endfunction Deprecated
vfit_signal_startendfunction Deprecated
vaft.process.soft_x_rays
hilbert_instantaneous_phasefunction
load_te_ratio_calibrationfunction
rank_toroidal_mode_numbersfunction
sxr_band_signalsfunction
sxr_baseline_correctionfunction
sxr_cwt_spectrogramfunction
sxr_electron_temperaturefunction
sxr_subtract_vacuum_referencefunction
sxr_te_pairs_from_odsfunction
SXRBandResultclass
SXRTemperatureResultclass
synthetic_island_soft_x_raysfunction
SyntheticSXRResultclass
ToroidalModeCandidateclass
vaft.process.species
BASESdata
CanonicalSpeciesStateclass
composition_momentsfunction
POPULATIONSdata
project_species_statefunction
PROJECTION_METHODSdata
PROJECTION_POLICYdata
species_state_from_compositionfunction
species_state_from_core_profilesfunction
SpeciesComponentclass
SpeciesProjectionclass
vaft.process.statistical_analysis
analyze_significancefunction
compute_metricsfunction
confinement_time_histogramfunction
filter_dataframefunction
generate_core_profiles_history_dataframefunction
get_correlation_matrixfunction
get_individual_correlationsfunction
get_residualsfunction
load_data_from_excelfunction
log_transformfunction
perform_ols_regressionfunction
RegressionResultsclass
vaft.process.transients
current_quenchfunction
current_spikefunction
CurrentQuenchclass
CurrentSpikeclass
vaft.process.transport_state
assess_neo_readinessfunction
assess_tglf_readinessfunction
classical_heat_fluxesfunction
CLASSICAL_MODELdata
ClassicalHeatFluxesclass
DEFAULT_RHO_MAXdata
DEFAULT_SURFACESdata
DEFAULT_TIME_TOLERANCE_Sdata
EFIT_LINEAGESdata
EFIT_QUALITIESdata
inferred_ti_supportedfunction
physics_parametersfunction
project_transport_statefunction
ReadinessReportclass
resolve_transport_statefunction
ResolvedTransportStateclass
RESOLVER_VERSIONdata
run_identityfunction
surface_toroidal_fieldfunction
SurfaceReadinessclass
transport_partitionfunction
transport_species_statefunction
TransportProjectionclass
TransportStateKeyclass
vaft.process.wall_modes
allocate_per_segmentfunction
build_wall_mode_basisfunction
canonical_signfunction
check_wall_mode_basisfunction
combined_operatorsfunction
global_time_constantsfunction
mode_scoresfunction
moment_patternsfunction
orthonormalize_rfunction
projectfunction
reconstructfunction
reconstruction_errorfunction
reduce_responsefunction
reduced_operatorsfunction
ReducedWallclass
segment_eigenmodesfunction
SegmentModesclass
select_allfunction
select_by_scorefunction
select_slowestfunction
select_tau_rangefunction
solve_reduced_eddyfunction
subspace_angles_rfunction
symmetrize_inductancefunction
WallModeBasisclass
WallModeErrorclass
vaft.process.zeff_projection
flat_profile_from_resistivefunction
profile_conductivity_modelfunction
project_window_to_resistive_scalarfunction
project_zeff_profile_to_resistive_scalarfunction
ResistiveZeffProjectionclass
spitzer_resistive_equivalent_zefffunction
zeff_profile_for_statefunction

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')

integrate_emissivity_profile — Integrate an emissivity profile to a total radiated power. Reference source
Also exported as vaft.process.integrate_emissivity_profile.

normalize_atomic_symbol — Normalize an element or ion label to a supported atomic symbol. Reference source
Also exported as vaft.process.normalize_atomic_symbol.

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.ndarray
  • frequency: np.ndarray
  • magnitude: np.ndarray
  • pixel_shape property — 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.

summed_region_signal — Sum the intensity inside one image region, giving a single time series. Reference source
Also exported as vaft.process.summed_region_signal.

track_reference_frequency — Follow the dominant MHD frequency a magnetic probe reports, window by window. Reference source
Also exported as vaft.process.track_reference_frequency.

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.ndarray
  • dist_coeffs: np.ndarray
  • rvec: np.ndarray
  • tvec: np.ndarray
  • method: str
  • provenance: Mapping[str, Any]
  • project method — (pixel_uv, valid_mask) for 3-D world points in centimetres. source
  • project_rz method — Valid pixels of a poloidal (R, Z) curve swept toroidally over theta_rad. source
  • project_ring method — 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.

toroidal_ring — Sweep one poloidal point into a full toroidal ring. Reference source
Also exported as vaft.process.toroidal_ring.

trajectory_world_points — Convert a matched trajectory of cylindrical coordinates into world points. Reference source
Also exported as vaft.process.trajectory_world_points.

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.

8 fields · 2 members
  • name: str
  • module: str
  • title: str
  • overview: str
  • notation: tuple
  • conventions: str
  • count: int
  • documented: int
  • conforming property — Every function in the category is clean under the contract. source
  • as_dict method source

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: 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
  • source_end_line: int
  • source_code: str
  • semantics: Semantics | None
  • qualname property — category.name, the unambiguous catalog key. source
  • conforming property source
  • section method — Text of one section, or None when the docstring lacks it. source
  • render method — Terminal-friendly description: signature, units, sections, provenance. source
  • as_dict method — 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 | None
  • log_ratio_per_radian: float | None
  • log_ratio_weber: float | None
  • separation: float | None
  • surface_count: int
  • reason: 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

identify_flux_exponent_from_q — Decide weber versus weber per radian by rebuilding q on closed contours. Reference source

validate_cocos — Check an equilibrium against the Sauter Eq. 23 relations for one COCOS index. 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: int
  • groups: tuple[str, ...]
  • samples: Any
  • values: Any
  • convention: Mapping[str, str]
  • grid: Mapping[str, Any]
  • provenance: Mapping[str, Mapping[str, Any]]
  • profiles: Mapping[str, Any]
  • phasors method — (N, K) excitation phasors A_g exp(+i delta_g) in sample order [A per turn]. source
  • metrics method — The metric names present, in first-appearance order [-]. source
  • to_frame method — 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')

relative_coil_coordinates — Amplitude ratios and relative phases of coil groups against group 0. Reference source
Also exported as vaft.process.relative_coil_coordinates.

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.

phased_sector_currents — Per-sector currents of one toroidal harmonic. Reference source
Also exported as vaft.process.phased_sector_currents.

toroidal_mode_decomposition — Complex toroidal Fourier coefficient of a per-sector quantity. Reference source
Also exported as vaft.process.toroidal_mode_decomposition.

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.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

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: 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
  • exponents method — 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.ndarray
  • ip_rate: np.ndarray
  • ip_change_per_tau: np.ndarray
  • dwdt_fraction: np.ndarray
  • finite: 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.ndarray
  • energy_basis_required: str
  • energy_basis_used: np.ndarray
  • approximation: 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.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]
  • power_balance method — The ConfinementPowerBalance view 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.ndarray
  • v_res: np.ndarray
  • r_p: np.ndarray
  • l_int: np.ndarray
  • v_ind_current: Optional[np.ndarray]
  • v_ind_profile: Optional[np.ndarray]
  • li3_rate_fallback: Optional[np.ndarray]

resolve_observed_confinement — Observed confinement time with the energy basis a scaling was fitted on (issue #1713). Reference source
Also exported as vaft.process.resolve_observed_confinement.

smoothed_time_derivative — Time derivative of a sampled quantity by a local polynomial fit, on any time grid. Reference source
Also exported as vaft.process.smoothed_time_derivative.

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.

solve_eddy_currents — Integrate the vessel eddy currents driven by a coil and plasma programme. Reference source
Also exported as vaft.process.solve_eddy_currents.

wall_propagator — The one-substep propagator of the passive circuit. Reference source
Also exported as vaft.process.wall_propagator.

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.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

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.ndarray
  • residual: numpy.ndarray
  • relative: numpy.ndarray
  • scale: float
  • delta_star: numpy.ndarray
  • source: numpy.ndarray
  • mask: 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.ndarray
  • current_parallel_inside: numpy.ndarray | None
  • lambda_: numpy.ndarray
  • b_phi_area_integral: numpy.ndarray
  • shell_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: float
  • harmonics: tuple[tuple[int, int], ...]
  • requested_q: bool
  • status: str
  • roots: tuple[vaft.process.equilibrium.RationalSurfaceRoot, ...]
  • method: str
  • present property — Whether the profile reaches q_target anywhere. 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: float
  • rho_pol_norm: float | None
  • rho_tor_norm: float | None
  • root_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_radius method — Major radius where each normalized flux surface crosses the outboard midplane [m]. source
  • psi method — Flux at the points, from the bicubic spline [flux unit of the map]. source
  • psi_norm method — Normalized flux at the points [-]. source
  • grad_psi method — |grad psi| at the points [flux unit per metre]. source
  • geometric_angle method — atan2(z - z_axis, r - r_axis) wrapped to [0, 2 pi) [rad]. source
  • inside method — True inside the boundary surface, measured along the axis ray [bool]. source
  • theta_star method — Straight-field-line angle in [0, 2 pi); NaN outside the boundary [rad]. source
  • surface method — 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.

virial_alpha_thin_annulus — Virial closure coefficient in the thin-annulus limit, from the boundary field. Reference source
Also exported as vaft.process.virial_alpha_thin_annulus.

volume_average — Volume average of a gridded quantity over the confined region. Reference source
Also exported as vaft.process.volume_average.

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.ndarray
  • area: np.ndarray
  • flux_weight: np.ndarray
  • incidence: np.ndarray
  • connection_weight: np.ndarray
  • model: FootprintProxyModel
  • incidence_applied: bool
  • relative property — The proxy scaled to a peak of one; a map with no peak stays zero [-]. source
  • describe method — 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: str
  • decay_width: float
  • separatrix_flux: float
  • connection_length_scale: float
  • connection_length_form: str
  • connection_length_reduction: str
  • clip_inside: bool
  • describe method — 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.

toroidal_surface_node_areas — Area each node of a surface mesh represents, as a dual cell. Reference source
Also exported as vaft.process.toroidal_surface_node_areas.

upstream_flux_weight — Exponential upstream heat-channel weight in normalized flux. Reference source
Also exported as vaft.process.upstream_flux_weight.

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.ndarray
  • frequency: numpy.ndarray
  • names: tuple[str, ...]
  • sources: tuple[str | None, ...]
  • reference: str
  • eigenvalues: numpy.ndarray
  • eigenvectors: numpy.ndarray
  • dominant_power: numpy.ndarray
  • coherent_fraction: numpy.ndarray
  • participation: numpy.ndarray
  • phase: numpy.ndarray
  • n_diagnostics: numpy.ndarray
  • component_defined: numpy.ndarray
  • normalization: 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.ndarray
  • frequency: numpy.ndarray
  • names: tuple[str, ...]
  • units: tuple[str, ...]
  • sources: tuple[str | None, ...]
  • raw_csd: numpy.ndarray
  • matrix: numpy.ndarray
  • raw_valid: numpy.ndarray
  • valid: numpy.ndarray
  • shared_segments: numpy.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[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.ndarray
  • frequency: numpy.ndarray
  • csd: numpy.ndarray
  • coherence: numpy.ndarray
  • phase: numpy.ndarray
  • psd_x: numpy.ndarray
  • psd_y: numpy.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[vaft.process.fluctuation.ResamplingProvenance, vaft.process.fluctuation.ResamplingProvenance]
  • cross_spectral_density property — Descriptive alias for csd. source
  • resampled property — 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.ndarray
  • csd: numpy.ndarray
  • coherence: numpy.ndarray
  • phase: numpy.ndarray
  • n_segments: int
  • significance_95: float
  • sample_rate: float
  • time_range: tuple[float, float]
  • nperseg: int
  • noverlap: int
  • resampled: 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: str
  • time: numpy.ndarray
  • data: numpy.ndarray
  • units: str
  • usable_bandwidth_hz: float | None
  • source: 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.ndarray
  • frequency: numpy.ndarray
  • magnitude: 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.ndarray
  • psd: numpy.ndarray
  • sample_rate: float
  • method: str
  • units: str
  • fits: tuple[vaft.process.fluctuation.SpectralFit, ...]
  • spectral_break: vaft.process.fluctuation.SpectralBreak | None
  • band_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: str
  • source_rate: float
  • target_rate: float
  • operation: str
  • anti_alias_cutoff_hz: float | None
  • usable_bandwidth_hz: float
  • bandwidth_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: float
  • alpha_high: float
  • break_frequency: float
  • r_squared: float
  • mode: str
  • low_fit: vaft.process.fluctuation.SpectralFit
  • high_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: float
  • intercept: float
  • r_squared: float
  • frequency_range: tuple[float, float]
  • n_points: int
  • stderr: float
  • residuals: numpy.ndarray

track_dominant_frequency — Follow the dominant spectral ridge of a time-frequency map, window by window. Reference source
Also exported as vaft.process.track_dominant_frequency.

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: str
  • axes: collections.abc.Mapping[str, collections.abc.Mapping[str, typing.Any]]
  • arithmetic_compatible property 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.

prepare_diagnostic_traces — Prepare causal, gap-broken traces; renderers never interpolate or reduce. Reference source
Also exported as vaft.process.gyrokinetics.prepare_diagnostic_traces, vaft.process.prepare_diagnostic_traces.

select_time — Nearest finite time and evidence; no implicit scientific tolerance. Reference source
Also exported as vaft.process.gyrokinetics.select_time, vaft.process.select_time.

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: 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]

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: 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
  • initial_state: tuple[float, float]
  • method: str
  • r2_turbulence: float
  • r2_zonal: float
  • warnings: 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.ndarray
  • y: np.ndarray
  • values: np.ndarray
  • metadata: 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.ndarray
  • shear: np.ndarray
  • normalization: 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.ndarray
  • zonal: np.ndarray
  • ratio: np.ndarray
  • weighting: str
  • fraction property 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.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

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.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

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.ndarray
  • z: np.ndarray
  • method: str
  • r0: float | None
  • pitch: float | None
  • nominal_pitch: float | None
  • incident_angle_deg: float | None
  • rmse: float | None
  • nrmse: float | None
  • monotonic: bool
  • within_bounds: bool
  • bound_hit: bool
  • n_samples: int
  • n_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: float
  • signal_lowpass_hz: float
  • position_lowpass_hz: float
  • gain: float
  • baseline: str
  • baseline_samples: int
  • tf_turns: int
  • tilt_bounds_deg: tuple[float, float]
  • orientation: str
  • alpha_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: str
  • checks: Mapping[str, str]
  • reasons: tuple[str, ...]
  • is_usable property 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.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
  • b_z_raw: np.ndarray | None
  • b_z_corrected: np.ndarray | None
  • crosstalk: ImpaCrosstalkFit | None
  • bz_channel_valid: np.ndarray | None
  • provenance: 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.

4 fields · 2 members
  • start_time: float
  • end_time: float
  • indices: np.ndarray
  • metrics: Mapping[str, float]
  • n_samples property source
  • duration property source

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: float
  • tf_current_min_fraction: float
  • ip_max: float
  • pf_current_max: float
  • min_duration: float
  • tf_dynamic_range_min: float
  • smoothing_samples: int

toroidal_field — Vacuum toroidal field at a radius, from the coil current. Reference source
Also exported as vaft.process.toroidal_field.

validate_impa Deprecated — Deprecated compatibility wrapper for grade_impa_quality. Reference source
Also exported as vaft.process.validate_impa.

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: str
  • reduction: str
  • status: str
  • source: str
  • input_record: Mapping[str, Any]
  • weights property — Relative densities normalised to sum to one. source
  • charges property source
  • masses property source
  • main_ion_charge property 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.

4 fields · 2 members
  • element: str
  • charge_state: float
  • relative_density: float
  • mass: Optional[float]
  • z_n property — The element’s atomic number (not its charge). source
  • label property — C6+-style label. source

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: 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
  • time: Optional[float]
  • normalization: Mapping[str, Any]
  • provenance: Mapping[str, Any]
  • zeff_source property source
  • source property source
  • as_rows method — One row per rho, prefixed by key (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: 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]
  • 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]
  • fraction method — n / n_e of one species (summed over charge states when none is named). source
  • as_record method — A JSON-ready summary (scalars as floats, profiles as lists). source

surface_composition_profile — A copy of a GACODE profile whose ions are the main ion plus an explicit impurity composition. Reference source
Also exported as vaft.process.surface_composition_profile.

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.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]
  • 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.ndarray
  • T_e: np.ndarray
  • ion_densities: Mapping[str, np.ndarray]
  • ion_temperatures: Mapping[str, np.ndarray]
  • pressure: PressureAssembly
  • composition: Any
  • fast_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.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]

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.

remove_offset — Subtract a signal’s pre-plasma baseline, taken as its leading samples. Reference source
Also exported as vaft.process.remove_offset.

solve_electron_temperature — Solve the classical triple-probe relation for the electron temperature. Reference source
Also exported as vaft.process.solve_electron_temperature.

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.ndarray
  • z1: np.ndarray
  • r2: np.ndarray
  • z2: np.ndarray
  • phi: np.ndarray
  • labels: tuple[str, ...]
  • subset method — 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.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]
  • mercier_unstable property — D_I > 0: the universal Mercier criterion, nothing more [-]. source
  • resistive_interchange_unstable property — 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.ndarray
  • s: np.ndarray
  • alpha: np.ndarray
  • alpha_first: np.ndarray
  • alpha_second: np.ndarray
  • volume: np.ndarray
  • provenance: Mapping[str, Any]
  • s_alpha_unstable property — alpha inside 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.ndarray
  • surfaces: 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: 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
  • rephase method — 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: int
  • n: int
  • width: float
  • phase: float
  • angular_frequency: float
  • t0: float
  • psi_n_s: float | None
  • surface_index: int
  • helicity: int | None
  • alpha method — Island phase alpha(t) [rad]. source

resolve_rational_surface — Where the equilibrium’s own safety factor equals m/n. Reference source
Also exported as vaft.process.resolve_rational_surface.

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.ndarray
  • frequency: numpy.ndarray
  • magnitude: 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.ndarray
  • n: numpy.ndarray
  • power: numpy.ndarray
  • phase: numpy.ndarray
  • spectrum_frequency: numpy.ndarray
  • cross_power: numpy.ndarray
  • peak_indices: numpy.ndarray
  • n_raw: numpy.ndarray
  • n_rounded: numpy.ndarray
  • coherence: 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: float
  • toroidal_angle: numpy.ndarray
  • modes: 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: float
  • n: int
  • intercept: float
  • rms_error: float
  • phase: numpy.ndarray
  • fitted_phase: numpy.ndarray
  • amplitude: 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.ndarray
  • flux_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: float
  • time_end: float
  • sample_count: int
  • fast_sample_rate: float
  • lowpass_cutoff: float
  • lowpass_taps: int
  • default_index_start: int
  • default_index_end: int
  • default_probe_baseline_end: int
  • late_shot_min: int
  • transient_shot_min: int
  • transient_shot_max: int
  • late_index_start: int
  • late_index_end: int
  • late_probe_baseline_end: int
  • flux_baseline_first_start: int
  • flux_baseline_first_end: int
  • flux_baseline_second_start: int
  • flux_baseline_second_end: int
  • flux_baseline_late_start: int
  • flux_baseline_late_end: int
  • flux_baseline_late_loop_numbers: tuple[int, ...]
  • calibration_mode: str
  • flux_output_per_radian: bool
  • window_override: tuple[int, int, int] | None
  • flux_baseline_window: tuple[float, float] | None
  • flux_baseline_samples: int | None
  • daq_mode: str
  • allow_zero_fallback: bool
  • timebase method source
  • window_for_shot method 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.ndarray
  • ballooning_min_c_a: np.ndarray
  • summary: Any
  • provenance: Mapping[str, Any]

vaft.process.ml

Backend-neutral machine-learning processing: data to published model (#669).

BackendUnavailableError

class source

The requested training/inference backend is not installed.

Also exported as vaft.process.BackendUnavailableError.

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: str
  • output: str
  • threshold: float
  • method: str
  • quantile: float | None
  • partition: str
  • n_samples: int
  • groups: tuple[str, ...]
  • population: str | None
  • usage: dict | None
  • to_dict method 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: DatasetSpec
  • inputs: np.ndarray
  • groups: np.ndarray
  • targets: np.ndarray | None
  • sample_meta: Mapping[str, np.ndarray]
  • available: np.ndarray | None
  • fingerprint: str
  • n_samples property source
  • input_shape property source
  • target_shape property source
  • group_labels property — Groups as strings, the form a Split assigns. source
  • available_mask property — available, with None read as every sample available. source
  • subset method — The samples at indices, with their groups, metadata and availability. source
  • replace method 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: str
  • task: str
  • group_key: str
  • input_names: tuple[str, ...]
  • target_names: tuple[str, ...]
  • description: str
  • metadata: Mapping[str, Any]
  • to_dict method 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: str
  • metrics: Mapping[str, float]
  • per_group: Mapping[str, Mapping[str, float]]
  • n_samples: int
  • model_identity: ModelIdentity
  • provenance: 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: DatasetSpec
  • inputs: np.ndarray
  • groups: np.ndarray
  • targets: np.ndarray | None
  • sample_meta: Mapping[str, np.ndarray]
  • available: np.ndarray | None
  • fingerprint: str
  • feature_spec: FeatureSpec
  • select_block method — 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.

3 fields · 2 members
  • feature_names: tuple[str, ...]
  • blocks: Mapping[str, tuple[str, ...]]
  • version: str
  • block_indices method source
  • to_dict method source

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: ModelIdentity
  • groups: np.ndarray | None
  • sample_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: 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]
  • input_names: tuple[str, ...]
  • training: Mapping[str, Any]
  • metrics: Mapping[str, Any]
  • calibration: Mapping[str, CalibrationResult]
  • tensor_schema: Mapping[str, Any]
  • identity: ModelIdentity | None
  • supervised property source
  • state_sha256 property source
  • contract_sha256 property — Bind weights, normalization, configuration and declared use history. source
  • resolved_identity method — The identity to stamp on a result: the resolved one, else in-memory. source
  • with_calibration method — A copy carrying calibration; the identity is dropped. source
  • replace method 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: str
  • members: Mapping[str, ModelArtifact]
  • composition: Mapping[str, Any]
  • identity: ModelIdentity | None
  • replace method 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: str
  • state_sha256: str
  • version: str | None
  • manifest_sha256: str | None
  • stage: str | None
  • status: str | None
  • resolved_by: str
  • source: str | None
  • bundle: str | None
  • bundle_manifest_sha256: str | None
  • to_dict method 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: str
  • task: str
  • backend: str
  • hyperparameters: Mapping[str, Any]
  • to_dict method 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.

2 fields · 5 members
  • spec: SplitSpec
  • assignment: Mapping[str, str]
  • partitions property source
  • groups method source
  • mask method — Samples of dataset in partition; refuses an unassigned group. source
  • indices method source
  • to_dict method source

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: int
  • fixed: Mapping[str, str]
  • method: str
  • to_dict method 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: int
  • epochs: int
  • batch_size: int
  • learning_rate: float
  • weight_decay: float
  • early_stopping_patience: int | None
  • normalize_inputs: bool
  • normalize_targets: bool
  • normalize_axes: tuple[int, ...]
  • target_normalize_axes: tuple[int, ...]
  • augmentation: str | None
  • device: str
  • optimizer: str
  • scheduler: str | None
  • max_grad_norm: float | None
  • precision: str
  • loader_workers: int
  • loader_pin_memory: bool
  • checkpoint_path: str | None
  • resume_from: str | None
  • warm_start_from: str | None
  • max_epochs_this_run: int | None
  • train_partition: str
  • validation_partition: str | None
  • to_dict method 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: ModelArtifact
  • history: Mapping[str, tuple[float, ...]]
  • split: Split
  • best_epoch: int | None
  • train_indices: np.ndarray | None
  • train_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.

load_model_artifact — Load an artifact directory, verifying every file against its manifest. Reference source
Also exported as vaft.process.load_model_artifact, vaft.process.ml.load_model_artifact.

save_model_artifact — Write a model as an immutable, hash-pinned artifact directory. Reference source
Also exported as vaft.process.ml.save_model_artifact, vaft.process.save_model_artifact.

vaft.process.ml.bundle

Several fitted models released as one version (#669, #973 section 24).

load_model_bundle — Load a bundle directory, verifying every file and member manifest. Reference source
Also exported as vaft.process.load_model_bundle, vaft.process.ml.load_model_bundle.

save_model_bundle — Write a multi-model bundle as one immutable, hash-pinned release. Reference source
Also exported as vaft.process.ml.save_model_bundle, vaft.process.save_model_bundle.

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.

split_groups — Assign independent groups to train/validation/test partitions. Reference source
Also exported as vaft.process.ml.split_groups, vaft.process.split_groups.

window_dataset — Cut sliding windows that never cross a group boundary. Reference source
Also exported as vaft.process.ml.window_dataset, vaft.process.window_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.

predict — Run a model on new data and stamp the result with its exact identity. Reference source
Also exported as vaft.process.ml.predict, vaft.process.predict.

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.

load_model — Resolve a published model and load it, ready for predict. Reference source
Also exported as vaft.process.load_model, vaft.process.ml.load_model.

resolve_model — Resolve a published model to one exact, hash-verified local version. Reference source
Also exported as vaft.process.ml.resolve_model, vaft.process.resolve_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: DatasetSpec
  • source: object
  • input_specs: Mapping[str, TensorSpec]
  • target_specs: Mapping[str, TensorSpec]
  • groups: np.ndarray
  • sample_meta: Mapping
  • available: np.ndarray | None
  • fingerprint: str
  • n_samples property source
  • group_labels property source
  • available_mask property source
  • subset method source
  • schema method source
  • sample method 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: Mapping
  • targets: Mapping
  • target_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: tuple
  • dtype: str
  • unit: str
  • mask: str | None
  • normalize: bool
  • to_dict method 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.

evaluate_model — Standard ML metrics of a model on one partition, overall and per group. Reference source
Also exported as vaft.process.evaluate_model, vaft.process.ml.evaluate_model.

train_model — Train a model on the train partition and package it with its provenance. Reference source
Also exported as vaft.process.ml.train_model, vaft.process.train_model.

vaft.process.ml.usage

Opt-in declared data roles and observed entrypoint uses (#2047).

import_data_roles — Import exact group roles without recomputing a scientific split. Reference source
Also exported as vaft.process.import_data_roles, vaft.process.ml.import_data_roles.

record_data_use — Check a declared use and return its provenance receipt. Reference source
Also exported as vaft.process.ml.record_data_use, vaft.process.record_data_use.

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: 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
  • label property — 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: str
  • modes: 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.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]
  • 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: str
  • passed: bool
  • max_abs_error: float
  • max_rel_error: float
  • samples: 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: str
  • Q: np.ndarray
  • eigenvalues: np.ndarray
  • checks: tuple[QuadraticTorqueCheck, ...]
  • reasons: tuple[str, ...]
  • provenance: Mapping[str, object]

two_group_phase_extrema — Relative phases of the largest and smallest signed torque of two groups. Reference source
Also exported as vaft.process.two_group_phase_extrema.

vaft.process.numerical

Numerical primitives on plain arrays.

time_derivative — Time derivative of a sampled quantity on a non-uniform time axis. Reference source
Also exported as vaft.process.time_derivative.

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.

7 fields · 2 members
  • time: float | None
  • index: int | None
  • method: str
  • evidence: Mapping[str, Any]
  • flags: tuple[str, ...]
  • rejected: tuple[tuple[float, str, RunFeatures], ...]
  • accepted: RunFeatures | None
  • found property source
  • as_dict method source

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.

9 fields · 2 members
  • value: float | None
  • time: float | None
  • index: int | None
  • excess: float | None
  • method: str
  • evidence: Mapping[str, Any]
  • flags: tuple[str, ...]
  • rejected: tuple[tuple[float, str, RunFeatures], ...]
  • accepted: RunFeatures | None
  • found property source
  • as_dict method source

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: OnsetRecord
  • offset: OnsetRecord
  • segments: tuple[RunFeatures, ...]
  • flags: tuple[str, ...]
  • evidence: Mapping[str, Any]
  • found property source
  • start property source
  • end property source
  • duration_s property — Extent of the window: offset - onset, gaps included. source
  • active_s property — How much of the window is actually above threshold. source
  • duty_cycle property — active_s / duration_s: 1 for one uninterrupted run, less with gaps. source
  • as_dict method 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: float
  • end_time: float
  • width_s: float
  • samples: int
  • peak: float
  • peak_time: float
  • prominence: float
  • integral: float
  • as_dict method 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.

zero_crossing_after_excursion — First sample after an anchored excursion where the record changes sign. Reference source
Also exported as vaft.process.zero_crossing_after_excursion.

zero_phase_lowpass — Forward-backward Butterworth low-pass: no group delay. Reference source
Also exported as vaft.process.zero_phase_lowpass.

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]

profile_ordering_quantities — The profile ordering quantities on each flux surface, NaN where an input is missing. Reference source
Also exported as vaft.process.profile_ordering_quantities.

time_history_ordering_quantities — How slowly a state evolves against Alfvenic and resistive times, NaN where an input is missing. Reference source
Also exported as vaft.process.time_history_ordering_quantities.

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: float
  • members: tuple[SurfaceMember, ...]
  • resonant_modes property — 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: float
  • modes: tuple[int, ...]
  • contributions: tuple[complex, ...]
  • peak: float
  • peak_angle: float
  • quadrature: float
  • linear_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: float
  • control_vector: np.ndarray
  • response_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: float
  • projection: np.ndarray
  • singular_values: np.ndarray
  • dominant_mode: int
  • b_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: 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

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.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

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: float
  • scale: float
  • name: 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: float
  • m_pol: int
  • n_tor: int
  • delta: complex
  • offset: 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: str
  • low: float
  • high: float
  • source: str
  • mask method — Which samples of psi_norm fall 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: int
  • membership: str
  • m: int | None
  • index: int | None
  • psi_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: 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

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')

CoordinateUnavailableError

class source

The requested radial coordinate cannot be derived from this equilibrium.

Also exported as vaft.process.CoordinateUnavailableError.

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: str
  • unit: str
  • coordinate: str
  • method: str
  • order_requested: int | None
  • order_used: int | None
  • time: float
  • time_index: int
  • position: numpy.ndarray
  • value: numpy.ndarray
  • sigma: numpy.ndarray
  • sigma_used: numpy.ndarray
  • fitted: numpy.ndarray
  • normalized_residual: numpy.ndarray
  • used: numpy.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: numpy.ndarray
  • curve: numpy.ndarray
  • curve_std: numpy.ndarray | None
  • notes: tuple[str, ...]
  • coefficients property — The fitted coefficients, None for a method without any. source
  • rejected property — Channel indices the fit refused. source
  • n_used property source
  • fitted_std property — The fit’s own uncertainty at each channel, when the method has one (GP). source
  • summary method — 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: object
  • coordinate: str
  • method: str
  • order: int | None
  • coefficients: object
  • span: tuple[float, float] | None
  • parameters_text method — The *_fit.parameters record: 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.ndarray
  • rho_pol_norm: numpy.ndarray
  • rho_tor_norm: numpy.ndarray | None
  • rho_tor_norm_unavailable: str | None
  • source: str
  • n_channels property source
  • available method — The coordinates this mapping can hand out, in preference order. source
  • select method — The channel positions in coordinate, 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: float
  • method: str
  • quantity: str
  • coordinate: str
  • width: float | None
  • fit: FittedProfile | None
  • reason: str
  • from_fit property — Whether a pedestal was actually resolved, rather than assumed. source
  • inner_edge property — The pedestal’s inner knee, position - width/2; None without 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...

write_synthetic_core_profiles — Store a successful synthetic kinetic state as one core_profiles.profiles_1d slice. Reference source
Also exported as vaft.process.write_synthetic_core_profiles.

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: str
  • description: str
  • source: str
  • gradient_coordinate: str | None
  • reference_length: str | None
  • required: 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.ndarray
  • coordinate: np.ndarray
  • coordinate_name: str
  • unit: str
  • metadata: 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: str
  • unit: str
  • kind: str
  • range: tuple[float, float] | None
  • definition: 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.

5 fields · 2 members
  • coordinates: Mapping[str, Any]
  • a_minor: Any
  • R_major_axis: Any
  • time: float | None
  • source: str
  • values method — The coordinate’s values, refusing an unavailable one by name. source
  • available property source

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.

3 fields · 2 members
  • name: str | None
  • symbol: str | None
  • length: Any
  • value property source
  • record method — The plain-mapping form stored in a ProfileGradient’s metadata. source

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: 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]
  • q1_surfaces property source
  • q1_surface_count property source
  • as_record method — 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: int
  • n: int
  • inner: RationalCrossing
  • outer: RationalCrossing
  • delta_rho property 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: float
  • rho: float
  • volume: float
  • integrated_pressure: float
  • mean_pressure property 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: 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]
  • mean_abs_pressure_gradient: Optional[float]
  • max_abs_pressure_gradient: Optional[float]
  • width_rho property 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: 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
  • width_rho property 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: int
  • n: int
  • q_target: float
  • psi_n: float
  • rho: float
  • shear: 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: int
  • n: int
  • q_rational: float
  • delta_q: float
  • crossing_count: int
  • tangent_candidate: bool
  • abs_delta_q property 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: 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]
  • j_bootstrap_dot_b: Optional[np.ndarray]
  • bootstrap_model: str
  • source: Mapping[str, Any]
  • scaled method — The same state with T_e and n_e multiplied (sensitivity). source
  • without_bootstrap method source
  • restricted method — The surfaces with psi_min <= psi_norm <= psi_max only. 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: 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

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.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]
  • as_dict method 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: 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]
  • reason: Optional[str]
  • zeff property source
  • status property source
  • as_row method — Flat scalar mapping: survives code.parameters and 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.ndarray
  • I_p: np.ndarray
  • psi_boundary: np.ndarray
  • li_3: np.ndarray
  • R0: float
  • flux_normalization: str
  • flux_sign: float
  • voltage_convention: str
  • li_definition: str
  • source: Mapping[str, Any]
  • L_i property — Dimensional internal inductance mu0 R0 li_3 / 2 [H]. source
  • scaled_li method — The same flux with li_3 multiplied by factor (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.

3 fields · 3 members
  • method: str
  • window_s: Optional[float]
  • order: Optional[int]
  • apply method — Smoothed values on time [any]. source
  • scaled method — The same smoothing with the window multiplied by factor. source
  • describe method source

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: str
  • psi_norm: np.ndarray
  • sigma: np.ndarray
  • z_eff: float
  • rtol: 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: 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]
  • response method — Complex Phi per surface for one (K,) or (N, K) excitation [T]. source
  • quadratic method — Q with (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: str
  • relative_errors: Mapping[str, float]
  • reasons: tuple[str, ...]

window_weights — Surface weights whose quadratic metric is the window’s mean squared |Phi|. Reference source
Also exported as vaft.process.window_weights.

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: int
  • statistic: float
  • count: int
  • resolved: bool
  • reason: 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: int
  • t0: float
  • dt: float
  • sample_rate: float
  • uniform: bool
  • strictly_increasing: bool
  • max_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.

vfit_signal_start_end Deprecated — Deprecated compatibility wrapper for detect_active_window. Reference source
Also exported as vaft.process.vfit_signal_start_end.

vfit_signal_startend Deprecated — Deprecated compatibility wrapper for detect_active_window. Reference source
Also exported as vaft.process.vfit_signal_startend.

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.ndarray
  • raw: numpy.ndarray
  • bands: 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.ndarray
  • te: numpy.ndarray
  • rel_fluctuation: numpy.ndarray
  • al_signal: numpy.ndarray
  • pairs: 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.ndarray
  • planes: numpy.ndarray
  • r: numpy.ndarray
  • z: numpy.ndarray
  • emissivity: numpy.ndarray
  • delta_emissivity: numpy.ndarray
  • brightness: numpy.ndarray
  • sightlines: Any
  • topology: 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: int
  • offset_deg: float
  • residual_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]
  • size property source
  • state_id property source
  • charge_density method — sum_a Z_a n_a [m^-3]. source
  • electron_density method — The stored n_e if known, else the quasi-neutral sum_a Z_a n_a [m^-3]. source
  • select method — The components of one BASES basis. 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: Species
  • charge: Any
  • population: str
  • density: np.ndarray
  • mass_amu: Any
  • temperature: Optional[np.ndarray]
  • bundled: bool
  • mean_square_charge: Optional[np.ndarray]
  • origin: str
  • source: str
  • pseudo_of: tuple[str, ...]
  • charge_range: Optional[tuple[float, float]]
  • z_n property source
  • hydrogenic property source
  • mass_number property source
  • component_id property — <element>-<A>/Z<charge or range>/<population>, the physics identity. source
  • z_moment method — <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: str
  • method: str
  • components: tuple[SpeciesComponent, ...]
  • source_components: tuple[str, ...]
  • preserves: tuple[str, ...]
  • not_guaranteed: tuple[str, ...]
  • state_id: str
  • moments: Mapping[str, Any]
  • notes: Mapping[str, Any]
  • projection_id property source
  • record method — 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.

2 members
  • get_summary method — Get summary of regression coefficients and p-values. source
  • get_exponents method — Get scaling law exponents (excluding constant term). source

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 | 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
  • found property 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 | None
  • amplitude: float | None
  • relative_amplitude: float | None
  • trend_current: float | None
  • noise_sigma: float | None
  • before: float | None
  • polarity: int
  • reason: str | None
  • found property 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: 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]
  • electron_particle_flux_m2_s: Optional[float]
  • ion_particle_flux_m2_s: Mapping[str, float]
  • as_record method — 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.

5 fields · 2 members
  • solver: str
  • status: str
  • reasons: tuple[str, ...]
  • conditions: tuple[str, ...]
  • surfaces: tuple[SurfaceReadiness, ...]
  • runnable property source
  • summary method source

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: TransportStateKey
  • efit_quality: str
  • quality_source: str
  • status: str
  • reasons: tuple[str, ...]
  • profile: Any
  • times: 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: Any
  • resolved property source
  • ti_lineage property source
  • identity_payload method — Everything that, changed, makes this a different state. source
  • identity property — sha256 of identity_payload (the upstream half of every run identity). source
  • summary method — 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: float
  • status: str
  • detail: str
  • local_input: Any
  • ready property 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.

5 fields · 4 members
  • canonical_state_id: str
  • species_state_id: str
  • projection: Any
  • profile: Any
  • fill_probe: Any
  • target_physics property source
  • method property source
  • projection_id property source
  • record method — A JSON-ready provenance record for a run on this projection. source

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.

3 fields · 3 members
  • shot: int
  • time_efit_s: float
  • efit_lineage: str
  • time_ms property — The slice time in whole milliseconds, the #1331 label table’s key [ms]. source
  • as_dict method source
  • slug method — A path-safe name: <shot>/<lineage>/<time_ms>. source

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.

project — Modal amplitudes a = V^T R I_w. Reference source
Also exported as vaft.process.project.

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.ndarray
  • R_r: np.ndarray
  • M_r: np.ndarray | None
  • labels: tuple[tuple[str, int], ...]
  • keep: tuple[np.ndarray, ...]
  • n_modes property — 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: str
  • index: np.ndarray
  • tau: np.ndarray
  • V: np.ndarray
  • residual: float
  • min_relative_gap: float
  • size property 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: int
  • provenance: Mapping[str, str]
  • n_modes method — Full ranks (n_1, ..., n_G); they sum to n_elements. source
  • V method — V_seg for the retained modes, (n_elements, M_tot), scattered by element index so an interleaved loop order needs no permutation. source
  • tau method source
  • labels method source
  • segment method source
  • digest method — 12-hex fingerprint of the segment ids, decay times and modes. source
  • to_npz method source
  • from_npz classmethod 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: 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]
  • as_row method source

spitzer_resistive_equivalent_zeff — Analytic resistive equivalent of a Z_eff profile under Spitzer (NRL) resistivity. Reference source
Also exported as vaft.process.spitzer_resistive_equivalent_zeff.

zeff_profile_for_state — The atomic-data Z_eff profile on a flux-surface state’s own surfaces. Reference source
Also exported as vaft.process.zeff_profile_for_state.

results matching ""

    No results matching ""