API: vaft.plot

Generated from each module's __all__ by python -m vaft._api_catalog: 584 published objects in 73 modules. Signatures and summaries are read from the source; nothing here is written by hand. All API pages

vaft.plot
b_field_probe_spatial_fieldfunction
ddfunction
documentationfunction
equilibrium_overview_profilesfunction
extractfunction
flux_loop_spatial_fluxfunction
mhd_linear_profile_island_widthfunction
mhd_linear_profile_resonant_fluxfunction
migration_tablefunction
mirnov_spatial_phasefunction
nbi_profile_current_drivefunction
nbi_profile_electron_heatingfunction
nbi_profile_ion_heatingfunction
neoclassical_profile_bootstrap_currentfunction
passive_structure_time_currentfunction
PlotDocumentationclass
save_renderedfunction
vaft.plot.analytic
miller_surfaces_modelfunction
plasma_state_projection_modelfunction
plot_miller_surfacesfunction
plot_plasma_state_projectionfunction
plot_solovev_equilibriumfunction
solovev_equilibrium_modelfunction
vaft.plot.backend.access
accessor_forfunction
arrayfunction
countfunction
getfunction
hasfunction
vaft.plot.backend.dd
dd_pathsfunction
DDInfoclass
DDPathclass
DEFAULT_DD_VERSIONdata
from_templatefunction
normalise_unitsfunction
parsefunction
resolvefunction
ROLESdata
to_imasfunction
to_infofunction
to_omasfunction
to_omas_templatefunction
vaft.plot.backend.discovery
ANALYSIS_METHODSdata
describe_by_idsfunction
describe_entriesfunction
INTERACTIONdata
INTERACTION_ENTRY_POINTSdata
OVERVIEW_CONTENTSdata
sequence_valuesfunction
vaft.plot.backend.entries
label_entriesfunction
LABEL_OPTIONSdata
vaft.plot.backend.facade
install_facadesfunction
refuse_render_optionsfunction
RENDER_KEYWORDSdata
vaft.plot.backend.options
choices_forfunction
EXTRACTION_OPTIONSdata
OPTION_SCHEMAdata
OptionSpecclass
split_optionsfunction
STYLE_OPTIONSdata
validate_optionsfunction
vaft.plot.backend.recipes
build_modelfunction
CallableRecipeclass
ChoiceDeclarationclass
diagnoses_itselffunction
entry_supportsfunction
expand_templatefunction
FieldRecipeclass
GeometryRecipeclass
is_lazy_odsfunction
LineRecipeclass
materialise_readsfunction
materialises_for_builderfunction
missing_required_pathfunction
PanelRecipeclass
ProfileRecipeclass
RECIPESdata
required_idsfunction
SequenceDeclarationclass
SpectrogramRecipeclass
vaft.plot.backend.render
frame_renderersfunction
refuse_when_unsupportedfunction
render_entriesfunction
render_text_viewfunction
STATE_SELECTORSdata
vaft.plot.backend.tables
slice_boundary_cellsfunction
validation_verdictsfunction
vaft.plot.backends
RENDER_BACKENDSdata
render_backends_forfunction
renderer_forfunction
resolve_render_backendfunction
supports_backendfunction
vaft.plot.composition
as_compositionfunction
AxisLinkclass
build_compositionfunction
FigureCellclass
FigureCompositionclass
render_compositionfunction
vaft.plot.controls
CONTROL_GROUPSdata
CONTROL_KINDSdata
controls_forfunction
ControlSpecclass
vaft.plot.dimensionless_space
AXIS_LABELSdata
AXIS_SCALESdata
dimensionless_similarityfunction
SimilarityExclusionsclass
vaft.plot.discovery
catalogfunction
match_queryfunction
normalise_queryfunction
PlotCapabilityclass
PlotCatalogclass
QueryMatchclass
vaft.plot.display
channel_labelfunction
DisplaySpecclass
figure_titlefunction
gradient_labelfunction
PSI_STYLESdata
QUANTITIESdata
quantity_for_unitfunction
QuantityDisplayclass
RADIAL_COORDINATE_LABELSdata
resolve_displayfunction
subject_display_namefunction
SUBJECT_NOTATION_DEFAULTSdata
SUBJECT_UNIT_DEFAULTSdata
unit_markupfunction
vaft.plot.docs_catalog
documentation_snapshotfunction
entry_point_namesfunction
export_documentation_snapshotfunction
mainfunction
SCHEMA_VERSIONdata
THUMBNAILSdata
vaft.plot.docs_thumbnails
buildfunction
checkfunction
default_outputfunction
DPIdata
FIGSIZEdata
mainfunction
MANIFESTdata
MODEL_HASH_DIGITSdata
model_sha256function
PALETTE_COLORSdata
rehashfunction
render_onefunction
renderer_sha256function
sample_candidatesfunction
sample_sourcesfunction
stale_reasonfunction
vaft.plot.environment
close_figurefunction
close_new_figures_on_errorfunction
default_interaction_backendfunction
detect_environmentfunction
Environmentclass
ENVIRONMENT_KINDSdata
use_non_interactive_backendfunction
vaft.plot.equilibrium_quality
COHORT_STYLEdata
equilibrium_quality_diagnostic_gridfunction
equilibrium_quality_diagnostic_slidesfunction
equilibrium_quality_measured_vs_reconstructedfunction
equilibrium_quality_reduced_chi2function
equilibrium_quality_residual_distributionfunction
equilibrium_quality_selection_funnelfunction
equilibrium_quality_validation_matrixfunction
vaft.plot.equilibrium_section
build_equilibrium_sectionfunction
DEFAULT_FLUX_LEVELSdata
DEFAULT_SECTION_PHIdata
Sectionclass
valid_equilibrium_indicesfunction
vaft.plot.figure_options
as_figure_optionsfunction
AXIS_SCALESdata
COLOR_NORMSdata
figure_options_scopefunction
FigureOptionsclass
LEGEND_LOCATIONSdata
vaft.plot.fluctuation
COVERAGE_CAPTIONdata
cross_spectrum_modelfunction
plot_cross_diagnostic_coherence_spectrogramfunction
plot_cross_spectrumfunction
plot_fluctuation_frequency_coveragefunction
plot_multi_diagnostic_coherent_fractionfunction
plot_multi_diagnostic_coherent_spectrogramfunction
plot_multi_diagnostic_participationfunction
plot_multi_diagnostic_phasefunction
TYPICAL_PHENOMENON_BANDSdata
vaft.plot.gyrokinetics
cgyro_linear_spectrumfunction
plot_convergencefunction
plot_eigenfunctionfunction
plot_fluctuation_spectrafunction
plot_flux_contributorsfunction
plot_flux_ky_spectrumfunction
plot_flux_tracefunction
plot_gyrokinetics_field_potentialfunction
plot_linear_spectrumfunction
plot_local_statefunction
plot_mixing_length_proxyfunction
plot_model_detailsfunction
plot_predator_prey_lagfunction
plot_predator_prey_phase_spacefunction
plot_predator_prey_tracefunction
plot_saturation_parametersfunction
tglf_flux_contributorsfunction
tglf_linear_spectrumfunction
tglf_local_statefunction
vaft.plot.intent
active_themefunction
DEFAULT_COLOURSdata
DEFAULT_PALETTEdata
is_colour_tokenfunction
palettefunction
resolve_colorfunction
resolve_stylefunction
themedfunction
TOKEN_NAMESPACESdata
vaft.plot.k3d
coil_phase_explorerfunction
to_k3dfunction
vaft.plot.kinetic_state
kinetic_state_pressure_comparisonfunction
kinetic_state_virial_li_comparisonfunction
kinetic_state_virial_pair13_comparisonfunction
vaft.plot.local_mhd_criteria
local_mhd_criteria_field_curvaturefunction
local_mhd_criteria_profile_interchangefunction
local_mhd_criteria_s_alphafunction
vaft.plot.machine_geometry
CROSS_SHOT_NOTICEdata
cross_shot_noticefunction
MACHINE_GEOMETRY_FAMILIESdata
machine_geometry_registryfunction
machine_geometry_viewfunction
MachineGeometryclass
project_machine_geometryfunction
vaft.plot.ml
group_metricsfunction
learning_curvesfunction
resource_comparisonfunction
vaft.plot.models
as_model_arrayfunction
Field2Dclass
Geometry3DLayerclass
Geometry3DLayersclass
GeometryLayerclass
GeometryLayersclass
Image2Dclass
ImageSequenceclass
LineSeriesclass
Panelsclass
PowerSpectrumclass
Profile1Dclass
ReferenceSlopeclass
Seriesclass
Spectrogramclass
SpectrogramTrackclass
STATUSESdata
Tableclass
TableCellclass
TableColumnclass
TextItemclass
TextPanelclass
TextSectionclass
TextSummaryclass
ViewModelclass
vaft.plot.navigation
ControlStateclass
SliceNavigatorclass
vaft.plot.nubeam
build_nubeam_deposition_poloidalfunction
build_nubeam_deposition_topviewfunction
build_nubeam_lost_fast_ionsfunction
build_nubeam_power_accountingfunction
build_nubeam_profilefunction
nubeam_deposition_poloidalfunction
nubeam_deposition_topviewfunction
nubeam_lost_fast_ionsfunction
nubeam_power_accountingfunction
nubeam_profilefunction
vaft.plot.operational_space
applicability_statusfunction
APPLICABILITY_STATUSESdata
li_qa_pairfunction
operational_space_populationfunction
population_overlayfunction
vaft.plot.ordering_space
ordering_margins_plotfunction
ordering_spacefunction
SPACE_STYLEdata
vaft.plot.parameter_history
plot_parameter_historyfunction
vaft.plot.plotly
PLOTLY_MODELSdata
PlotlyRendererclass
renderer_for_modelfunction
require_plotlyfunction
vaft.plot.plotly.fields
add_field_2dfunction
add_geometry_layerfunction
render_field_2dfunction
vaft.plot.plotly.geometry
add_geometry_3d_layersfunction
render_geometry_3d_layersfunction
vaft.plot.plotly.lines
add_line_seriesfunction
add_seriesfunction
render_line_seriesfunction
vaft.plot.plotly.panels
add_panelsfunction
render_panelsfunction
vaft.plot.plotly.profiles
add_profile_1dfunction
render_profile_1dfunction
vaft.plot.plotly.spectrograms
add_spectrogramfunction
render_spectrogramfunction
vaft.plot.plotly.text
add_text_panelfunction
render_text_panelfunction
vaft.plot.population
confinement_coverage_stripfunction
confinement_h_factor_distributionfunction
confinement_populationfunction
confinement_predicted_vs_measuredfunction
lh_threshold_populationfunction
machine_lcfs_comparisonfunction
transition_marginfunction
transition_predicted_vs_measuredfunction
vaft.plot.presentation
apply_axes_themefunction
DEFAULT_FORMATdata
EQUILIBRIUM_ROLEdata
FigureFormatclass
FontFallbackWarningclass
FORMATSdata
GEOMETRYdata
GeometryPolicyclass
LEGACY_FORMATdata
Presentationclass
presentedfunction
resolve_font_familyfunction
resolve_presentationfunction
rz_extentfunction
Themeclass
THEMESdata
vaft.plot.pyvista
read_vtk_blocksfunction
to_pyvistafunction
write_vtkfunction
vaft.plot.registry
available_plotsfunction
canonical_namesfunction
get_specfunction
NON_GRAPHICAL_VIEWSdata
PlotSpecclass
registerfunction
rendererfunction
specsfunction
VIEWSdata
vaft.plot.renderers.edge_q
summary_time_estimated_q95function
summary_time_normalized_currentfunction
summary_time_q_star_cylindricalfunction
summary_time_q_star_kinkfunction
vaft.plot.renderers.fields
electron_density_fieldfunction
electron_temperature_fieldfunction
equilibrium_field_2dfunction
equilibrium_field_psifunction
equilibrium_field_psi_vacuumfunction
field_line_topology_field_connection_lengthfunction
mhd_linear_field_spectrumfunction
passive_structure_field_wall_reductionfunction
render_field_2dfunction
vacuum_fieldfunction
vaft.plot.renderers.geometry
charge_exchange_geometry_poloidalfunction
coil_3d_geometry3dfunction
coil_3d_geometry_topviewfunction
draw_geometry_layerfunction
equilibrium_geometry_boundaryfunction
equilibrium_geometry_topviewfunction
finite_runsfunction
machine_geometry3dfunction
machine_geometry_poloidalfunction
machine_geometry_topviewfunction
magnetics_geometry_poloidalfunction
mhd_linear_geometry_islandfunction
passive_structure_geometry_poloidalfunction
passive_structure_geometry_wall_modefunction
pf_coil_geometry_poloidalfunction
pf_plasma_geometry_poloidalfunction
render_geometry_3d_layersfunction
render_geometry_layersfunction
soft_x_rays_geometry_lines_of_sightfunction
thomson_scattering_geometry_poloidalfunction
wall_geometry_poloidalfunction
vaft.plot.renderers.gyrokinetics
gyrokinetics_overviewfunction
gyrokinetics_profile_eigenfunctionfunction
gyrokinetics_spectrum_energy_fluxfunction
gyrokinetics_spectrum_frequencyfunction
gyrokinetics_spectrum_growth_ratefunction
gyrokinetics_spectrum_particle_fluxfunction
turbulent_transport_overviewfunction
turbulent_transport_profile_energy_fluxfunction
turbulent_transport_profile_particle_fluxfunction
vaft.plot.renderers.images
camera_visible_animation_framesfunction
camera_visible_imagefunction
camera_visible_image_efit_overlayfunction
camera_visible_image_field_linefunction
camera_visible_image_fluctuationfunction
camera_visible_image_framefunction
camera_visible_image_mhd_powerfunction
camera_visible_image_vacuum_field_linefunction
render_image_2dfunction
render_image_sequencefunction
vaft.plot.renderers.interactive
BACKENDSdata
Interactiveclass
render_controlsfunction
render_slice_navigationfunction
resolve_backendfunction
SliceAxesclass
vaft.plot.renderers.lines
b_field_probe_time_fieldfunction
barometry_time_pressurefunction
charge_exchange_time_ion_temperaturefunction
charge_exchange_time_velocity_torfunction
diamagnetic_flux_timefunction
ec_launchers_time_powerfunction
electron_density_timefunction
electron_temperature_timefunction
equilibrium_time_beta_nfunction
equilibrium_time_beta_pfunction
equilibrium_time_beta_tfunction
equilibrium_time_diamagnetic_fluxfunction
equilibrium_time_elongationfunction
equilibrium_time_lifunction
equilibrium_time_major_radiusfunction
equilibrium_time_minor_radiusfunction
equilibrium_time_plasma_currentfunction
equilibrium_time_q0function
equilibrium_time_q95function
equilibrium_time_qafunction
equilibrium_time_triangularityfunction
equilibrium_time_triangularity_lowerfunction
equilibrium_time_triangularity_upperfunction
equilibrium_time_w_magfunction
equilibrium_time_w_mhdfunction
equilibrium_time_w_totfunction
flux_loop_time_fluxfunction
flux_loop_time_voltagefunction
impa_time_fieldfunction
impa_time_voltagefunction
interferometer_time_n_e_linefunction
mhd_linear_time_energy_perturbedfunction
mirnov_time_voltagefunction
ntms_time_delta_primefunction
pf_coil_time_currentfunction
pf_coil_time_current_turnsfunction
plasma_current_timefunction
render_line_seriesfunction
rogowski_coil_time_currentfunction
soft_x_rays_time_powerfunction
spectrometer_uv_time_intensityfunction
tf_coil_time_b_tfunction
tf_coil_time_b_t_vacuum_rfunction
tf_coil_time_currentfunction
thomson_scattering_time_electron_densityfunction
thomson_scattering_time_electron_temperaturefunction
vacuum_field_midplanefunction
vaft.plot.renderers.panels
chease_overview_profile_validityfunction
chease_overview_refinement_summaryfunction
core_profiles_time_volume_averagedfunction
current_overviewfunction
current_overview_reconstructionfunction
diagnostics_overviewfunction
equilibrium_overviewfunction
equilibrium_overview_constraint_coveragefunction
equilibrium_overview_constraint_weightsfunction
equilibrium_overview_constraintsfunction
equilibrium_overview_convergencefunction
equilibrium_overview_fit_qualityfunction
equilibrium_overview_historiesfunction
equilibrium_overview_pressure_weight_scanfunction
equilibrium_overview_residualsfunction
equilibrium_overview_verificationfunction
equilibrium_time_betafunction
equilibrium_time_shapefunction
equilibrium_time_virialfunction
impa_overviewfunction
impurity_profile_charge_state_fractionfunction
impurity_profile_compositionfunction
interferometer_overviewfunction
kinetic_overview_profilesfunction
kinetic_overview_statefunction
limiter_current_timefunction
magnetics_overviewfunction
magnetics_overview_plasma_residualfunction
magnetics_overview_vacuumfunction
magnetics_overview_vacuum_benchmarkfunction
mhd_linear_overview_eigenfunctionfunction
passive_structure_overview_wall_reductionfunction
passive_structure_overview_wall_timefunction
render_panelsfunction
soft_x_rays_overviewfunction
spectrometer_uv_time_impurityfunction
startup_proxies_timefunction
summary_time_energyfunction
summary_time_power_balancefunction
summary_time_resistive_zefffunction
summary_time_romero_balancefunction
summary_time_voltage_consumptionfunction
vaft.plot.renderers.profiles
charge_exchange_profile_fitfunction
charge_exchange_profile_ion_temperaturefunction
charge_exchange_profile_velocity_torfunction
coil_3d_profile_currentfunction
coil_3d_spectrum_currentfunction
core_profiles_profile_zefffunction
electron_density_profilefunction
electron_density_profile_gradientfunction
electron_temperature_profilefunction
electron_temperature_profile_gradientfunction
equilibrium_profile_ffunction
equilibrium_profile_ffprimefunction
equilibrium_profile_j_torfunction
equilibrium_profile_pprimefunction
equilibrium_profile_pressurefunction
equilibrium_profile_qfunction
impa_profile_fieldfunction
ion_temperature_profilefunction
ion_temperature_profile_gradientfunction
mhd_linear_profile_b_field_perturbedfunction
mhd_linear_profile_chirikovfunction
mhd_linear_profile_displacementfunction
mhd_linear_spectrum_b_field_perturbedfunction
render_profile_1dfunction
thermal_pressure_profilefunction
thomson_scattering_profile_electron_densityfunction
thomson_scattering_profile_electron_temperaturefunction
thomson_scattering_profile_fitfunction
vaft.plot.renderers.spectra
diagnostics_spectrum_coherencefunction
interferometer_spectrumfunction
mirnov_spectrumfunction
render_power_spectrumfunction
soft_x_rays_spectrumfunction
vaft.plot.renderers.spectrograms
camera_visible_spectrogramfunction
interferometer_spectrogramfunction
mirnov_spectrogramfunction
render_spectrogramfunction
soft_x_rays_spectrogramfunction
vaft.plot.renderers.tables
equilibrium_table_fit_qualityfunction
equilibrium_table_summaryfunction
equilibrium_table_validationfunction
equilibrium_text_summaryfunction
format_quantityfunction
magnetics_table_vacuum_benchmarkfunction
magnetics_table_vacuum_benchmark_aggregatefunction
render_tablefunction
render_text_summaryfunction
RenderedTableclass
RenderedTextSummaryclass
TextViewclass
vaft.plot.request
DATA_KINDSdata
DataSourceclass
PlotRequestclass
vaft.plot.selection
ACTIVEdata
ALLdata
classify_regionsfunction
INBOARDdata
OUTBOARDdata
PRESETSdata
radial_dividerfunction
RadialSplitclass
REGION_PRESETSdata
REGIONSdata
representative_indexfunction
REPRESENTATIVE_PRESETSdata
SIGNAL_PRESETSdata
UNCLASSIFIEDdata
VALIDdata
vaft.plot.soft_x_rays
plot_soft_x_ray_losfunction
plot_soft_x_ray_overviewfunction
plot_soft_x_ray_patternfunction
plot_soft_x_ray_signalfunction
plot_soft_x_ray_spectrogramfunction
vaft.plot.stability_atlas
stability_atlas_populationfunction
vaft.plot.style
apply_legendfunction
axis_labelfunction
draw_seriesfunction
finalizefunction
resolve_axesfunction
save_figurefunction
trace_labelsfunction
UNCERTAINTY_MODESdata
VALIDITY_MODESdata
vaft.plot.taxonomy
CANONICAL_QUANTITIESdata
FAMILIESdata
QUANTITY_ALIASESdata
QuantityFamilyclass
resolve_familyfunction
resolve_quantityfunction
resolve_subjectfunction
Subjectclass
subject_namesfunction
SUBJECTSdata
vaft.plot.topview
ec_launchers_CX_topviewfunction
equilibrium_CX_topviewfunction
lh_antennas_CX_topviewfunction
pellets_trajectory_CX_topviewfunction
plot_topviewfunction
vaft.plot.transport_atlas
axis_labelfunction
LABELSdata
transport_atlas_mode_branchfunction
transport_atlas_scatterfunction
vaft.plot.utils
extract_labels_from_odcfunction
get_from_pathfunction

vaft.plot

Low-level plotting for VAFT.

b_field_probe_spatial_field — B-probe poloidal field against sensor position at one time (issue #486). Reference source

dd

function source
dd(name: str) -> tuple

The IMAS Data Dictionary paths canonical plot name reads, without any data.

documentation

function source
documentation(name: str) -> PlotDocumentation

The scientific documentation of canonical plot name, parsed from its renderer’s docstring.

equilibrium_overview_profiles — Pressure, current density and safety factor in one figure. Reference source

extract

function source
extract(name: str, source: Any, *, label: Any = 'shot', **options: Any) -> Any

The data behind canonical plot name for source, as its view model, undrawn.

flux_loop_spatial_flux — Flux-loop flux against sensor position at one time (issue #486). Reference source

mhd_linear_profile_island_width — Saturated island width per rational surface. Reference source

mhd_linear_profile_resonant_flux — Pitch-resonant flux per rational surface. Reference source

migration_table

function source
migration_table() -> str

Render the full migration table as Markdown.

mirnov_spatial_phase — Toroidal phase per fluctuation band at one time (issue #485). Reference source

nbi_profile_current_drive — Beam-driven parallel current density. Reference source

nbi_profile_electron_heating — Beam power density to electrons. Reference source

nbi_profile_ion_heating — Beam power density to ions. Reference source

neoclassical_profile_bootstrap_current — Bootstrap current density, one series per neoclassical model. Reference source

passive_structure_time_current — Eddy current in the passive structure. Reference source

PlotDocumentation

class source
PlotDocumentation(name: str, summary: str, description: str, sections: tuple[tuple[str, str], ...], parameters: tuple[ParamDoc, ...], returns: tuple[ReturnDoc, ...], raises: tuple[RaiseDoc, ...], references: tuple[Reference, ...], errors: tuple[str, ...]) -> None

One canonical plot’s docstring, parsed for documentation and GUI consumers.

9 fields · 9 members
  • name: str
  • summary: str
  • description: str
  • sections: tuple[tuple[str, str], ...]
  • parameters: tuple[ParamDoc, ...]
  • returns: tuple[ReturnDoc, ...]
  • raises: tuple[RaiseDoc, ...]
  • references: tuple[Reference, ...]
  • errors: tuple[str, ...]
  • section method — Text of the section called title, or None. source
  • interpretation property — What the plot shows and which questions it supports. source
  • options property — What the representation-changing options mean. source
  • convention property — Sign, unit or coordinate conventions needed to read a value. source
  • applicability property — The data, machine or regime the plot is meaningful for. source
  • limitations property — What must not be concluded from the plot alone. source
  • see_also property — Related plots to inspect next. source
  • conforming property — The docstring meets the plot contract. source
  • as_dict method — Plain data with Sphinx roles made literal, for the site snapshot and GUI panels. source

save_rendered

function source
save_rendered(result: Any, path: Any, *, figure_options: Any = None) -> Any

Write whatever a canonical plot rendered to path; returns the path written.

vaft.plot.analytic

Plots of analytic equilibrium objects, not of an ODS (issue #952).

miller_surfaces_model

function source
miller_surfaces_model(surfaces: Any, *, theta_points: int = 256, labels: Sequence[str] | None = None, title: str | None = None) -> GeometryLayers

Miller flux surfaces as closed outlines in the poloidal plane.

Also exported as vaft.plot.miller_surfaces_model.

plasma_state_projection_model

function source
plasma_state_projection_model(state: Any, equilibrium: Any, quantity: str = 'p_total', *, levels: int = 21, title: str | None = None) -> Field2D

One quantity of an analytic plasma state mapped onto an equilibrium’s (R, Z) grid.

Also exported as vaft.plot.plasma_state_projection_model.

plot_miller_surfaces — Draw Miller flux surfaces; returns (Figure, Axes). Reference source
Also exported as vaft.plot.plot_miller_surfaces.

plot_plasma_state_projection — Draw one plasma-state quantity on an equilibrium’s (R, Z) grid; returns (Figure, Axes). Reference source
Also exported as vaft.plot.plot_plasma_state_projection.

plot_solovev_equilibrium — Draw an analytic equilibrium’s flux surfaces with its X-points; returns (Figure, Axes). Reference source
Also exported as vaft.plot.plot_solovev_equilibrium.

solovev_equilibrium_model

function source
solovev_equilibrium_model(equilibrium: Any, *, x_points: bool = True, levels: Iterable[float] | None = None, title: str | None = None) -> Field2D

Normalized flux of an analytic (or any gridded) equilibrium, with its boundary features.

Also exported as vaft.plot.solovev_equilibrium_model.

vaft.plot.backend.access

Path access for the extraction layer, dispatched on the data object.

accessor_for

function source
accessor_for(obj: Any) -> PathAccessor

The accessor that reads obj (vaft.ods_access.accessor_for).

array

function source
array(obj: Any, path: str) -> np.ndarray | None

The value at path as a float array, or None when absent or empty.

count

function source
count(obj: Any, path: str) -> int

Length of the array of structures (or array) at path; 0 when absent.

get

function source
get(obj: Any, path: str, default: Any = None) -> Any

The value at path in obj, or default; never creates anything.

has

function source
has(obj: Any, path: str) -> bool

Whether path holds a value in obj.

vaft.plot.backend.dd

One canonical spelling for the IMAS Data Dictionary paths a plot reads.

dd_paths

function source
dd_paths(name: str) -> tuple[DDPath, ...]

The Data Dictionary paths canonical plot name reads, derived from its recipe.

DDInfo

class source
DDInfo(units: str, coordinates: tuple[str, ...], documentation: str, lifecycle_status: str, data_type: str, dd_version: str, source: str = 'omas') -> None

What the Data Dictionary says about one leaf, without any data loaded.

7 fields
  • units: str
  • coordinates: tuple[str, ...]
  • documentation: str
  • lifecycle_status: str
  • data_type: str
  • dd_version: str
  • source: str

DDPath

class source
DDPath(ids: str, canonical: str, template: str = '', role: str = 'data', coordinate: str = '', fallback_coordinate: tuple[str, ...] = (), units: str = '', attrs: Mapping[str, Any] = <factory>) -> None

One Data Dictionary path a plot declares, in the canonical spelling.

8 fields
  • ids: str
  • canonical: str
  • template: str
  • role: str
  • coordinate: str
  • fallback_coordinate: tuple[str, ...]
  • units: str
  • attrs: Mapping[str, Any]

DEFAULT_DD_VERSION

data
DEFAULT_DD_VERSION = '3.41.0'

from_template

function source
from_template(template: str, *, role: str = 'data', **fields: Any) -> DDPath

A DDPath from a recipe template (magnetics.ip.{i}.data).

normalise_units

function source
normalise_units(text: str) -> str

One spelling for a unit whichever way it was written.

parse

function source
parse(canonical: str, *, role: str = 'data', **fields: Any) -> DDPath

A DDPath from its canonical spelling (magnetics/ip(:)/data).

resolve

function source
resolve(path: DDPath | str, *, dd_version: str = '3.41.0', cross_check: bool | str = 'auto') -> DDInfo

What the Data Dictionary says about path, with no data loaded.

ROLES

data
ROLES = ('data', 'fallback', 'coordinate', 'abscissa', 'label', 'weight', 'divisor', 'container', 'geometry', 'boundary', 're...

to_imas

function source
to_imas(path: DDPath | str) -> str

The imas-python spelling relative to the IDS, no indices (ip/data).

to_info

function source
to_info(path: DDPath | str) -> str

The wildcard spelling omas.omas_info_node accepts (magnetics.ip.:.data).

to_omas

function source
to_omas(path: DDPath | str, index: int | Mapping[str, int] = 0) -> str

The OMAS dotted spelling with concrete indices (magnetics.ip.0.data).

to_omas_template

function source
to_omas_template(path: DDPath | str) -> str

The recipe spelling (magnetics.ip.{i}.data).

vaft.plot.backend.discovery

Instance-aware plot discovery, shared by every namespace (issue #262).

ANALYSIS_METHODS

data
ANALYSIS_METHODS = <builtins.dict>

describe_by_ids

function source
describe_by_ids(present: Sequence[str], source: str, *, query: str | None = None, detail: bool = False, available_only: bool | None = None, **filters: Any) -> PlotCatalog

The catalog judged at IDS level: which IDS a shot holds, nothing read.

describe_entries

function source
describe_entries(entries: Sequence[tuple[str, Any]] | None, shots: Sequence[str] = (), *, query: str | None = None, detail: bool = False, available_only: bool | None = None, **filters: Any) -> PlotCatalog

The catalog of plots, evaluated against entries when given.

INTERACTION

data
INTERACTION = <builtins.dict>

INTERACTION_ENTRY_POINTS

data
INTERACTION_ENTRY_POINTS = <builtins.dict>

OVERVIEW_CONTENTS

data
OVERVIEW_CONTENTS = <builtins.dict>

sequence_values

function source
sequence_values(name: str, entries: Sequence[tuple[str, Any]], option: str, **options: Any) -> tuple[str, str | None, np.ndarray]

(coordinate, unit, values): the physical value of every state of plot name’s slice control.

vaft.plot.backend.entries

Labelling of (key, object) entries, shared by every namespace.

label_entries

function source
label_entries(entries: Sequence[tuple[str, Any]], label: str | Sequence[str] = 'shot') -> tuple[tuple[str, Any], ...]

Return (label, object) pairs for keyed entries.

LABEL_OPTIONS

data
LABEL_OPTIONS = ('shot', 'pulse', 'run', 'key')

vaft.plot.backend.facade

The dd_<stem> and extract_<stem> twins of every plot_<stem> adapter.

install_facades

function source
install_facades(module_globals: dict[str, Any], *, normalize: Callable[..., Any], namespace: str, subject: str) -> tuple[str, ...]

Bind the three verbs of every canonical plot into a module.

refuse_render_options

function source
refuse_render_options(name: str, options: dict[str, Any]) -> None

Refuse a keyword extract_<name> cannot honour because it draws nothing.

RENDER_KEYWORDS

data
RENDER_KEYWORDS = frozenset({'animation', 'ax', 'backend', 'controls', 'format', 'interaction_backend', 'interactive', 'show', 'theme'})

vaft.plot.backend.options

The option vocabulary of build_model/render_entries (issue #480).

choices_for

function source
choices_for(spec: OptionSpec) -> tuple[Any, ...] | None

The vocabulary of a choice/multi option, resolved lazily.

EXTRACTION_OPTIONS

data
EXTRACTION_OPTIONS = frozenset({'M', 'adf11_cache_dir', 'adf11_tables', 'angle', 'axis_length', 'background_frames', 'basis', 'candidate_n...

OPTION_SCHEMA

data
OPTION_SCHEMA = <builtins.dict>

OptionSpec

class source
OptionSpec(name: str, kind: str = 'any', vocabulary: str | None = None, description: str = '') -> None

One extraction option: its kind and, for a vocabulary, where it lives.

4 fields
  • name: str
  • kind: str
  • vocabulary: str | None
  • description: str

split_options

function source
split_options(options: Mapping[str, Any]) -> tuple[dict[str, Any], dict[str, Any]]

(extraction, style): the two halves every adapter routes apart.

STYLE_OPTIONS

data
STYLE_OPTIONS = frozenset({'cmap', 'colorbar', 'colorbar_ax', 'figsize', 'figure_options', 'format', 'fps', 'grid', 'interval_ms', 'l...

validate_options

function source
validate_options(name: str, options: Mapping[str, Any]) -> None

Refuse an option no builder and no renderer would read.

vaft.plot.backend.recipes

Turn IMAS-DD path data into vaft.plot view models.

build_model

function source
build_model(name: str, entries: Sequence[tuple[str, Any]], **options: Any) -> Any

Build the view model for canonical plot name from entries.

CallableRecipe

class source
CallableRecipe(builder: Any, description: str = '', available: Any = None, reads: tuple[str, ...] = (), backend: str = 'omas', reason: str = '', multi_entry: bool = False, time_axis: str = '', windowed: bool = False, coordinates: 'ChoiceDeclaration | None' = None, choices: Mapping[str, 'ChoiceDeclaration'] = <factory>, sequence: 'SequenceDeclaration | None' = None) -> None

A plot whose extraction needs real computation, not just path reads.

12 fields
  • builder: Any
  • description: str
  • available: Any
  • reads: tuple[str, ...]
  • backend: str
  • reason: str
  • multi_entry: bool
  • time_axis: str
  • windowed: bool
  • coordinates: 'ChoiceDeclaration | None'
  • choices: Mapping[str, 'ChoiceDeclaration']
  • sequence: 'SequenceDeclaration | None'

ChoiceDeclaration

class source
ChoiceDeclaration(default: Any, options: tuple[Any, ...], applies_to: Mapping[str, tuple[Any, ...]] = <factory>) -> None

A choice option a computed view declares: its vocabulary and its default.

Also exported as vaft.plot.backend.recipes.CoordinateDeclaration.

3 fields
  • default: Any
  • options: tuple[Any, ...]
  • applies_to: Mapping[str, tuple[Any, ...]]

diagnoses_itself

function source
diagnoses_itself(name: str) -> bool

Whether plot name explains its own absent data.

entry_supports

function source
entry_supports(ods: Any, name: str) -> bool

Whether ods holds the data the plot name needs.

expand_template

function source
expand_template(obj: Any, template: str) -> list[str]

The concrete paths template names in obj, one per enumerated index.

FieldRecipe

class source
FieldRecipe(r_path: str, z_path: str, value_path: str, value_label: str = '', boundary_paths: tuple[str, str] = (), title: str = '', values_order: str = 'zr', fields: tuple[str, ...] = ()) -> None

How to read a Field2D from an ODS.

8 fields
  • r_path: str
  • z_path: str
  • value_path: str
  • value_label: str
  • boundary_paths: tuple[str, str]
  • title: str
  • values_order: str
  • fields: tuple[str, ...]

GeometryRecipe

class source
GeometryRecipe(layers: tuple[tuple[str, str, str, str, str, dict], ...], x_label: str = 'R [m]', y_label: str = 'Z [m]', title: str = '', annotate_indices: bool = False, role: str = '') -> None

How to read a GeometryLayers stack from an ODS.

6 fields
  • layers: tuple[tuple[str, str, str, str, str, dict], ...]
  • x_label: str
  • y_label: str
  • title: str
  • annotate_indices: bool
  • role: str

is_lazy_ods

function source
is_lazy_ods(obj: Any) -> bool

Whether obj is a lazy OMAS store (vaft.database.lazy_ods.HSDSODS).

LineRecipe

class source
LineRecipe(y_path: str, x_paths: tuple[str, ...] = (), index: str = 'none', y_label: str = '', y_unit: str = '', x_label: str = 'Time', x_unit: str = 's', scale: float = 1.0, label_path: str = '', weight_path: str = '', fallback_y_paths: tuple[str, ...] = (), divide_by_path: str = '', title: str = '', orientation: str = 'canonical', abscissae: tuple[Abscissa, ...] = ()) -> None

How to read a LineSeries from an ODS.

15 fields
  • y_path: str
  • x_paths: tuple[str, ...]
  • index: str
  • y_label: str
  • y_unit: str
  • x_label: str
  • x_unit: str
  • scale: float
  • label_path: str
  • weight_path: str
  • fallback_y_paths: tuple[str, ...]
  • divide_by_path: str
  • title: str
  • orientation: str
  • abscissae: tuple[Abscissa, ...]

materialise_reads

function source
materialise_reads(obj: Any, name: str) -> Any

A private ODS holding what OMAS-bound plot name declares in reads.

materialises_for_builder

function source
materialises_for_builder(obj: Any, name: str) -> bool

Whether plot name would read obj’s declared paths into a private ODS.

missing_required_path

function source
missing_required_path(ods: Any, name: str) -> str | None

The first required path of plot name that ods cannot supply.

PanelRecipe

class source
PanelRecipe(members: tuple[str, ...], ncols: int = 1, share_x: bool = True, suptitle: str = '', member_defaults: Mapping[str, Any] = <factory>) -> None

A composite built from other canonical plots, one per panel.

5 fields
  • members: tuple[str, ...]
  • ncols: int
  • share_x: bool
  • suptitle: str
  • member_defaults: Mapping[str, Any]

ProfileRecipe

class source
ProfileRecipe(y_path: str, coordinate_paths: dict[str, str] = <factory>, coordinate_forms: dict[str, str] = <factory>, default_coordinate: str = 'rho_tor_norm', slice_container: str = '', index: str = 'time_slice', y_label: str = '', y_unit: str = '', label_path: str = '', fallback_y_paths: tuple[str, ...] = (), orientation: str = 'canonical') -> None

How to read a Profile1D from an ODS.

11 fields
  • y_path: str
  • coordinate_paths: dict[str, str]
  • coordinate_forms: dict[str, str]
  • default_coordinate: str
  • slice_container: str
  • index: str
  • y_label: str
  • y_unit: str
  • label_path: str
  • fallback_y_paths: tuple[str, ...]
  • orientation: str

RECIPES

data
RECIPES = <builtins.dict>

required_ids

function source
required_ids(name: str) -> tuple[str, ...]

Top-level IDS names plot name reads, in declaration order.

SequenceDeclaration

class source
SequenceDeclaration(option: str, states: tuple[int, ...], labels: tuple[str, ...], label: str = '', default: int | None = None, coordinate: str = 'stage', refused_with: Mapping[str, tuple[Any, ...]] = <factory>) -> None

A categorical sequence a computed view declares: states that are not times (issue #1957).

7 fields
  • option: str
  • states: tuple[int, ...]
  • labels: tuple[str, ...]
  • label: str
  • default: int | None
  • coordinate: str
  • refused_with: Mapping[str, tuple[Any, ...]]

SpectrogramRecipe

class source
SpectrogramRecipe(signal_path: str, fallback_signal_paths: tuple[str, ...] = (), time_paths: tuple[str, ...] = (), container: str = '', label_path: str = '', value_label: str = 'Magnitude') -> None

How to read a Spectrogram from an ODS.

6 fields
  • signal_path: str
  • fallback_signal_paths: tuple[str, ...]
  • time_paths: tuple[str, ...]
  • container: str
  • label_path: str
  • value_label: str

vaft.plot.backend.render

The shared body of every plot_* adapter: entries in, a figure out.

frame_renderers

function source
frame_renderers(spec: Any, entries: Sequence[tuple[str, Any]], fixed: Mapping[str, Any], fixed_style: Mapping[str, Any], backend: str) -> tuple[Any, Any]

(build, draw) for one plot at a chosen state.

refuse_when_unsupported

function source
refuse_when_unsupported(name: str, entries: Sequence[tuple[str, Any]], *, namespace: str = 'vaft.omas', subject: str = 'ods') -> None

Raise rather than render a figure with nothing in it.

render_entries

function source
render_entries(name: str, entries: Sequence[tuple[str, Any]], *, ax: Any = None, show: bool = False, backend: str | None = None, namespace: str = 'vaft.omas', subject: str = 'ods', interactive: bool = False, animation: bool = False, controls: str | Sequence[str] = 'auto', interaction_backend: str = 'auto', **options: Any) -> Any

Build the view model for name from entries and render it.

render_text_view

function source
render_text_view(spec: Any, entries: Sequence[tuple[str, Any]], *, ax: Any = None, show: bool = False, backend: str | None = None, namespace: str = 'vaft.omas', subject: str = 'ods', interactive: bool = False, animation: bool = False, controls: str | Sequence[str] = 'auto', interaction_backend: str = 'auto', **options: Any) -> Any

A table or text view (issue #1180): the model, presented as text.

STATE_SELECTORS

data
STATE_SELECTORS = ('time', 'time_slice', 'time_index', 'frame_index')

vaft.plot.backend.tables

Builders of the non-graphical canonical views: tables and text summaries (issue #1180).

slice_boundary_cells

function source
slice_boundary_cells(ods: Any, index: int, derived: Any = None) -> list[tuple[str, TableCell]]

(label, TableCell) per stored boundary-shape quantity of one slice.

validation_verdicts

function source
validation_verdicts(ods: Any, index: int) -> dict[str, dict[str, Any]]

Every registered check’s result at one slice, keyed by its registry key.

vaft.plot.backends

Which library draws a view model: the rendering backends (issue #491).

RENDER_BACKENDS

data
RENDER_BACKENDS = ('matplotlib', 'plotly')

render_backends_for

function source
render_backends_for(spec: PlotSpec) -> tuple[str, ...]

The backends that can draw spec’s model kind, for discovery.

renderer_for

function source
renderer_for(spec: PlotSpec, model: Any, backend: str) -> Callable[..., Any]

The function that draws model for spec with backend.

resolve_render_backend

function source
resolve_render_backend(backend: str | None) -> str

The backend name to draw with; None is Matplotlib, the default.

supports_backend

function source
supports_backend(model_type: type, backend: str) -> bool

Whether backend can draw a view model of model_type.

vaft.plot.composition

Several canonical plots arranged into one figure (issue #1467).

as_composition

function source
as_composition(value: Any) -> FigureComposition

value as a FigureComposition: one already, or its dict form.

AxisLink

class source
AxisLink(axis: str, cells: tuple[str, ...]) -> None

Cells whose axis ("x" or "y") zooms and pans together.

Also exported as vaft.plot.AxisLink.

2 fields · 2 members
  • axis: str
  • cells: tuple[str, ...]
  • to_dict method source
  • from_dict classmethod source

build_composition

function source
build_composition(composition: FigureComposition | Mapping[str, Any], entries: Sequence[tuple[str, Any]], *, namespace: str = 'vaft.omas', subject: str = 'ods') -> Any

The vaft.plot.models.Panels model of composition over entries.

FigureCell

class source
FigureCell(plot: str, row: int = 0, col: int = 0, rowspan: int = 1, colspan: int = 1, options: Mapping[str, Any] = <factory>, name: str = '') -> None

One canonical plot in one region of a composed figure.

Also exported as vaft.plot.FigureCell.

7 fields · 4 members
  • plot: str
  • row: int
  • col: int
  • rowspan: int
  • colspan: int
  • options: Mapping[str, Any]
  • name: str
  • region property — (row, col, rowspan, colspan). source
  • covers method — Every grid cell this region occupies. source
  • to_dict method source
  • from_dict classmethod source

FigureComposition

class source
FigureComposition(shape: tuple[int, int], cells: tuple[FigureCell, ...], share_x: bool = False, share_y: bool = False, links: tuple[AxisLink, ...] = (), title: str | None = None, panel_labels: bool = False) -> None

A rows x cols grid of canonical plots, drawn as one figure.

Also exported as vaft.plot.FigureComposition.

7 fields · 6 members
  • shape: tuple[int, int]
  • cells: tuple[FigureCell, ...]
  • share_x: bool
  • share_y: bool
  • links: tuple[AxisLink, ...]
  • title: str | None
  • panel_labels: bool
  • stack classmethod — m x 1: the plots one above the other, sharing the x axis by default. source
  • side_by_side classmethod — 1 x n: the plots next to each other. source
  • grid classmethod — m x n filled row by row; None leaves a cell empty. source
  • resolved_links method — Every axis link as (axis, cell indices), groups that touch merged. source
  • to_dict method — A JSON-serialisable form; from_dict rebuilds an equal composition. source
  • from_dict classmethod source

render_composition

function source
render_composition(composition: FigureComposition | Mapping[str, Any], entries: Sequence[tuple[str, Any]], *, backend: str | None = None, show: bool = False, namespace: str = 'vaft.omas', subject: str = 'ods', **presentation: Any) -> Any

Draw composition over entries as one figure.

vaft.plot.controls

Discovery-driven controls: what a reader may change about one plot (issue #480).

CONTROL_GROUPS

data
CONTROL_GROUPS = ('slice', 'selection', 'layout', 'display', 'model', 'style', 'backend')

CONTROL_KINDS

data
CONTROL_KINDS = ('toggle', 'choice', 'multi', 'range', 'text')

controls_for

function source
controls_for(record: Any, *, include_style: bool = True, include_backend: bool = False) -> tuple[ControlSpec, ...]

The controls a plot’s capability record supports, in offer order.

ControlSpec

class source
ControlSpec(name: str, kind: str, label: str, default: Any = None, options: tuple[Any, ...] = (), labels: tuple[str, ...] = (), group: str = 'model', applies_to: Mapping[str, tuple[Any, ...]] = <factory>, absent: Any = None, keeps_none: bool = False) -> None

One thing a reader may change: the option it drives and its choices.

10 fields · 1 members
  • name: str
  • kind: str
  • label: str
  • default: Any
  • options: tuple[Any, ...]
  • labels: tuple[str, ...]
  • group: str
  • applies_to: Mapping[str, tuple[Any, ...]]
  • absent: Any
  • keeps_none: bool
  • validate method — value coerced to what the option takes, or ValueError. source

vaft.plot.dimensionless_space

Dimensionless-similarity population plots with literature reference points (#1624).

AXIS_LABELS

data
AXIS_LABELS = <builtins.dict>

AXIS_SCALES

data
AXIS_SCALES = <builtins.dict>

dimensionless_similarity

function source
dimensionless_similarity(table: pd.DataFrame, projection: Union[str, OperationalProjection] = 'rho_star_nu_star', *, group: Optional[str] = None, references: Union[str, bool, None] = 'default', reference_table: Optional[pd.DataFrame] = None, units: Optional[Mapping[str, str]] = None, scales: Optional[Tuple[str, str]] = None, x_range: Optional[Tuple[float, float]] = None, y_range: Optional[Tuple[float, float]] = None, boundaries: Union[str, bool, Sequence[str]] = 'default', title: Optional[str] = None, ax=None, show: bool = False, **population_kwargs)

Scatter a population on a global dimensionless-similarity projection.

SimilarityExclusions

class source
SimilarityExclusions(projection: str, total: int, assessed: int, unassessed: Mapping[str, int], reasons: Mapping[str, int]) -> None

The states that could not be placed on a projection, and why.

5 fields · 2 members
  • projection: str
  • total: int
  • assessed: int
  • unassessed: Mapping[str, int]
  • reasons: Mapping[str, int]
  • excluded property source
  • summary method source

vaft.plot.discovery

Semantic discovery of what can be plotted (issue #262).

catalog

function source
catalog(*, query: str | None = None, domain: str | None = None, subject: str | None = None, view: str | None = None, model: type | None = None, status: str | None = 'canonical', detail: bool = False) -> PlotCatalog

The registry-level catalog: what this build of VAFT can plot.

match_query

function source
match_query(term: str) -> QueryMatch

Resolve a query to canonical subjects, strictly.

normalise_query

function source
normalise_query(term: str) -> str

"Electron Density" -> "electron_density"; identity for canonical names.

PlotCapability

class source
PlotCapability(name: str, subject: str, view: str, quantity: str, aliases: tuple[str, ...], function: str, domain: str, ids: tuple[str, ...], required_paths: tuple[str, ...], optional_paths: tuple[str, ...], model: str, status: str, description: str, display: Mapping[str, Any] = <factory>, layouts: tuple[str, ...] = (), analysis_methods: tuple[str, ...] = (), overview_members: tuple[str, ...] = (), overlays: tuple[str, ...] = (), synthetic: Mapping[str, Any] = <factory>, available: bool | None = None, reason: str = '', entries: Mapping[str, bool] = <factory>, channels: Mapping[str, Any] = <factory>, uncertainty: Mapping[str, Any] = <factory>, validity: Mapping[str, Any] = <factory>, orientation: Mapping[str, Any] = <factory>, backends: tuple[str, ...] = ('matplotlib',), sources: Mapping[str, Any] = <factory>, interaction: tuple[str, ...] = (), interaction_entry_points: Mapping[str, str] = <factory>, projection: Mapping[str, Any] = <factory>, slices: Mapping[str, Any] = <factory>, fields: Mapping[str, Any] = <factory>, analysis: Mapping[str, Any] = <factory>, computation: Mapping[str, Any] = <factory>, abscissa: Mapping[str, Any] = <factory>, times: Mapping[str, Any] = <factory>, coordinates: Mapping[str, Any] = <factory>, choices: Mapping[str, Any] = <factory>, annotations: Mapping[str, Any] = <factory>, controls: tuple[str, ...] = (), members: Mapping[str, Any] = <factory>, categorical: Mapping[str, Any] = <factory>) -> None

One canonical plot and everything discovery knows about it.

Also exported as vaft.plot.PlotCapability.

43 fields · 7 members
  • name: str
  • subject: str
  • view: str
  • quantity: str
  • aliases: tuple[str, ...]
  • function: str
  • domain: str
  • ids: tuple[str, ...]
  • required_paths: tuple[str, ...]
  • optional_paths: tuple[str, ...]
  • model: str
  • status: str
  • description: str
  • display: Mapping[str, Any]
  • layouts: tuple[str, ...]
  • analysis_methods: tuple[str, ...]
  • overview_members: tuple[str, ...]
  • overlays: tuple[str, ...]
  • synthetic: Mapping[str, Any]
  • available: bool | None
  • reason: str
  • entries: Mapping[str, bool]
  • channels: Mapping[str, Any]
  • uncertainty: Mapping[str, Any]
  • validity: Mapping[str, Any]
  • orientation: Mapping[str, Any]
  • backends: tuple[str, ...]
  • sources: Mapping[str, Any]
  • interaction: tuple[str, ...]
  • interaction_entry_points: Mapping[str, str]
  • projection: Mapping[str, Any]
  • slices: Mapping[str, Any]
  • fields: Mapping[str, Any]
  • analysis: Mapping[str, Any]
  • computation: Mapping[str, Any]
  • abscissa: Mapping[str, Any]
  • times: Mapping[str, Any]
  • coordinates: Mapping[str, Any]
  • choices: Mapping[str, Any]
  • annotations: Mapping[str, Any]
  • controls: tuple[str, ...]
  • members: Mapping[str, Any]
  • categorical: Mapping[str, Any]
  • get method source
  • keys method source
  • as_dict method — Every field, as a plain dictionary. source
  • row method — The developer row in the shape the flat listing always had. source
  • sequence property — How a reader moves through this plot’s scientific states, or {} (issue #1380). source
  • identity property — subject / view or subject / view / quantity. source
  • heading property — The canonical subject with its strict aliases: plasma_current [ip, I_p]. source

PlotCatalog

class source
PlotCatalog(records: Sequence[PlotCapability], *, source: str = '', query: str | None = None, detail: bool = False, available_only: bool = False) -> None

A sequence of PlotCapability that prints as a semantic tree.

Also exported as vaft.plot.PlotCatalog.

5 members
  • rows method — The plain developer rows, exactly as the flat listing returned them. source
  • names method source
  • find method source
  • with_records method source
  • tree method — Render the catalog as a subject / view / quantity tree. source

QueryMatch

class source
QueryMatch(subjects: tuple[str, ...] = (), quantities: tuple[str, ...] = ()) -> None

What a query resolved to: subjects, and the quantities that narrow them.

2 fields · 1 members
  • subjects: tuple[str, ...]
  • quantities: tuple[str, ...]
  • accepts method source

vaft.plot.display

VAFT scientific display policy (issue #256).

channel_label

function source
channel_label(index: int, r: float | None = None, z: float | None = None) -> str

Canonical multi-index channel label: [3] (82.0 cm, 0.0 cm).

DisplaySpec

class source
DisplaySpec(quantity: str, unit: str, scale: float, notation: str = 'auto') -> None

The resolved display choice for one plotted quantity.

4 fields
  • quantity: str
  • unit: str
  • scale: float
  • notation: str

figure_title

function source
figure_title(heading: str, unit: str | None, *, shot: str | int | None = None, time_s: float | None = None, coordinates: bool = False) -> str

Canonical figure title: <Heading> [<unit>] #<shot> (issue #256).

gradient_label

function source
gradient_label(metadata: Mapping[str, Any]) -> tuple[str, str]

(label, unit) of a profile gradient, read from its resolved record (issue #551).

PSI_STYLES

data
PSI_STYLES = ('surfaces', 'normalized', 'filled')

Also exported as vaft.plot.PSI_STYLES.

QUANTITIES

data
QUANTITIES = <builtins.dict>

quantity_for_unit

function source
quantity_for_unit(canonical_unit: str) -> str | None

Map an IMAS canonical unit string to its display quantity, if any.

QuantityDisplay

class source
QuantityDisplay(name: str, canonical_unit: str, units: Mapping[str, float], default: str, notation: str = 'auto') -> None

Conversion capability for one physical quantity.

5 fields
  • name: str
  • canonical_unit: str
  • units: Mapping[str, float]
  • default: str
  • notation: str

RADIAL_COORDINATE_LABELS

data
RADIAL_COORDINATE_LABELS = <builtins.dict>

resolve_display

function source
resolve_display(canonical_unit: str, *, unit: str | None = None, subject: str | None = None, quantity: str | None = None, data: Any = None) -> DisplaySpec

Resolve the display unit/scale/notation for one plotted quantity.

subject_display_name

function source
subject_display_name(subject: str) -> str

Human-readable subject name for titles: b_field_probe -> B field probe.

SUBJECT_NOTATION_DEFAULTS

data
SUBJECT_NOTATION_DEFAULTS = <builtins.dict>

SUBJECT_UNIT_DEFAULTS

data
SUBJECT_UNIT_DEFAULTS = <builtins.dict>

unit_markup

function source
unit_markup(unit: str, *, flavor: str = 'mathtext') -> str

Render an ASCII unit for a renderer: 10^18 m^-3 -> 10$^{18}$ m$^{-3}$.

vaft.plot.docs_catalog

The plot registry as a deterministic snapshot for the documentation site.

documentation_snapshot

function source
documentation_snapshot(provenance: Mapping[str, str] | None = None) -> dict

Every registered plot, ordered subject (taxonomy order) -> view (VIEWS order).

entry_point_names

function source
entry_point_names() -> list[tuple[str, str]]

(name, status) of the plotting functions that are not registry renderers.

export_documentation_snapshot

function source
export_documentation_snapshot(output: str | Path, provenance: Mapping[str, str] | None = None) -> Path

Write the YAML snapshot and return its path.

main

function source
main(argv: list[str] | None = None) -> None

SCHEMA_VERSION

data
SCHEMA_VERSION = 1

THUMBNAILS

data
THUMBNAILS = <pathlib.PosixPath>

vaft.plot.docs_thumbnails

Render or check the committed plot thumbnails of the documentation site.

build

function source
build(out_dir: Path | None = None, *, force: bool = False, only: Iterable[str] | None = None) -> list[str]

Render stale, missing (or, with force, all) thumbnails; return what was written.

check

function source
check(out_dir: Path | None = None, *, full: bool = False) -> tuple[list[str], list[str]]

(problems, warnings): problems fail the check, warnings only report staleness.

default_output

function source
default_output() -> Path

docs/assets/plots of the source checkout this module runs from.

DPI

data
DPI = 80

FIGSIZE

data
FIGSIZE = (5.0, 3.5)

main

function source
main(argv: list[str] | None = None) -> int

MANIFEST

data
MANIFEST = 'manifest.json'

MODEL_HASH_DIGITS

data
MODEL_HASH_DIGITS = 6

model_sha256

function source
model_sha256(model: Any) -> str

A canonical hash of a view model: dataclasses, arrays, mappings and sequences.

PALETTE_COLORS

data
PALETTE_COLORS = 128

rehash

function source
rehash(out_dir: Path | None = None, *, only: Iterable[str] | None = None) -> list[str]

Recompute model_sha256 of the rendered entries from their recorded sample; render nothing.

render_one

function source
render_one(spec, shot: int, ods, out_dir: Path) -> dict

Draw one plot from ods into <name>.png and return its manifest entry.

renderer_sha256

function source
renderer_sha256(spec) -> str

The drawing code of spec: every renderer module and the shared ones.

sample_candidates

function source
sample_candidates(names: Iterable[str]) -> dict[str, list[tuple[int, Any]]]

name -> [(shot, ods), ...]: every packaged sample that offers each plot, in sample order.

sample_sources

function source
sample_sources(names: Iterable[str]) -> dict[str, tuple[int, Any]]

name -> (shot, ods): the first packaged sample that offers each plot.

stale_reason

function source
stale_reason(entry: Mapping[str, Any], spec) -> str

Why a rendered thumbnail may no longer show what the plot draws; "" when current.

vaft.plot.environment

Where a figure is being shown, and what interaction that allows.

close_figure

function source
close_figure(figure: object) -> None

Release a Matplotlib figure from pyplot’s registry.

close_new_figures_on_error

function source
close_new_figures_on_error() -> Iterator[None]

Close every pyplot figure opened inside the block when the block raises.

default_interaction_backend

function source
default_interaction_backend(environment: Environment | None = None) -> str

The navigation backend backend="auto" resolves to here.

detect_environment

function source
detect_environment() -> Environment

Read the execution environment of this process.

Environment

class source
Environment(kind: str, backend: str, live_figures: bool, widgets: bool) -> None

What the running process can show.

4 fields · 1 members
  • kind: str
  • backend: str
  • live_figures: bool
  • widgets: bool
  • in_kernel property source

ENVIRONMENT_KINDS

data
ENVIRONMENT_KINDS = ('terminal', 'ipython', 'jupyter', 'vscode')

use_non_interactive_backend

function source
use_non_interactive_backend() -> None

Draw to files only: no display, no writable $HOME needed.

vaft.plot.equilibrium_quality

Population renderers for the equilibrium-quality cohort tables (#1644).

COHORT_STYLE

data
COHORT_STYLE = <builtins.dict>

equilibrium_quality_diagnostic_grid

function source
equilibrium_quality_diagnostic_grid(points: pd.DataFrame, *, show: bool = False, figsize: tuple[float, float] = (9.8, 10.0))

A presentation-size 2×2 overview of the four diagnostic comparisons.

Also exported as vaft.plot.equilibrium_quality_diagnostic_grid.

equilibrium_quality_diagnostic_slides

function source
equilibrium_quality_diagnostic_slides(points: pd.DataFrame, *, show: bool = False, format: str = 'slide', theme: str | None = None)

Render one measured-versus-reconstructed slide per diagnostic family.

Also exported as vaft.plot.equilibrium_quality_diagnostic_slides.

equilibrium_quality_measured_vs_reconstructed

function source
equilibrium_quality_measured_vs_reconstructed(points: pd.DataFrame, *, family: str, by: str = 'quality_label', fitted_only: bool = True, ax=None, show: bool = False, figsize=None, format: str | None = None, theme: str | None = None)

Measured (x) against reconstructed (y) for one constraint family, by cohort, with y = x.

Also exported as vaft.plot.equilibrium_quality_measured_vs_reconstructed.

equilibrium_quality_reduced_chi2

function source
equilibrium_quality_reduced_chi2(table: pd.DataFrame, *, column: str = 'probe_reduced_chi2', by: str = 'quality_label', band=(0.5, 2.0), ax=None, show: bool = False, figsize=(5.2, 3.6))

Empirical CDF of a family’s reduced chi-square over slices, by cohort, with the study’s band shaded.

equilibrium_quality_residual_distribution

function source
equilibrium_quality_residual_distribution(points: pd.DataFrame, *, family: str, by: str = 'quality_label', ax=None, show: bool = False, figsize=(5.2, 3.6))

Empirical CDF of the normalised residual |z| of one family, by cohort.

equilibrium_quality_selection_funnel

function source
equilibrium_quality_selection_funnel(funnel: dict, *, ax=None, show: bool = False, figsize=(6.4, 4.2))

Per EFIT-quality cohort: confinement candidates, then what each downstream rule removes, then selected.

equilibrium_quality_validation_matrix

function source
equilibrium_quality_validation_matrix(census: dict, *, ax=None, show: bool = False, figsize=(6.8, 6.4))

The rule × cohort matrix: each cell’s fail fraction as colour, pass / fail / n as text.

vaft.plot.equilibrium_section

One same-shot equilibrium section in R-Z and calibrated camera pixels.

build_equilibrium_section

function source
build_equilibrium_section(data: Any, *, time: float | None = None, time_slice: int | None = None, section_phi: float = 3.141592653589793, flux_surface_levels: tuple[float, ...] = (0.25, 0.5, 0.75, 0.95), projection: Any = None) -> Section

Build the same source section for an R-Z view and an optional camera view.

DEFAULT_FLUX_LEVELS

data
DEFAULT_FLUX_LEVELS = (0.25, 0.5, 0.75, 0.95)

DEFAULT_SECTION_PHI

data
DEFAULT_SECTION_PHI = 3.141592653589793

Section

class source
Section(rz: GeometryLayers, camera_layers: tuple[GeometryLayer, ...], equilibrium_index: int, equilibrium_time: float, section_phi: float) -> None

Matched R-Z and camera layers plus the equilibrium time they depict.

5 fields
  • rz: GeometryLayers
  • camera_layers: tuple[GeometryLayer, ...]
  • equilibrium_index: int
  • equilibrium_time: float
  • section_phi: float

valid_equilibrium_indices

function source
valid_equilibrium_indices(data: Any, *, require_flux_surfaces: bool = True) -> tuple[int, ...]

Stored slices with every input the requested section needs.

vaft.plot.figure_options

Reproducible figure-level overrides on top of a format and a theme (issue #1421).

as_figure_options

function source
as_figure_options(value: Any) -> FigureOptions

value as FigureOptions: one already, its dict form, or None (nothing set).

AXIS_SCALES

data
AXIS_SCALES = ('linear', 'log', 'symlog')

COLOR_NORMS

data
COLOR_NORMS = ('linear', 'log', 'symlog', 'centered')

figure_options_scope

function source
figure_options_scope(options: FigureOptions) -> Iterator[None]

Make options the ones vaft.plot.presentation.presented layers over the format and theme of every renderer called inside the block.

FigureOptions

class source
FigureOptions(title: str | None = None, xlabel: str | None = None, ylabel: str | None = None, xlim: tuple[float | None, float | None] | None = None, ylim: tuple[float | None, float | None] | None = None, xscale: str | None = None, yscale: str | None = None, legend: bool | None = None, legend_loc: str | None = None, legend_ncols: int | None = None, legend_frame: bool | None = None, grid: bool | None = None, minor_ticks: bool | None = None, tick_direction: str | None = None, font_size: float | None = None, label_size: float | None = None, tick_size: float | None = None, title_size: float | None = None, legend_size: float | None = None, font_family: tuple[str, ...] | None = None, math_fontset: str | None = None, line_scale: float | None = None, marker_scale: float | None = None, cmap: str | None = None, clim: tuple[float | None, float | None] | None = None, colorbar_label: str | None = None, norm: str | None = None, panel_labels: bool | None = None, dpi: float | None = None, transparent: bool | None = None) -> None

Explicit figure-level overrides; every None inherits.

Also exported as vaft.plot.FigureOptions.

30 fields · 6 members
  • title: str | None
  • xlabel: str | None
  • ylabel: str | None
  • xlim: tuple[float | None, float | None] | None
  • ylim: tuple[float | None, float | None] | None
  • xscale: str | None
  • yscale: str | None
  • legend: bool | None
  • legend_loc: str | None
  • legend_ncols: int | None
  • legend_frame: bool | None
  • grid: bool | None
  • minor_ticks: bool | None
  • tick_direction: str | None
  • font_size: float | None
  • label_size: float | None
  • tick_size: float | None
  • title_size: float | None
  • legend_size: float | None
  • font_family: tuple[str, ...] | None
  • math_fontset: str | None
  • line_scale: float | None
  • marker_scale: float | None
  • cmap: str | None
  • clim: tuple[float | None, float | None] | None
  • colorbar_label: str | None
  • norm: str | None
  • panel_labels: bool | None
  • dpi: float | None
  • transparent: bool | None
  • to_dict method — The options that were set, as plain JSON data; inherited ones are left out. source
  • from_dict classmethod source
  • rc method — The rcParams these options set, over base (the rcParams in force). source
  • context method — These options’ rcParams in force for the block (nothing global changes). source
  • apply method — Edit a finished Matplotlib figure in place; returns it. source
  • apply_plotly method — Edit a finished Plotly figure in place; returns it. source

LEGEND_LOCATIONS

data
LEGEND_LOCATIONS = ('best', 'upper right', 'upper left', 'lower left', 'lower right', 'right', 'center left', 'center right', 'lower cen...

vaft.plot.fluctuation

Plots of fluctuation-analysis results that are not a single IDS read (issue #1005).

COVERAGE_CAPTION

data
COVERAGE_CAPTION = 'Phenomenon bands: typical order of magnitude, not an identification rule. Diagnostic bars end at the Nyquist frequen...

cross_spectrum_model

function source
cross_spectrum_model(result: Any, *, x_label: str = 'x', y_label: str = 'y', title: str | None = None, max_frequency: float | None = None) -> Panels

Coherence (with the 95 % line) above phase, both against frequency.

Also exported as vaft.plot.cross_spectrum_model.

plot_cross_diagnostic_coherence_spectrogram — Time-resolved magnitude-squared coherence of two selected signals. Reference source
Also exported as vaft.plot.plot_cross_diagnostic_coherence_spectrogram.

plot_cross_spectrum — Draw a vaft.process.fluctuation.CrossSpectrum; returns (Figure, axes). Reference source
Also exported as vaft.plot.plot_cross_spectrum.

plot_fluctuation_frequency_coverage — Diagnostics’ Nyquist frequencies against typical phenomenon bands, on log frequency. Reference source
Also exported as vaft.plot.plot_fluctuation_frequency_coverage.

plot_multi_diagnostic_coherent_fraction — Leading fraction; finite-sample bias means it is not a mode test. Reference source
Also exported as vaft.plot.plot_multi_diagnostic_coherent_fraction.

plot_multi_diagnostic_coherent_spectrogram — Leading PSD-normalized spectral eigenvalue, not a physical mode power. Reference source
Also exported as vaft.plot.plot_multi_diagnostic_coherent_spectrogram.

plot_multi_diagnostic_participation — Selected diagnostic’s squared dominant-eigenvector loading, not amplitude. Reference source
Also exported as vaft.plot.plot_multi_diagnostic_participation.

plot_multi_diagnostic_phase — Selected diagnostic’s phase relative to the explicit reference, in degrees. Reference source
Also exported as vaft.plot.plot_multi_diagnostic_phase.

TYPICAL_PHENOMENON_BANDS

data
TYPICAL_PHENOMENON_BANDS = <builtins.dict>

vaft.plot.gyrokinetics

Native gyrokinetic figures: TGLF/CGYRO validation in the solvers’ own units.

cgyro_linear_spectrum

function source
cgyro_linear_spectrum(runs: Sequence[Any]) -> dict[str, np.ndarray]

Collect single-mode linear CGYRO runs into one spectrum, sorted by ky.

plot_convergence

function source
plot_convergence(scans: Mapping[str, Mapping[str, Any]], *, baseline: Mapping[str, float], tolerance: float = 0.05, ax: Any = None, show: bool = False, figsize: Optional[tuple[float, float]] = None, title: Optional[str] = None) -> tuple[Any, Any]

Relative change of gamma and omega against each resolution parameter.

plot_eigenfunction

function source
plot_eigenfunction(theta: Any, fields: Mapping[str, Any], *, ax: Any = None, show: bool = False, figsize: Optional[tuple[float, float]] = None, title: Optional[str] = None, normalise_to: Optional[str] = 'phi') -> tuple[Any, Any]

Ballooning-space eigenfunctions, one panel per field: Re, Im and |.|.

plot_fluctuation_spectra

function source
plot_fluctuation_spectra(ky: Any, amplitudes: Mapping[str, Any], *, cross_phase: Optional[Any] = None, ax: Any = None, show: bool = False, figsize: Optional[tuple[float, float]] = None, title: Optional[str] = None) -> tuple[Any, Any]

Fluctuation amplitude spectra and, optionally, the n_e-T_e cross phase.

plot_flux_contributors

function source
plot_flux_contributors(contributors: Mapping[str, Any], *, ax: Any = None, show: bool = False, figsize: Optional[tuple[float, float]] = None, title: Optional[str] = None, log_ky: bool = True) -> tuple[Any, Any]

Saturated flux per ky bin split by field, one panel per species group.

plot_flux_ky_spectrum

function source
plot_flux_ky_spectrum(ky: Any, spectra: Mapping[str, Any], *, ax: Any = None, show: bool = False, figsize: Optional[tuple[float, float]] = None, ylabel: str = '$Q/Q_{GB}$ per mode', title: Optional[str] = None) -> tuple[Any, Any]

Time-averaged flux per toroidal mode against k_y rho_s.

plot_flux_trace

function source
plot_flux_trace(time: Any, traces: Mapping[str, Any], *, time_unit: str = 'native', time_normalization: Any = None, window: Optional[tuple[float, float]] = None, references: Optional[Mapping[str, float]] = None, ax: Any = None, show: bool = False, figsize: Optional[tuple[float, float]] = None, ylabel: str = '$Q/Q_{GB}$', title: Optional[str] = None) -> tuple[Any, Any]

Nonlinear flux against time, with the averaging window and reference levels.

plot_gyrokinetics_field_potential

function source
plot_gyrokinetics_field_potential(history, *, component='total', time_unit='native', time_normalization=None, theta_index=0, frame_index=0, animation=False, diagnostics=None, fps=10.0, dpi=100, show=False)

Draw a native saved-theta potential plane or canonical Animation.

plot_linear_spectrum

function source
plot_linear_spectrum(cgyro: Mapping[str, Any], *, references: Optional[Mapping[str, Mapping[str, Any]]] = None, ax: Any = None, show: bool = False, figsize: Optional[tuple[float, float]] = None, title: Optional[str] = None, log_ky: bool = True) -> tuple[Any, Any]

Growth rate and frequency against k_y rho_s: CGYRO with reference overlays.

plot_local_state

function source
plot_local_state(state: Mapping[str, Any], *, ax: Any = None, show: bool = False, figsize: Optional[tuple[float, float]] = None, title: Optional[str] = None) -> tuple[Any, Any]

The local input a solver was given: gradients per species and geometry scalars.

plot_mixing_length_proxy

function source
plot_mixing_length_proxy(spectrum: Mapping[str, Any], *, definition: str = 'gamma_over_ky2', ax: Any = None, show: bool = False, figsize: Optional[tuple[float, float]] = None, title: Optional[str] = None) -> tuple[Any, Any]

A reduced mixing-length diagnostic from a linear spectrum, with its definition.

plot_model_details

function source
plot_model_details(ky: Any, details: Mapping[str, Any], *, ax: Any = None, show: bool = False, figsize: Optional[tuple[float, float]] = None, title: Optional[str] = None) -> tuple[Any, Any]

TGLF model internals vs ky: Gaussian width, spectral shift, SAT0 normalisation.

plot_predator_prey_lag

function source
plot_predator_prey_lag(lags: Any, cross_correlation: Any, *, peak_lag: Optional[float] = None, model_lag: Optional[float] = None, correlation_lag: Optional[float] = None, ax: Any = None, show: bool = False, figsize: Optional[tuple[float, float]] = None, time_label: Optional[str] = None, time_unit: str = 'native', time_normalization: Any = None, title: Optional[str] = None) -> tuple[Any, Any]

Cross-correlation of N and E against lag, with the lag estimates marked.

plot_predator_prey_phase_space

function source
plot_predator_prey_phase_space(turbulence: Any, zonal: Any, *, time: Optional[Any] = None, time_unit: str = 'native', time_normalization: Any = None, fit: Optional[Any] = None, arrows: int = 8, vector_field: bool = True, log: bool = True, ax: Any = None, show: bool = False, figsize: Optional[tuple[float, float]] = None, title: Optional[str] = None) -> tuple[Any, Any]

The measured N-E trajectory, with the fitted model’s structure when given.

plot_predator_prey_trace

function source
plot_predator_prey_trace(time: Any, turbulence: Any, zonal: Any, *, transport: Optional[Any] = None, fit: Optional[Any] = None, metrics: Optional[Any] = None, log: bool = True, ax: Any = None, show: bool = False, figsize: Optional[tuple[float, float]] = None, time_label: Optional[str] = None, time_unit: str = 'native', time_normalization: Any = None, transport_label: str = '$Q/Q_{GB}$', title: Optional[str] = None) -> tuple[Any, Any]

Turbulence and zonal-flow intensity against time, with optional transport and fit.

plot_saturation_parameters

function source
plot_saturation_parameters(parameters: Mapping[str, Any], *, ax: Any = None, show: bool = False, figsize: Optional[tuple[float, float]] = None, title: str = 'TGLF saturation parameters') -> tuple[Any, Any]

The scalar saturation parameters of a TGLF run as a text panel.

tglf_flux_contributors

function source
tglf_flux_contributors(outputs: Any, *, quantity: str = 'energy', species: Sequence[str] = ('e', 'i')) -> dict[str, Any]

Field-resolved saturated flux spectra from sum_flux_spectrum.

tglf_linear_spectrum

function source
tglf_linear_spectrum(outputs: Any) -> dict[str, Any]

{"ky", "gamma", "omega", "preset"} from one TGLF run, (ky, mode) arrays.

tglf_local_state

function source
tglf_local_state(local: Any) -> dict[str, Any]

The local input TGLF was given, with each value’s provenance kind.

vaft.plot.intent

Colour intent tokens: what a recipe means by a colour, resolved when drawn (issue #709).

active_theme

function source
active_theme() -> Any

The theme in force for the render under way, or None.

DEFAULT_COLOURS

data
DEFAULT_COLOURS = <builtins.dict>

DEFAULT_PALETTE

data
DEFAULT_PALETTE = ('#377eb8', '#ff7f00', '#984ea3', '#4daf4a', '#a65628', '#f781bf', '#999999', '#e6ab02', '#e41a1c', '#66a61e')

is_colour_token

function source
is_colour_token(value: Any) -> bool

Whether value is a <namespace>:<key> token this module resolves.

palette

function source
palette(n: int) -> str

The token for the n-th distinguishing colour.

resolve_color

function source
resolve_color(value: Any, theme: Any = 'active') -> Any

value as a colour: a token looked up, anything else unchanged.

Also exported as vaft.plot.presentation.resolve_color.

resolve_style

function source
resolve_style(style: Mapping[str, Any], theme: Any = 'active') -> dict[str, Any]

A copy of style with its colour tokens resolved.

Also exported as vaft.plot.presentation.resolve_style.

themed

function source
themed(theme: Any) -> Iterator[None]

Make theme the one colours resolve against until the block ends.

TOKEN_NAMESPACES

data
TOKEN_NAMESPACES = ('palette', 'role', 'feature', 'state', 'emphasis')

vaft.plot.k3d

K3D rendering of 3-D scenes and the coil-phasing explorer (issue #1087).

coil_phase_explorer

function source
coil_phase_explorer(source: Any, *, coil_set: str | None = None, n: int = 1, phase_deg: int = 0, amplitude_a: float = 1000.0, probe_r: float | None = None, probe_z: float = 0.0, probes: int = 90, show: bool = True) -> Any

Explore the phasing of one non-axisymmetric coil set in K3D.

to_k3d

function source
to_k3d(model: Any, plot: Any = None, *, point_size: float = 0.02, width: float = 0.004) -> Any

A 3-D scene as a K3D plot, one named object per layer; needs vaft[jupyter3d].

vaft.plot.kinetic_state

Plots of matched Thomson and EFIT kinetic-state Atlas tables.

kinetic_state_pressure_comparison

function source
kinetic_state_pressure_comparison(points: pd.DataFrame, *, ax=None, show: bool = False, figsize: tuple[float, float] | None = None, format: str | None = None, theme: str | None = None)

Compare EFIT pressure with twice Thomson electron pressure at matched channels.

Also exported as vaft.plot.kinetic_state_pressure_comparison.

kinetic_state_virial_li_comparison

function source
kinetic_state_virial_li_comparison(states: pd.DataFrame, *, ax=None, show: bool = False, figsize: tuple[float, float] | None = None, format: str | None = None, theme: str | None = None)

Compare volume-integral and pair-13 virial internal inductance.

Also exported as vaft.plot.kinetic_state_virial_li_comparison.

kinetic_state_virial_pair13_comparison

function source
kinetic_state_virial_pair13_comparison(states: pd.DataFrame, *, ax=None, show: bool = False, figsize: tuple[float, float] | None = None, format: str | None = None, theme: str | None = None)

Compare volume-integral and pair-13 virial estimates of poloidal beta.

Also exported as vaft.plot.kinetic_state_virial_pair13_comparison.

vaft.plot.local_mhd_criteria

Local MHD stability criteria of one equilibrium, drawn (#1902).

local_mhd_criteria_field_curvature

function source
local_mhd_criteria_field_curvature(maps: Mapping[str, np.ndarray], *, quantity: str = 'all', boundary: tuple[np.ndarray, np.ndarray] | None = None, ax=None, clip_percentile: float = 98.0, show: bool = False, figsize=None)

Normal and geodesic curvature and local shear over the poloidal cross-section.

local_mhd_criteria_profile_interchange

function source
local_mhd_criteria_profile_interchange(profile, *, comparison: Mapping[str, Any] | None = None, rational_surfaces: Sequence[tuple[float, str]] = (), ax=None, show: bool = False, figsize=(5.6, 3.6))

Mercier D_I and GGJ D_R against normalized flux.

local_mhd_criteria_s_alpha

function source
local_mhd_criteria_s_alpha(profile, *, ax=None, show: bool = False, figsize=(4.6, 3.8))

Each surface on the s-alpha plane, with the circular model’s first-stability boundary.

vaft.plot.machine_geometry

Source geometry shared by machine views (metres, IMAS phi in radians).

CROSS_SHOT_NOTICE

data
CROSS_SHOT_NOTICE = 'Cross-shot composite — not a physical VEST discharge'

cross_shot_notice

function source
cross_shot_notice(reference: Any) -> str

Two-line notice every view of the cross-shot fixture carries in its title.

MACHINE_GEOMETRY_FAMILIES

data
MACHINE_GEOMETRY_FAMILIES = ('thomson_scattering', 'charge_exchange', 'langmuir_probes', 'interferometer', 'soft_x_rays', 'coils_non_axisymmetric...

machine_geometry_registry

function source
machine_geometry_registry(data: Any, *, families: tuple[str, ...] | None = None, manifest: Mapping[str, Any] | None = None) -> tuple[MachineGeometry, ...]

Extract stored geometry without importing a renderer or mutating data.

machine_geometry_view

function source
machine_geometry_view(data: Any, view: str, *, families: tuple[str, ...] | None = None, manifest: Mapping[str, Any] | None = None, projection: Any = None, axis_length: float = 0.25, samples_per_segment: int = 32) -> GeometryLayers | Geometry3DLayers

One family-selected view over the same immutable machine-space records.

MachineGeometry

class source
MachineGeometry(family: str, semantic: str, r: np.ndarray, z: np.ndarray, phi: np.ndarray | None = None, label: str = '', source_path: str = '', provenance_json: str = '{}', direction_xyz: np.ndarray | None = None) -> None

One source point, trajectory, LOS, coil path, directed launch axis or toroidal ring.

9 fields · 2 members
  • family: str
  • semantic: str
  • r: np.ndarray
  • z: np.ndarray
  • phi: np.ndarray | None
  • label: str
  • source_path: str
  • provenance_json: str
  • direction_xyz: np.ndarray | None
  • xyz property — Cartesian source vertices, or None when toroidal location is unknown. source
  • ring_xyz method — The full loop of a toroidal ring in machine Cartesian space, closed. source

project_machine_geometry

function source
project_machine_geometry(record: MachineGeometry, view: str, *, projection: Any = None, axis_length: float = 1.0, samples_per_segment: int = 32) -> GeometryLayer | Geometry3DLayer | None

Adapt source geometry to existing view models.

vaft.plot.ml

ML experiment adapters to immutable canonical plot view models.

group_metrics

function source
group_metrics(evaluation, metric)

Independent-group metrics, using group labels as trace identities.

learning_curves

function source
learning_curves(history, *, title='Training history', keys=None)

Adapt loss components or learning rates; units follow the recorded loss.

resource_comparison

function source
resource_comparison(records, metric='fit_seconds')

Compare explicitly recorded compute metrics across local experiment runs.

vaft.plot.models

Typed, NumPy-backed view models consumed by the canonical renderers.

as_model_array

function source
as_model_array(value: Any, *, where: str, dtype: Any = <class 'float'>) -> np.ndarray

Return value as a read-only ndarray, rejecting data objects.

Field2D

class source
Field2D(r: np.ndarray, z: np.ndarray, values: np.ndarray, value_label: str = '', x_label: str = 'R [m]', y_label: str = 'Z [m]', title: str = '', contour_levels: int | Sequence[float] | None = None, filled: bool = True, aspect_equal: bool = True, overlays: tuple['GeometryLayer', ...] = (), secondary_levels: Sequence[float] | None = None, colorbar: bool = True, display: 'DisplaySpec | None' = None, value_scale: str = 'linear', extend: str = 'neither', region: np.ndarray | None = None, metadata: Mapping[str, Any] = <factory>) -> None

A scalar field sampled on an (r, z) grid, e.g. a poloidal flux map.

Also exported as vaft.plot.Field2D.

18 fields · 1 members
  • r: np.ndarray
  • z: np.ndarray
  • values: np.ndarray
  • value_label: str
  • x_label: str
  • y_label: str
  • title: str
  • contour_levels: int | Sequence[float] | None
  • filled: bool
  • aspect_equal: bool
  • overlays: tuple['GeometryLayer', ...]
  • secondary_levels: Sequence[float] | None
  • colorbar: bool
  • display: 'DisplaySpec | None'
  • value_scale: str
  • extend: str
  • region: np.ndarray | None
  • metadata: Mapping[str, Any]
  • to_xarray method — values(z, r) with the grid as coordinates and the overlays padded on (overlay_layer, overlay_point); see vaft.plot._xarray. source

Geometry3DLayer

class source
Geometry3DLayer(x: np.ndarray, y: np.ndarray, z: np.ndarray, kind: str = 'polyline', label: str = '', style: Mapping[str, Any] = <factory>, group: str = '') -> None

One polyline or point cloud drawn in machine Cartesian coordinates.

Also exported as vaft.plot.Geometry3DLayer.

7 fields · 1 members
  • x: np.ndarray
  • y: np.ndarray
  • z: np.ndarray
  • kind: str
  • label: str
  • style: Mapping[str, Any]
  • group: str
  • to_xarray method — This layer as a one-layer xarray.Dataset; see vaft.plot._xarray. source

Geometry3DLayers

class source
Geometry3DLayers(layers: tuple[Geometry3DLayer, ...], x_label: str = 'x [m]', y_label: str = 'y [m]', z_label: str = 'z [m]', title: str = '') -> None

A stack of 3D geometry layers drawn into one machine-coordinate view.

Also exported as vaft.plot.Geometry3DLayers.

5 fields · 1 members
  • layers: tuple[Geometry3DLayer, ...]
  • x_label: str
  • y_label: str
  • z_label: str
  • title: str
  • to_xarray method — x/y/z padded on (layer, point); see vaft.plot._xarray. source

GeometryLayer

class source
GeometryLayer(r: np.ndarray, z: np.ndarray, kind: str = 'polyline', label: str = '', style: Mapping[str, Any] = <factory>, entry: str = '', role: str = '') -> None

One geometric element drawn in a machine view.

Also exported as vaft.plot.GeometryLayer.

7 fields · 1 members
  • r: np.ndarray
  • z: np.ndarray
  • kind: str
  • label: str
  • style: Mapping[str, Any]
  • entry: str
  • role: str
  • to_xarray method — This layer as a one-layer xarray.Dataset; see vaft.plot._xarray. source

GeometryLayers

class source
GeometryLayers(layers: tuple[GeometryLayer, ...], x_label: str = 'R [m]', y_label: str = 'Z [m]', title: str = '', aspect_equal: bool = True, legend: bool = True) -> None

A stack of geometry layers drawn into one equal-aspect view.

Also exported as vaft.plot.GeometryLayers.

6 fields · 1 members
  • layers: tuple[GeometryLayer, ...]
  • x_label: str
  • y_label: str
  • title: str
  • aspect_equal: bool
  • legend: bool
  • to_xarray method — r/z padded on (layer, point) with the layers’ kind, label and length as coordinates; see vaft.plot._xarray. source

Image2D

class source
Image2D(values: np.ndarray, value_label: str = '', x_label: str = 'Column', y_label: str = 'Row', title: str = '', cmap: str = 'gray', vmin: float | None = None, vmax: float | None = None, origin: str = 'upper', aspect_equal: bool = True, overlays: tuple[GeometryLayer, ...] = ()) -> None

A raster image in pixel space, e.g. one camera frame, with optional overlays.

Also exported as vaft.plot.Image2D.

11 fields · 1 members
  • values: np.ndarray
  • value_label: str
  • x_label: str
  • y_label: str
  • title: str
  • cmap: str
  • vmin: float | None
  • vmax: float | None
  • origin: str
  • aspect_equal: bool
  • overlays: tuple[GeometryLayer, ...]
  • to_xarray method — values(row, column) with the overlays padded on (overlay_layer, overlay_point); see vaft.plot._xarray. source

ImageSequence

class source
ImageSequence(frames: tuple[np.ndarray, ...], time: np.ndarray, value_label: str = '', x_label: str = 'Column', y_label: str = 'Row', title: str = '', cmap: str = 'gray', vmin: float | None = None, vmax: float | None = None, origin: str = 'upper', aspect_equal: bool = True) -> None

A sequence of raster frames sharing one color scale, e.g. an animation.

Also exported as vaft.plot.ImageSequence.

11 fields · 1 members
  • frames: tuple[np.ndarray, ...]
  • time: np.ndarray
  • value_label: str
  • x_label: str
  • y_label: str
  • title: str
  • cmap: str
  • vmin: float | None
  • vmax: float | None
  • origin: str
  • aspect_equal: bool
  • to_xarray method — frames(time, row, column); see vaft.plot._xarray. source

LineSeries

class source
LineSeries(series: tuple[Series, ...], x_label: str = '', y_label: str = '', x_unit: str = '', y_unit: str = '', title: str = '', x_limits: tuple[float, float] | None = None, y_limits: tuple[float, float] | None = None, log_y: bool = False, display: 'DisplaySpec | None' = None, secondary_y_label: str = '', secondary_y_unit: str = '') -> None

A set of traces sharing one pair of axes: time histories and generic x-y.

Also exported as vaft.plot.LineSeries.

12 fields · 1 members
  • series: tuple[Series, ...]
  • x_label: str
  • y_label: str
  • x_unit: str
  • y_unit: str
  • title: str
  • x_limits: tuple[float, float] | None
  • y_limits: tuple[float, float] | None
  • log_y: bool
  • display: 'DisplaySpec | None'
  • secondary_y_label: str
  • secondary_y_unit: str
  • to_xarray method — The traces as an xarray.Dataset on (series, sample), NaN-padded with a length coordinate; see vaft.plot._xarray. source

Panels

class source
Panels(models: tuple[ViewModel, ...], nrows: int | None = None, ncols: int = 1, share_x: bool = True, share_y: bool = False, suptitle: str = '', squeeze: bool = False, member_styles: tuple[Mapping[str, Any], ...] | None = None, spans: tuple[tuple[int, int, int, int], ...] | None = None, share_legend: bool = False, links: tuple[tuple[str, tuple[int, ...]], ...] = (), panel_labels: bool = False, max_width_in: float | None = None, title_over_axes: bool = False) -> None

A grid of view models rendered into one figure.

Also exported as vaft.plot.Panels.

14 fields · 1 members
  • models: tuple[ViewModel, ...]
  • nrows: int | None
  • ncols: int
  • share_x: bool
  • share_y: bool
  • suptitle: str
  • squeeze: bool
  • member_styles: tuple[Mapping[str, Any], ...] | None
  • spans: tuple[tuple[int, int, int, int], ...] | None
  • share_legend: bool
  • links: tuple[tuple[str, tuple[int, ...]], ...]
  • panel_labels: bool
  • max_width_in: float | None
  • title_over_axes: bool
  • to_xarray method — An xarray.DataTree with one child dataset per panel, in panel order, the grid facts as root attributes; see vaft.plot._xarray. source

PowerSpectrum

class source
PowerSpectrum(frequency: np.ndarray, psd: np.ndarray, fits: tuple[Series, ...] = (), reference_slopes: tuple[ReferenceSlope, ...] = (), marker_frequencies: tuple[tuple[float, str], ...] = (), label: str = '', x_label: str = 'Frequency [Hz]', y_label: str = 'PSD', title: str = '', log_x: bool = True, log_y: bool = True, x_limits: tuple[float, float] | None = None, y_limits: tuple[float, float] | None = None) -> None

A power spectral density, with optional fitted segments and guide lines.

Also exported as vaft.plot.PowerSpectrum.

13 fields · 2 members
  • frequency: np.ndarray
  • psd: np.ndarray
  • fits: tuple[Series, ...]
  • reference_slopes: tuple[ReferenceSlope, ...]
  • marker_frequencies: tuple[tuple[float, str], ...]
  • label: str
  • x_label: str
  • y_label: str
  • title: str
  • log_x: bool
  • log_y: bool
  • x_limits: tuple[float, float] | None
  • y_limits: tuple[float, float] | None
  • from_result classmethod — Build from any object exposing frequency/psd. source
  • to_xarray method — psd(frequency) with the fits padded on (fit, fit_sample); see vaft.plot._xarray. source

Profile1D

class source
Profile1D(series: tuple[Series, ...], coordinate_label: str = '', y_label: str = '', y_unit: str = '', title: str = '', x_limits: tuple[float, float] | None = None, display: 'DisplaySpec | None' = None, reference_lines: tuple['ReferenceLine', ...] = (), metadata: Mapping[str, Any] = <factory>, y_limits: tuple[float, float] | None = None) -> None

One or more 1D profiles sharing a radial coordinate label.

Also exported as vaft.plot.Profile1D.

10 fields · 1 members
  • series: tuple[Series, ...]
  • coordinate_label: str
  • y_label: str
  • y_unit: str
  • title: str
  • x_limits: tuple[float, float] | None
  • display: 'DisplaySpec | None'
  • reference_lines: tuple['ReferenceLine', ...]
  • metadata: Mapping[str, Any]
  • y_limits: tuple[float, float] | None
  • to_xarray method — The profiles as an xarray.Dataset on (series, sample); see vaft.plot._xarray. source

ReferenceSlope

class source
ReferenceSlope(slope: float, label: str = '', anchor: tuple[float, float] | None = None, style: Mapping[str, Any] = <factory>) -> None

One caller-supplied power-law guide line for a log-log spectrum plot.

Also exported as vaft.plot.ReferenceSlope.

4 fields
  • slope: float
  • label: str
  • anchor: tuple[float, float] | None
  • style: Mapping[str, Any]

Series

class source
Series(x: np.ndarray, y: np.ndarray, label: str = '', yerr: np.ndarray | None = None, style: Mapping[str, Any] = <factory>, validity: int | None = None, valid_mask: np.ndarray | None = None, entry: str = '', channel: str = '', position: tuple[float, float] | None = None, role: str = '', index: int | None = None, secondary: bool = False) -> None

One labeled x-y trace, optionally with symmetric or asymmetric error bars.

Also exported as vaft.plot.Series.

13 fields · 2 members
  • x: np.ndarray
  • y: np.ndarray
  • label: str
  • yerr: np.ndarray | None
  • style: Mapping[str, Any]
  • validity: int | None
  • valid_mask: np.ndarray | None
  • entry: str
  • channel: str
  • position: tuple[float, float] | None
  • role: str
  • index: int | None
  • secondary: bool
  • is_invalid_channel property — Whether the whole trace is flagged invalid. source
  • to_xarray method — This trace as an xarray.Dataset with one series row; see vaft.plot._xarray. source

Spectrogram

class source
Spectrogram(time: np.ndarray, frequency: np.ndarray, magnitude: np.ndarray, x_label: str = 'Time [s]', y_label: str = 'Frequency [Hz]', value_label: str = 'Magnitude', title: str = '', max_frequency: float | None = None, cmap: str = 'hot_r', ridge_time: np.ndarray | None = None, ridge_frequency: np.ndarray | None = None, ridge_label: str = '', tracks: tuple[SpectrogramTrack, ...] = (), tracks_title: str = '', metadata: Mapping[str, Any] = <factory>) -> None

Time-frequency magnitude map on a (frequency, time) grid.

Also exported as vaft.plot.Spectrogram.

15 fields · 2 members
  • time: np.ndarray
  • frequency: np.ndarray
  • magnitude: np.ndarray
  • x_label: str
  • y_label: str
  • value_label: str
  • title: str
  • max_frequency: float | None
  • cmap: str
  • ridge_time: np.ndarray | None
  • ridge_frequency: np.ndarray | None
  • ridge_label: str
  • tracks: tuple[SpectrogramTrack, ...]
  • tracks_title: str
  • metadata: Mapping[str, Any]
  • from_result classmethod — Build from any object exposing time/frequency/magnitude. source
  • to_xarray method — magnitude(frequency, time); see vaft.plot._xarray. source

SpectrogramTrack

class source
SpectrogramTrack(time: np.ndarray, frequency: np.ndarray, label: str = '', style: Mapping[str, Any] = <factory>) -> None

A frequency-versus-time line drawn over a spectrogram (issue #460).

Also exported as vaft.plot.SpectrogramTrack.

4 fields
  • time: np.ndarray
  • frequency: np.ndarray
  • label: str
  • style: Mapping[str, Any]

STATUSES

data
STATUSES = ('', 'pass', 'warn', 'fail', 'info', 'indeterminate', 'not_available')

Table

class source
Table(columns: tuple[TableColumn, ...], rows: tuple[tuple[TableCell, ...], ...], title: str = '', caption: str = '', notes: tuple[str, ...] = (), missing: str = '—') -> None

A table of structured values – a scientific view, not a serialisation.

Also exported as vaft.plot.Table.

6 fields · 2 members
  • columns: tuple[TableColumn, ...]
  • rows: tuple[tuple[TableCell, ...], ...]
  • title: str
  • caption: str
  • notes: tuple[str, ...]
  • missing: str
  • column method — The cells of the column headed name, in row order. source
  • to_xarray method — One variable per column on a row dimension, raw values and stored units; see vaft.plot._xarray. source

TableCell

class source
TableCell(value: Any = None, unit: str = '', subject: str = '', quantity: str = '', display_unit: str | None = None, format: str = '', status: str = '', note: str = '') -> None

One structured value: what it is, in which unit, and how it is judged.

Also exported as vaft.plot.TableCell.

8 fields · 1 members
  • value: Any
  • unit: str
  • subject: str
  • quantity: str
  • display_unit: str | None
  • format: str
  • status: str
  • note: str
  • missing property — Whether there is no value to show: None or NaN. source

TableColumn

class source
TableColumn(name: str, kind: str = 'text', align: str = '', units: str = 'inline') -> None

One column of a Table: its header, its kind and its alignment.

Also exported as vaft.plot.TableColumn.

4 fields
  • name: str
  • kind: str
  • align: str
  • units: str

TextItem

class source
TextItem(label: str = '', value: Any = None, unit: str = '', subject: str = '', quantity: str = '', display_unit: str | None = None, format: str = '', status: str = '', note: str = '') -> None

One line of a TextSection: a labelled value, or a statement.

Also exported as vaft.plot.TextItem.

9 fields · 2 members
  • label: str
  • value: Any
  • unit: str
  • subject: str
  • quantity: str
  • display_unit: str | None
  • format: str
  • status: str
  • note: str
  • missing property — None or NaN; an infinite value is shown as inf/-inf. source
  • is_statement property source

TextPanel

class source
TextPanel(lines: tuple[str, ...], title: str = '') -> None

A panel of text lines – global quantities beside a figure’s plots.

Also exported as vaft.plot.TextPanel.

2 fields · 1 members
  • lines: tuple[str, ...]
  • title: str
  • to_xarray method — The lines as a line coordinate of an otherwise empty xarray.Dataset; see vaft.plot._xarray. source

TextSection

class source
TextSection(title: str, items: tuple[TextItem, ...] = ()) -> None

A named group of TextItem lines; a bare string is a statement.

Also exported as vaft.plot.TextSection.

2 fields
  • title: str
  • items: tuple[TextItem, ...]

TextSummary

class source
TextSummary(sections: tuple[TextSection, ...], title: str = '', caption: str = '', missing: str = 'not stored') -> None

A standalone text summary in named sections (issue #1180).

Also exported as vaft.plot.TextSummary.

4 fields · 2 members
  • sections: tuple[TextSection, ...]
  • title: str
  • caption: str
  • missing: str
  • section method — The section titled title. source
  • to_xarray method — One item dimension: section, label, raw value and stored unit; see vaft.plot._xarray. source

ViewModel

class source
ViewModel() -> None

Marker base class shared by every renderer input model.

Also exported as vaft.plot.ViewModel.

vaft.plot.navigation

Slice navigation: the scientific interaction contract (issue #261 §14-17).

ControlState

class source
ControlState(controls: Sequence[Any], values: dict[str, Any] | None = None) -> None

The current value of every control of one plot, with observers (issue #480).

11 members
  • controls property source
  • values property source
  • spec method source
  • set method — Set one control; returns whether the value changed. source
  • restore method — Put back values that were current before, without notifying. source
  • update method — Set several controls; observers run once if anything changed. source
  • as_options method — The builder’s keyword arguments for the current values. source
  • as_style method — The renderer’s keyword arguments: the "style" group’s values. source
  • subscribe method — Call callback(state) after every change; returns an unsubscribe. source
  • refresh method — Re-run every observer without changing anything. source
  • bind_navigator method — Keep a slice control and a SliceNavigator in step, both ways. source

SliceNavigator

class source
SliceNavigator(times: Sequence[float] | np.ndarray, *, usable: Sequence[int] | None = None, initial: int | None = None) -> None

One selected slice among stored ones, with observers.

Also exported as vaft.plot.SliceNavigator.

12 members
  • times property source
  • usable property source
  • selected property — Index of the selected slice, always one of usable. source
  • time property — Stored time of the selected slice. source
  • position property — Rank of the selected slice among the usable ones (0-based). source
  • nearest method — The usable slice nearest time; ties go to the earlier slice. source
  • select method — Snap to the stored slice nearest time; returns (index, time). source
  • select_index method — Select a stored slice by index; it must be usable. source
  • select_position method — Select by rank among the usable slices (what a slider drives). source
  • step method — Move delta usable slices forward (or back), clamped at the ends. source
  • subscribe method — Call callback(navigator) after every change; returns an unsubscribe. source
  • refresh method — Re-run every observer without changing the selection. source

vaft.plot.nubeam

Views of a NUBEAM run, built from the native result container.

build_nubeam_deposition_poloidal

function source
build_nubeam_deposition_poloidal(outputs: Any, *, title: Optional[str] = None) -> GeometryLayers

Beam deposition markers in the poloidal plane.

build_nubeam_deposition_topview

function source
build_nubeam_deposition_topview(outputs: Any, *, title: Optional[str] = None) -> GeometryLayers

Beam deposition markers seen from above, for the last step.

build_nubeam_lost_fast_ions

function source
build_nubeam_lost_fast_ions(outputs: Any, *, title: Optional[str] = None) -> GeometryLayers

Where NUBEAM stopped following fast ions, in the poloidal plane.

build_nubeam_power_accounting

function source
build_nubeam_power_accounting(outputs: Any, *, title: Optional[str] = None) -> Panels

NUBEAM’s own end-of-step power budget, as a text panel per species.

build_nubeam_profile

function source
build_nubeam_profile(outputs: Any, quantity: str, *, rho: Optional[Sequence[float]] = None, title: Optional[str] = None) -> Profile1D

A radial NUBEAM profile in NUBEAM’s own units.

nubeam_deposition_poloidal

function source
nubeam_deposition_poloidal(outputs: Any, *, title: Optional[str] = None, ax=None, show: bool = False, **style)

Render beam deposition markers in the poloidal plane.

nubeam_deposition_topview

function source
nubeam_deposition_topview(outputs: Any, *, title: Optional[str] = None, ax=None, show: bool = False, **style)

Render beam deposition markers from above.

nubeam_lost_fast_ions

function source
nubeam_lost_fast_ions(outputs: Any, *, title: Optional[str] = None, ax=None, show: bool = False, **style)

Render lost fast ions in the poloidal plane, split by loss channel.

nubeam_power_accounting

function source
nubeam_power_accounting(outputs: Any, *, title: Optional[str] = None, ax=None, show: bool = False, **style)

Render NUBEAM’s power balance.

nubeam_profile

function source
nubeam_profile(outputs: Any, quantity: str, *, rho: Optional[Sequence[float]] = None, title: Optional[str] = None, ax=None, show: bool = False, **style: Any)

Render a radial NUBEAM profile.

vaft.plot.operational_space

Operational-space population plots with registered-boundary overlays (#944, #1425).

applicability_status

function source
applicability_status(curve: _b.BoundaryCurve, rows: pd.DataFrame, axes: Tuple[str, str], machine_class: Optional[str] = None) -> Tuple[str, Tuple[str, ...]]

The applicability status of a drawn boundary for the plotted states, with its reasons.

APPLICABILITY_STATUSES

data
APPLICABILITY_STATUSES = ('SUPPORTED', 'OUTSIDE', 'UNASSESSED', 'NOT_APPLICABLE')

li_qa_pair

function source
li_qa_pair(table: pd.DataFrame, *, x_range: Optional[Tuple[float, float]] = None, y_range: Optional[Tuple[float, float]] = None, format: Optional[str] = None, theme: Optional[str] = None, show: bool = False, **kwargs)

The empirical (Wesson 1989, JET) and theoretical (Cheng-Furth-Boozer 1987) l_i-q references side by side.

operational_space_population

function source
operational_space_population(table: pd.DataFrame, projection, *, x: Optional[str] = None, y: Optional[str] = None, color: Optional[str] = None, marker: Optional[str] = None, hollow: Sequence = (), boundaries: Union[str, bool, Sequence[str]] = 'default', boundary_inputs: Optional[Mapping[str, float]] = None, units: Optional[Mapping[str, str]] = None, cmap: str = 'viridis', color_limits: Optional[Tuple[float, float]] = None, x_range: Optional[Tuple[float, float]] = None, y_range: Optional[Tuple[float, float]] = None, title: Optional[str] = None, boundary_style: str = 'shade', trajectories: Optional[Mapping[str, pd.DataFrame]] = None, time_column: str = 'time_efit_s', legend_keys: bool = True, marker_size: float = 34.0, category_colors: Optional[Mapping[str, str]] = None, ax=None, figsize: Optional[Tuple[float, float]] = None, format: Optional[str] = None, theme: Optional[str] = None, show: bool = False)

Scatter a population on a canonical operational-space projection.

population_overlay

function source
population_overlay(table: pd.DataFrame, projection, *, x: Optional[str] = None, y: Optional[str] = None, boundaries: Union[str, bool, Sequence[str]] = 'default', boundary_inputs: Optional[Mapping[str, float]] = None, units: Optional[Mapping[str, str]] = None, x_range: Optional[Tuple[float, float]] = None, y_range: Optional[Tuple[float, float]] = None, samples: int = 1601) -> OverlayPlan

The boundaries a table’s projection can carry, without drawing anything.

vaft.plot.ordering_space

Ordering spaces and ordering margins of a population of plasma states (#1627 §3).

ordering_margins_plot

function source
ordering_margins_plot(states: pd.DataFrame, points: Optional[pd.DataFrame] = None, quantities: Optional[Iterable[str]] = None, *, title: Optional[str] = None, ax=None, show: bool = False)

The margin of each ordering across a population, in decades, on the margin bands.

ordering_space

function source
ordering_space(table: pd.DataFrame, space='resistive_two_fluid', *, group: Optional[str] = None, decades: Sequence[float] = (1.0, 2.0), quadrants: bool = True, title: Optional[str] = None, ax=None, show: bool = False, **style)

Scatter a population on one ordering space.

SPACE_STYLE

data
SPACE_STYLE = <builtins.dict>

vaft.plot.parameter_history

DataFrame-based parameter history plotting.

plot_parameter_history — Plot summary rows against shot, acquisition time, or a numeric column. Reference source
Also exported as vaft.plot.plot_parameter_history.

vaft.plot.plotly

Plotly rendering of the view models (issue #491).

PLOTLY_MODELS

data
PLOTLY_MODELS = <vaft.plot.plotly._Models>

PlotlyRenderer

class source
PlotlyRenderer(render: Callable[..., Any], add: Callable[..., Any])

How a model kind is drawn: on its own, and into a cell of a composite.

renderer_for_model

function source
renderer_for_model(model_type: type) -> PlotlyRenderer

require_plotly

function source
require_plotly() -> Any

Import Plotly, naming the dependency when it is missing.

vaft.plot.plotly.fields

Plotly drawing of vaft.plot.models.Field2D.

add_field_2d

function source
add_field_2d(figure: Any, model: Field2D, *, row: int | None = None, col: int | None = None, colorbar: bool = True, cmap: str = 'viridis', x_title: bool = True, **style: Any) -> None

add_geometry_layer

function source
add_geometry_layer(figure: Any, layer: GeometryLayer, *, row: int | None = None, col: int | None = None) -> None

render_field_2d

function source
render_field_2d(model: Field2D, *, show: bool = False, **style: Any) -> Any

vaft.plot.plotly.geometry

Plotly drawing of vaft.plot.models.Geometry3DLayers (issue #1087).

add_geometry_3d_layers

function source
add_geometry_3d_layers(figure: Any, model: Geometry3DLayers, *, row: int | None = None, col: int | None = None, legend: bool | None = None, x_title: bool = True, **style: Any) -> None

Draw every layer into figure (or its 3-D cell) and fit the scene.

render_geometry_3d_layers

function source
render_geometry_3d_layers(model: Geometry3DLayers, *, show: bool = False, **style: Any) -> Any

A Plotly figure of one 3-D machine-coordinate scene.

vaft.plot.plotly.lines

Plotly drawing of vaft.plot.models.LineSeries.

add_line_series

function source
add_line_series(figure: Any, model: LineSeries, *, row: int | None = None, col: int | None = None, legend: bool | None = None, uncertainty: str = 'auto', validity: str = 'show', x_title: bool = True, legend_placement: Any = None, **style: Any) -> None

Draw a LineSeries into a cell of figure (or the whole figure).

add_series

function source
add_series(figure: Any, series: Series, *, name: str, row: int | None = None, col: int | None = None, uncertainty: str = 'auto', validity: str = 'show', legend: bool = True, **style: Any) -> bool

Add one trace (plus its band or shading); returns whether it is legend-worthy.

render_line_series

function source
render_line_series(model: LineSeries, *, show: bool = False, **style: Any) -> Any

A LineSeries as a Plotly figure.

vaft.plot.plotly.panels

Plotly drawing of vaft.plot.models.Panels with make_subplots.

add_panels

function source
add_panels(figure: Any, model: Panels, **style: Any) -> None

render_panels

function source
render_panels(model: Panels, *, show: bool = False, **style: Any) -> Any

vaft.plot.plotly.profiles

Plotly drawing of vaft.plot.models.Profile1D.

add_profile_1d

function source
add_profile_1d(figure: Any, model: Profile1D, *, row: int | None = None, col: int | None = None, legend: bool | None = None, uncertainty: str = 'auto', validity: str = 'show', x_title: bool = True, legend_placement: Any = None, **style: Any) -> None

render_profile_1d

function source
render_profile_1d(model: Profile1D, *, show: bool = False, **style: Any) -> Any

vaft.plot.plotly.spectrograms

Plotly drawing of vaft.plot.models.Spectrogram as a heatmap.

add_spectrogram

function source
add_spectrogram(figure: Any, model: Spectrogram, *, row: int | None = None, col: int | None = None, colorbar: bool = True, x_title: bool = True, **style: Any) -> None

render_spectrogram

function source
render_spectrogram(model: Spectrogram, *, show: bool = False, **style: Any) -> Any

vaft.plot.plotly.text

Plotly drawing of vaft.plot.models.TextPanel: lines of monospace text.

add_text_panel

function source
add_text_panel(figure: Any, model: TextPanel, *, row: int | None = None, col: int | None = None, **_: Any) -> None

render_text_panel

function source
render_text_panel(model: TextPanel, *, show: bool = False, **style: Any) -> Any

vaft.plot.population

Population renderers for canonical multi-machine tables (#1205).

confinement_coverage_strip

function source
confinement_coverage_strip(table: pd.DataFrame, columns: tuple[str, ...] = ('i_p_A', 'b_t_T', 'n_e_line_avg_m3', 'r_geo_m', 'epsilon', 'kappa_area'), *, by: str = 'machine', highlight: str | None = 'VEST', max_groups: int = 7, title: str | None = None, axes=None, show: bool = False, figsize=None)

Where each group sits along each engineering parameter, one panel per column.

confinement_h_factor_distribution

function source
confinement_h_factor_distribution(table: pd.DataFrame, h: pd.Series, *, scaling_label: str = 'IPB98(y,2)', by: str = 'machine', highlight: str | None = 'VEST', ax=None, show: bool = False, figsize=(6.4, 5.0))

H-factor distribution per group, as horizontal box plots.

confinement_population

function source
confinement_population(table: pd.DataFrame, x: str = 'i_p_A', y: str = 'tau_e_th_s', *, by: str = 'machine', highlight: str | None = 'VEST', max_groups: int = 7, log: bool = True, labels: str = 'direct', label_counts: bool = True, ax=None, show: bool = False, figsize=(6.4, 5.0))

Scatter one canonical column against another across the whole population.

confinement_predicted_vs_measured

function source
confinement_predicted_vs_measured(table: pd.DataFrame, predicted: pd.Series, *, scaling_label: str = 'IPB98(y,2)', by: str = 'machine', highlight: str | None = 'VEST', max_groups: int = 7, band: float = 2.0, labels: str = 'direct', label_counts: bool = True, ax=None, show: bool = False, figsize=(5.6, 5.4))

Measured against scaling-predicted thermal confinement time, log-log.

lh_threshold_population

function source
lh_threshold_population(table: pd.DataFrame, x: str = 'n_e_line_avg_m3', y: str = 'p_loss_W', *, by: str = 'main_ion', max_groups: int = 7, log: bool = False, ax=None, show: bool = False, figsize=(6.4, 5.0))

L-H transition records in any two canonical columns, e.g. P_loss against density.

machine_lcfs_comparison

function source
machine_lcfs_comparison(equilibria, *, normalized_by=None, limiter: bool = True, magnetic_axis: bool = True, labels: str = 'direct', title: str | None = None, ax=None, show: bool = False, figsize=(6.4, 6.0))

Last closed flux surfaces of several machines in one R-Z axes, each named on its curve.

transition_margin

function source
transition_margin(table: pd.DataFrame, margin: pd.Series, x: str = 'n_e_line_avg_m3', *, by: str = 'main_ion', max_groups: int = 7, ax=None, show: bool = False, figsize=(6.4, 4.6))

Transition margin P_loss / P_LH against a canonical column.

transition_predicted_vs_measured

function source
transition_predicted_vs_measured(table: pd.DataFrame, *, by: str = 'main_ion', max_groups: int = 7, band: float = 2.0, ax=None, show: bool = False, figsize=(5.6, 5.4))

Measured loss power at the transition against the record’s scaling threshold.

vaft.plot.presentation

Graphical presentation of a canonical figure: geometry, format and theme (issue #689).

apply_axes_theme

function source
apply_axes_theme(axes: Any, theme: Theme) -> None

Apply a theme’s axes-level tokens to axes that already exist.

DEFAULT_FORMAT

data
DEFAULT_FORMAT = 'screen'

Also exported as vaft.plot.DEFAULT_FORMAT.

EQUILIBRIUM_ROLE

data
EQUILIBRIUM_ROLE = 'equilibrium'

FigureFormat

class source
FigureFormat(name: str, width_in: float, max_height_in: float, base_font_pt: float, label_scale: float = 1.0, tick_scale: float = 0.9, title_scale: float = 1.0, legend_scale: float = 0.9, line_scale: float = 1.0, marker_scale: float = 1.0, panel_gap_pt: float = 6.0, outer_pad_pt: float = 3.0) -> None

The physical scale of one rendering: width, height ceiling, type sizes.

12 fields
  • name: str
  • width_in: float
  • max_height_in: float
  • base_font_pt: float
  • label_scale: float
  • tick_scale: float
  • title_scale: float
  • legend_scale: float
  • line_scale: float
  • marker_scale: float
  • panel_gap_pt: float
  • outer_pad_pt: float

FontFallbackWarning

class source

A theme’s preferred font is not installed, and a later one stands in.

FORMATS

data
FORMATS = <builtins.dict>

Also exported as vaft.plot.FORMATS.

GEOMETRY

data
GEOMETRY = <builtins.dict>

GeometryPolicy

class source
GeometryPolicy(kind: str, aspect: float | None = None) -> None

kind is aspect (height = aspect x width), extent (an R-Z view takes the ratio of what it draws), native (an image keeps its pixel ratio) or grid (a composite divides one width among its panels).

2 fields
  • kind: str
  • aspect: float | None

LEGACY_FORMAT

data
LEGACY_FORMAT = 'legacy'

Presentation

class source
Presentation(format: FigureFormat | None, theme: Theme | None) -> None

A format and/or a theme, resolved; what a renderer applies once.

2 fields · 6 members
  • format: FigureFormat | None
  • theme: Theme | None
  • pad property — tight_layout padding in font units, when a format sets one. source
  • figsize method — The canvas for model under this format; fallback when there is none. source
  • row_heights method — The heights, in inches, a composite’s rows need under this format. source
  • grid_figsize method — The canvas for a plain nrows x ncols Matplotlib grid; fallback without a format. source
  • rc method — The rcParams this presentation sets, theme baseline times format scale. source
  • context method — A context that applies rc for one render and restores after. source

presented

function source
presented(default_figsize: tuple[float, float] | None = None) -> Callable

Give a base renderer format= and theme=, applied around it.

resolve_font_family

function source
resolve_font_family(families: Any, *, warn: bool = True) -> list[str]

The installed part of a preference-ordered font stack, ending in DejaVu Sans.

resolve_presentation

function source
resolve_presentation(format: str | None, theme: str | None, *, ax: Any = None, figsize: tuple[float, float] | None = None) -> Presentation | None

The presentation a renderer applies, or None for the legacy path.

Also exported as vaft.plot.resolve_presentation.

rz_extent

function source
rz_extent(model: Any) -> tuple[float, float] | None

(delta R, delta Z) of what an R-Z view displays, or None.

Theme

class source
Theme(name: str, font_family: tuple[str, ...], tick_direction: str, grid: bool, grid_alpha: float, spines: tuple[str, ...], colors: tuple[str, ...], linestyles: tuple[str, ...] | None = None, markers: tuple[str, ...] | None = None, markevery: float | None = None, line_pt: float = 1.2, marker_pt: float = 4.0, palette: tuple[str, ...] | None = None, intents: Mapping[str, Any] = <factory>, math_fontset: str | None = None) -> None

The visual grammar of a figure: type face, ticks, frame, cycles.

15 fields · 1 members
  • name: str
  • font_family: tuple[str, ...]
  • tick_direction: str
  • grid: bool
  • grid_alpha: float
  • spines: tuple[str, ...]
  • colors: tuple[str, ...]
  • linestyles: tuple[str, ...] | None
  • markers: tuple[str, ...] | None
  • markevery: float | None
  • line_pt: float
  • marker_pt: float
  • palette: tuple[str, ...] | None
  • intents: Mapping[str, Any]
  • math_fontset: str | None
  • prop_cycle method — The axes.prop_cycle this theme sets, every sub-cycle equal in length. source

THEMES

data
THEMES = <builtins.dict>

Also exported as vaft.plot.THEMES.

vaft.plot.pyvista

PyVista/VTK conversion and VTK-family export of 3-D scenes (issue #1087).

read_vtk_blocks

function source
read_vtk_blocks(path: str | Path) -> dict[str, dict[str, Any]]

Read a file write_vtk wrote back into one record per layer.

to_pyvista

function source
to_pyvista(model: Any) -> Any

A 3-D scene as a pyvista.MultiBlock whose tree follows each layer’s group.

write_vtk

function source
write_vtk(model: Any, path: str | Path) -> Path

Write a 3-D scene as a VTK-family file ParaView opens; returns the path written.

vaft.plot.registry

Central registry of canonical VAFT plot renderers.

available_plots

function source
available_plots(*, query: str | None = None, domain: str | None = None, subject: str | None = None, view: str | None = None, model: type | None = None, status: Status | None = 'canonical', detail: bool = False)

The registered plots as a vaft.plot.discovery.PlotCatalog.

Also exported as vaft.plot.available_plots.

canonical_names

function source
canonical_names() -> tuple[str, ...]

Return every canonical renderer name, sorted.

Also exported as vaft.plot.canonical_names.

get_spec

function source
get_spec(name: str) -> PlotSpec

Return the spec registered under name.

Also exported as vaft.plot.get_spec.

NON_GRAPHICAL_VIEWS

data
NON_GRAPHICAL_VIEWS = ('table', 'text')

PlotSpec

class source
PlotSpec(name: str, model: type, renderer: Callable[..., Any], domain: str, view: str, description: str, subject: str = '', quantity: str = '', ids: tuple[str, ...] = (), required_paths: tuple[str, ...] = (), optional_paths: tuple[str, ...] = (), status: Status = 'canonical', options: Mapping[str, Any] = <factory>) -> None

Metadata describing one canonical renderer.

Also exported as vaft.plot.PlotSpec.

13 fields · 1 members
  • name: str
  • model: type
  • renderer: Callable[..., Any]
  • domain: str
  • view: str
  • description: str
  • subject: str
  • quantity: str
  • ids: tuple[str, ...]
  • required_paths: tuple[str, ...]
  • optional_paths: tuple[str, ...]
  • status: Status
  • options: Mapping[str, Any]
  • stem property — The canonical stem used to derive adapter names (plot_<stem>). source

register

function source
register(spec: PlotSpec) -> PlotSpec

Add spec to the registry, refusing to silently replace an entry.

renderer

function source
renderer(*, domain: str, subject: str, view: str, model: type, description: str, quantity: str = '', ids: Iterable[str] = (), required_paths: Iterable[str] = (), optional_paths: Iterable[str] = (), status: Status = 'canonical', name: str | None = None, **options: Any) -> Callable[[Callable[..., Any]], Callable[..., Any]]

Register the decorated function and return it unchanged.

specs

function source
specs(*, domain: str | None = None, subject: str | None = None, view: str | None = None, model: type | None = None, status: Status | None = 'canonical') -> tuple[PlotSpec, ...]

Return registered specs, filtered and ordered by canonical name.

VIEWS

data
VIEWS = ('time', 'profile', 'spatial', 'evolution', 'field', 'geometry', 'geometry3d', 'spectrum', 'spectrogram', 'overview',...

vaft.plot.renderers.edge_q

Edge-q proxies against time, for shots with or without an equilibrium (#1583).

summary_time_estimated_q95 — Estimated q95 against time, labelled with its scaling, equilibrium q95 overlaid. Reference source
Also exported as vaft.plot.summary_time_estimated_q95.

summary_time_normalized_current — Normalised current I_N against time. Reference source
Also exported as vaft.plot.summary_time_normalized_current.

summary_time_q_star_cylindrical — Menard’s cylindrical q* against time. Reference source
Also exported as vaft.plot.summary_time_q_star_cylindrical.

summary_time_q_star_kink — Freidberg’s kink q* against time. Reference source
Also exported as vaft.plot.summary_time_q_star_kink.

vaft.plot.renderers.fields

Canonical <domain>_field_<quantity> renderers for 2D scalar fields.

electron_density_field — Electron density mapped onto the poloidal plane. Reference source
Also exported as vaft.plot.electron_density_field.

electron_temperature_field — Electron temperature mapped onto the poloidal plane. Reference source
Also exported as vaft.plot.electron_temperature_field.

equilibrium_field_2d — One reconstructed 2-D equilibrium quantity, chosen with field=. Reference source
Also exported as vaft.plot.equilibrium_field_2d.

equilibrium_field_psi — Reconstructed poloidal flux map on the equilibrium (R, Z) grid. Reference source
Also exported as vaft.plot.equilibrium_field_psi.

equilibrium_field_psi_vacuum — Vacuum poloidal flux from the PF coils alone, without plasma. Reference source
Also exported as vaft.plot.equilibrium_field_psi_vacuum.

field_line_topology_field_connection_length — Connection length over one traced poloidal plane. Reference source
Also exported as vaft.plot.field_line_topology_field_connection_length.

mhd_linear_field_spectrum — Perturbed normal flux amplitude over the (psi_N, m) grid. Reference source
Also exported as vaft.plot.mhd_linear_field_spectrum.

passive_structure_field_wall_reduction — Full, reduced or difference wall flux map on the equilibrium region. Reference source
Also exported as vaft.plot.passive_structure_field_wall_reduction.

render_field_2d

function source
render_field_2d(model: Field2D, *, ax: Axes | None = None, show: bool = False, figsize: tuple[float, float] | None = None, colorbar: bool = True, cmap: str = 'viridis', format: str | None = None, theme: str | None = None, label_contours: bool = False, **style: Any) -> tuple[Figure, Axes]

Draw a Field2D as filled or line contours with its overlays.

Also exported as vaft.plot.render_field_2d, vaft.plot.renderers.render_field_2d.

vacuum_field — One quantity of the coils’ and vessel’s vacuum field, at one instant. Reference source
Also exported as vaft.plot.vacuum_field.

vaft.plot.renderers.geometry

Canonical <domain>_geometry_<quantity> renderers.

charge_exchange_geometry_poloidal — Charge-exchange measurement positions in the poloidal plane. Reference source
Also exported as vaft.plot.charge_exchange_geometry_poloidal.

coil_3d_geometry3d — 3D validation view of the non-axisymmetric coil filaments. Reference source
Also exported as vaft.plot.coil_3d_geometry3d.

coil_3d_geometry_topview — Top view (x-y) of the non-axisymmetric coil filaments. Reference source
Also exported as vaft.plot.coil_3d_geometry_topview.

draw_geometry_layer

function source
draw_geometry_layer(axes: Axes, layer: GeometryLayer, **defaults: Any) -> None

Draw one GeometryLayer into axes.

Also exported as vaft.plot.renderers.draw_geometry_layer.

equilibrium_geometry_boundary — Last-closed-flux-surface outline in the poloidal plane. Reference source
Also exported as vaft.plot.equilibrium_geometry_boundary.

equilibrium_geometry_topview — Equilibrium boundary projected into the machine top view. Reference source
Also exported as vaft.plot.equilibrium_geometry_topview.

finite_runs

function source
finite_runs(r: Any, z: Any) -> list[np.ndarray] | None

The finite stretches of a polyline, or None when it has no gap.

machine_geometry3d — Composed 3D machine scene. Reference source
Also exported as vaft.plot.machine_geometry3d.

machine_geometry_poloidal — Composed poloidal machine view. Reference source
Also exported as vaft.plot.machine_geometry_poloidal.

machine_geometry_topview — Composed machine top view. Reference source
Also exported as vaft.plot.machine_geometry_topview.

magnetics_geometry_poloidal — Flux-loop and B-field-probe positions in the poloidal plane. Reference source
Also exported as vaft.plot.magnetics_geometry_poloidal.

mhd_linear_geometry_island — Saturated island separatrices in the poloidal plane. Reference source
Also exported as vaft.plot.mhd_linear_geometry_island.

passive_structure_geometry_poloidal — Passive conducting-structure loop outlines in the poloidal plane. Reference source
Also exported as vaft.plot.passive_structure_geometry_poloidal.

passive_structure_geometry_wall_mode — A wall eigenmode’s current pattern on the passive structure. Reference source
Also exported as vaft.plot.passive_structure_geometry_wall_mode.

pf_coil_geometry_poloidal — PF coil outlines in the poloidal plane. Reference source
Also exported as vaft.plot.pf_coil_geometry_poloidal.

pf_plasma_geometry_poloidal — Plasma-current elements in the poloidal plane, coloured by current. Reference source
Also exported as vaft.plot.pf_plasma_geometry_poloidal.

render_geometry_3d_layers

function source
render_geometry_3d_layers(model: Geometry3DLayers, *, ax: Axes | None = None, show: bool = False, legend: bool | None = None, figsize: tuple[float, float] | None = None, format: str | None = None, theme: str | None = None, **style: Any) -> tuple[Figure, Axes]

Draw a Geometry3DLayers stack into one 3D machine view.

Also exported as vaft.plot.render_geometry_3d_layers.

render_geometry_layers

function source
render_geometry_layers(model: GeometryLayers, *, ax: Axes | None = None, show: bool = False, figsize: tuple[float, float] | None = None, legend: bool | None = None, grid: bool = True, format: str | None = None, theme: str | None = None, **style: Any) -> tuple[Figure, Axes]

Draw a GeometryLayers stack into one equal-aspect axes.

Also exported as vaft.plot.render_geometry_layers, vaft.plot.renderers.render_geometry_layers.

soft_x_rays_geometry_lines_of_sight — Soft X-ray detector lines of sight over the poloidal cross-section. Reference source
Also exported as vaft.plot.soft_x_rays_geometry_lines_of_sight.

thomson_scattering_geometry_poloidal — Thomson-scattering measurement positions in the poloidal plane. Reference source
Also exported as vaft.plot.thomson_scattering_geometry_poloidal.

wall_geometry_poloidal — First-wall and limiter outline in the poloidal plane. Reference source
Also exported as vaft.plot.wall_geometry_poloidal.

vaft.plot.renderers.gyrokinetics

Registered gyrokinetic renderers: the standardized layer of #1591.

gyrokinetics_overview — Composite of the gyrokinetic panels the run supports. Reference source
Also exported as vaft.plot.gyrokinetics_overview.

gyrokinetics_profile_eigenfunction — Eigenfunction magnitude, real and imaginary parts. Reference source
Also exported as vaft.plot.gyrokinetics_profile_eigenfunction.

gyrokinetics_spectrum_energy_flux — ky-resolved energy flux from gyrokinetics_local. Reference source
Also exported as vaft.plot.gyrokinetics_spectrum_energy_flux.

gyrokinetics_spectrum_frequency — Linear frequency spectrum from gyrokinetics_local. Reference source
Also exported as vaft.plot.gyrokinetics_spectrum_frequency.

gyrokinetics_spectrum_growth_rate — Linear growth rate spectrum from gyrokinetics_local. Reference source
Also exported as vaft.plot.gyrokinetics_spectrum_growth_rate.

gyrokinetics_spectrum_particle_flux — ky-resolved particle flux from gyrokinetics_local. Reference source
Also exported as vaft.plot.gyrokinetics_spectrum_particle_flux.

turbulent_transport_overview — Composite of the turbulent flux profiles. Reference source
Also exported as vaft.plot.turbulent_transport_overview.

turbulent_transport_profile_energy_flux — Turbulent energy flux profiles, one pair per anomalous model. Reference source
Also exported as vaft.plot.turbulent_transport_profile_energy_flux.

turbulent_transport_profile_particle_flux — Turbulent particle flux profiles, one pair per anomalous model. Reference source
Also exported as vaft.plot.turbulent_transport_profile_particle_flux.

vaft.plot.renderers.images

Canonical <domain>_image_<quantity> and <domain>_animation_<quantity> renderers for raster pixel data (camera frames), as opposed to vaft.plot.renderers.fields’s physical (r, z) scalar fields.

camera_visible_animation_frames — Animate a sequence of FAST-camera frames on a shared color scale. Reference source
Also exported as vaft.plot.camera_visible_animation_frames.

camera_visible_image — Camera frame with optional overlays; the _frame/_efit_overlay/_field_line renderers are its presets. Reference source
Also exported as vaft.plot.camera_visible_image.

camera_visible_image_efit_overlay — FAST-camera frame with the projected EFIT/wall overlay. Reference source
Also exported as vaft.plot.camera_visible_image_efit_overlay.

camera_visible_image_field_line — FAST-camera frame with a projected traced field line. Reference source
Also exported as vaft.plot.camera_visible_image_field_line.

camera_visible_image_fluctuation — FAST-camera frame with its local temporal background subtracted. Reference source
Also exported as vaft.plot.camera_visible_image_fluctuation.

camera_visible_image_frame — One FAST-camera frame (raw digital levels, uncalibrated). Reference source
Also exported as vaft.plot.camera_visible_image_frame.

camera_visible_image_mhd_power — Normalised MHD-band power of every pixel at one time. Reference source
Also exported as vaft.plot.camera_visible_image_mhd_power.

camera_visible_image_vacuum_field_line — FAST-camera frame with projected vacuum field lines. Reference source
Also exported as vaft.plot.camera_visible_image_vacuum_field_line.

render_image_2d

function source
render_image_2d(model: Image2D, *, ax: Axes | None = None, show: bool = False, figsize: tuple[float, float] | None = None, colorbar: bool = True, format: str | None = None, theme: str | None = None, **style: Any) -> tuple[Figure, Axes]

Draw an Image2D with imshow plus its pixel-space overlays.

Also exported as vaft.plot.render_image_2d, vaft.plot.renderers.render_image_2d.

render_image_sequence

function source
render_image_sequence(model: ImageSequence, *, ax: Axes | None = None, show: bool = False, figsize: tuple[float, float] | None = None, colorbar: bool = True, interval_ms: float = 100.0, save_path: str | Path | None = None, fps: float = 10.0, format: str | None = None, theme: str | None = None, **style: Any)

Animate an ImageSequence, optionally saving it to disk.

Also exported as vaft.plot.render_image_sequence, vaft.plot.renderers.render_image_sequence.

vaft.plot.renderers.interactive

Slice-navigation figure: histories above, a slice summary below (issue #261).

BACKENDS

data
BACKENDS = ('auto', 'matplotlib', 'ipywidgets', 'none')

Also exported as vaft.imas.interactive.BACKENDS, vaft.omas.interactive.BACKENDS.

Interactive

class source
Interactive(figure: Any, axes: Any, state: Any, controls: tuple[Any, ...], widget: Any = None) -> None

What plot_*(..., interactive=True) returns.

render_controls

function source
render_controls(build: Callable[[dict], Any], state: Any, *, draw: Callable[..., Any], backend: str = 'auto', render_backend: str = 'matplotlib', show: bool = False, figsize: tuple[float, float] | None = None) -> Interactive

Draw build(options) with controls that rebuild and redraw it.

render_slice_navigation

function source
render_slice_navigation(navigator: SliceNavigator, histories: Sequence[LineSeries | str], build_slice: Callable[[int], Panels], *, backend: str = 'auto', show: bool = False, figsize: tuple[float, float] | None = None) -> tuple[Any, np.ndarray, tuple[Any, ...], Any]

Draw the navigation figure; returns (figure, slice_axes, history_axes, widget).

resolve_backend

function source
resolve_backend(backend: str) -> str

Turn the public backend= into the concrete one, validating it.

SliceAxes

class source
SliceAxes(axes: np.ndarray, colorbar: Any) -> None

The slice summary’s axes, rebuilt when a slice draws a different set.

2 members

vaft.plot.renderers.lines

Canonical <domain>_time_<quantity> renderers.

b_field_probe_time_field — Poloidal field measured by each selected B-field probe. Reference source
Also exported as vaft.plot.b_field_probe_time_field.

barometry_time_pressure — Neutral pressure history from the barometry gauges. Reference source
Also exported as vaft.plot.barometry_time_pressure.

charge_exchange_time_ion_temperature — Per-channel ion temperature history from charge-exchange spectroscopy. Reference source
Also exported as vaft.plot.charge_exchange_time_ion_temperature.

charge_exchange_time_velocity_tor — Per-channel toroidal rotation history from charge-exchange spectroscopy. Reference source
Also exported as vaft.plot.charge_exchange_time_velocity_tor.

diamagnetic_flux_time — Measured diamagnetic flux history. Reference source
Also exported as vaft.plot.diamagnetic_flux_time.

ec_launchers_time_power — Net launched electron-cyclotron power per beam. Reference source
Also exported as vaft.plot.ec_launchers_time_power.

electron_density_time — Volume-averaged electron density history. Reference source
Also exported as vaft.plot.electron_density_time.

electron_temperature_time — Volume-averaged electron temperature history. Reference source
Also exported as vaft.plot.electron_temperature_time.

equilibrium_time_beta_n — Normalized beta history. Reference source
Also exported as vaft.plot.equilibrium_time_beta_n.

equilibrium_time_beta_p — Poloidal beta history. Reference source
Also exported as vaft.plot.equilibrium_time_beta_p.

equilibrium_time_beta_t — Toroidal beta history. Reference source
Also exported as vaft.plot.equilibrium_time_beta_t.

equilibrium_time_diamagnetic_flux — Measured versus reconstructed diamagnetic-flux constraint. Reference source
Also exported as vaft.plot.equilibrium_time_diamagnetic_flux.

equilibrium_time_elongation — Boundary elongation history. Reference source
Also exported as vaft.plot.equilibrium_time_elongation.

equilibrium_time_li — Internal inductance li_3 history. Reference source
Also exported as vaft.plot.equilibrium_time_li.

equilibrium_time_major_radius — Geometric-axis major radius history. Reference source
Also exported as vaft.plot.equilibrium_time_major_radius.

equilibrium_time_minor_radius — Boundary minor radius history. Reference source
Also exported as vaft.plot.equilibrium_time_minor_radius.

equilibrium_time_plasma_current — Reconstructed plasma current history. Reference source
Also exported as vaft.plot.equilibrium_time_plasma_current.

equilibrium_time_q0 — Safety factor on axis. Reference source
Also exported as vaft.plot.equilibrium_time_q0.

equilibrium_time_q95 — Safety factor at the 95% flux surface. Reference source
Also exported as vaft.plot.equilibrium_time_q95.

equilibrium_time_qa — Safety factor at the plasma edge. Reference source
Also exported as vaft.plot.equilibrium_time_qa.

equilibrium_time_triangularity — Boundary triangularity history, the mean of upper and lower. Reference source
Also exported as vaft.plot.equilibrium_time_triangularity.

equilibrium_time_triangularity_lower — Lower boundary triangularity history. Reference source
Also exported as vaft.plot.equilibrium_time_triangularity_lower.

equilibrium_time_triangularity_upper — Upper boundary triangularity history. Reference source
Also exported as vaft.plot.equilibrium_time_triangularity_upper.

equilibrium_time_w_mag — Magnetic stored energy history. Reference source
Also exported as vaft.plot.equilibrium_time_w_mag.

equilibrium_time_w_mhd — MHD stored energy history. Reference source
Also exported as vaft.plot.equilibrium_time_w_mhd.

equilibrium_time_w_tot — Total stored energy history. Reference source
Also exported as vaft.plot.equilibrium_time_w_tot.

flux_loop_time_flux — Poloidal flux measured by each selected flux loop. Reference source
Also exported as vaft.plot.flux_loop_time_flux.

flux_loop_time_voltage — Loop voltage measured by each selected flux loop. Reference source
Also exported as vaft.plot.flux_loop_time_voltage.

impa_time_field — Calibrated field from the IMPA Hall-probe array. Reference source
Also exported as vaft.plot.impa_time_field.

impa_time_voltage — Raw IMPA Hall-probe voltages. Reference source
Also exported as vaft.plot.impa_time_voltage.

interferometer_time_n_e_line — Interferometer line-integrated electron density history. Reference source
Also exported as vaft.plot.interferometer_time_n_e_line.

mhd_linear_time_energy_perturbed — Perturbed potential energy history per toroidal mode. Reference source
Also exported as vaft.plot.mhd_linear_time_energy_perturbed.

mirnov_time_voltage — Raw or preprocessed Mirnov coil voltage traces. Reference source
Also exported as vaft.plot.mirnov_time_voltage.

ntms_time_delta_prime — Classical tearing index per rational surface, against time. Reference source
Also exported as vaft.plot.ntms_time_delta_prime.

pf_coil_time_current — Per-coil PF current history. Reference source
Also exported as vaft.plot.pf_coil_time_current.

pf_coil_time_current_turns — Per-coil PF current multiplied by the signed turn count (ampere-turns). Reference source
Also exported as vaft.plot.pf_coil_time_current_turns.

plasma_current_time — Measured plasma current history from the Rogowski coil. Reference source
Also exported as vaft.plot.plasma_current_time.

render_line_series

function source
render_line_series(model: LineSeries, *, ax: Axes | None = None, show: bool = False, figsize: tuple[float, float] | None = None, legend: bool | None = None, grid: bool = True, uncertainty: str = 'auto', validity: str = 'show', format: str | None = None, theme: str | None = None, legend_placement: Mapping[str, Any] | None = None, **style: Any) -> tuple[Figure, Axes]

Draw a LineSeries into one axes.

Also exported as vaft.plot.render_line_series, vaft.plot.renderers.render_line_series.

rogowski_coil_time_current — Current measured by each Rogowski coil. Reference source
Also exported as vaft.plot.rogowski_coil_time_current.

soft_x_rays_time_power — Soft X-ray channel signal history. Reference source
Also exported as vaft.plot.soft_x_rays_time_power.

spectrometer_uv_time_intensity — Processed spectral line intensity history. Reference source
Also exported as vaft.plot.spectrometer_uv_time_intensity.

tf_coil_time_b_t — Toroidal field history at the reference radius. Reference source
Also exported as vaft.plot.tf_coil_time_b_t.

tf_coil_time_b_t_vacuum_r — Vacuum toroidal field times major radius (B_t * R). Reference source
Also exported as vaft.plot.tf_coil_time_b_t_vacuum_r.

tf_coil_time_current — TF coil current history. Reference source
Also exported as vaft.plot.tf_coil_time_current.

thomson_scattering_time_electron_density — Per-channel Thomson electron density history. Reference source
Also exported as vaft.plot.thomson_scattering_time_electron_density.

thomson_scattering_time_electron_temperature — Per-channel Thomson electron temperature history. Reference source
Also exported as vaft.plot.thomson_scattering_time_electron_temperature.

vacuum_field_midplane — One vacuum startup quantity along the midplane, at one instant. Reference source
Also exported as vaft.plot.vacuum_field_midplane.

vaft.plot.renderers.panels

Canonical multi-panel renderers.

chease_overview_profile_validity — Physical validity of the refined equilibrium’s profiles. Reference source
Also exported as vaft.plot.chease_overview_profile_validity.

chease_overview_refinement_summary — CHEASE refinement-vs-input comparison, slice by slice. Reference source
Also exported as vaft.plot.chease_overview_refinement_summary.

core_profiles_time_volume_averaged — Volume-averaged core quantity panels on a shared time axis. Reference source
Also exported as vaft.plot.core_profiles_time_volume_averaged.

current_overview — Plasma, PF coil and eddy current panels on a shared time axis. Reference source
Also exported as vaft.plot.current_overview.

current_overview_reconstruction — Plasma, PF and eddy currents in kA, with every reconstructed slice’s I_p. Reference source
Also exported as vaft.plot.current_overview_reconstruction.

diagnostics_overview — Fixed-shape time overview across the diagnostic subjects. Reference source
Also exported as vaft.plot.diagnostics_overview.

equilibrium_overview — Static summary of one representative equilibrium slice (issue #261). Reference source
Also exported as vaft.plot.equilibrium_overview.

equilibrium_overview_constraint_coverage — Constraint channel coverage across the reconstructed time slices. Reference source
Also exported as vaft.plot.equilibrium_overview_constraint_coverage.

equilibrium_overview_constraint_weights — EFIT constraint uncertainties, weights and normalized residuals by family. Reference source
Also exported as vaft.plot.equilibrium_overview_constraint_weights.

equilibrium_overview_constraints — Magnetic constraints submitted to EFIT, by family and channel state. Reference source
Also exported as vaft.plot.equilibrium_overview_constraints.

equilibrium_overview_convergence — EFIT numerical-convergence and self-consistency overview. Reference source
Also exported as vaft.plot.equilibrium_overview_convergence.

equilibrium_overview_fit_quality — EFIT goodness of fit against the uncertainties it was given. Reference source
Also exported as vaft.plot.equilibrium_overview_fit_quality.

equilibrium_overview_histories — The four equilibrium time histories the slice summary replaced. Reference source
Also exported as vaft.plot.equilibrium_overview_histories.

equilibrium_overview_pressure_weight_scan — A pressure-constraint weight scan, entries overlaid. Reference source
Also exported as vaft.plot.equilibrium_overview_pressure_weight_scan.

equilibrium_overview_residuals — EFIT reconstruction residuals by diagnostic family. Reference source
Also exported as vaft.plot.equilibrium_overview_residuals.

equilibrium_overview_verification — Measured-versus-reconstructed EFIT constraints and poloidal flux. Reference source
Also exported as vaft.plot.equilibrium_overview_verification.

equilibrium_time_beta — Poloidal, toroidal and normalized beta panels. Reference source
Also exported as vaft.plot.equilibrium_time_beta.

equilibrium_time_shape — Boundary shape histories, one panel per descriptor. Reference source
Also exported as vaft.plot.equilibrium_time_shape.

equilibrium_time_virial — Virial-estimate equilibrium quantities against the reconstruction. Reference source
Also exported as vaft.plot.equilibrium_time_virial.

impa_overview — IMPA validation overview panels. Reference source
Also exported as vaft.plot.impa_overview.

impurity_profile_charge_state_fraction — Charge-state fractions f_q(rho) of each impurity element. Reference source
Also exported as vaft.plot.impurity_profile_charge_state_fraction.

impurity_profile_composition — Radial Z_eff, <Z>, Z_I,eff and dilution from T_e, n_e through ADF11 charge states. Reference source
Also exported as vaft.plot.impurity_profile_composition.

interferometer_overview — Interferometer overview panels. Reference source
Also exported as vaft.plot.interferometer_overview.

kinetic_overview_profiles — Four cross-diagnostic kinetic profile panels. Reference source
Also exported as vaft.plot.kinetic_overview_profiles.

kinetic_overview_state — One matched kinetic state: pressure, density, temperature and Z_eff panels (issue #1837). Reference source
Also exported as vaft.plot.kinetic_overview_state.

limiter_current_time — Lower-corner, upper-corner and midplane limiter-current histories. Reference source
Also exported as vaft.plot.limiter_current_time.

magnetics_overview — Shot diagnostic overview panels. Reference source
Also exported as vaft.plot.magnetics_overview.

magnetics_overview_plasma_residual — Plasma-signal residual left by the coil+eddy synthetic vacuum response. Reference source
Also exported as vaft.plot.magnetics_overview_plasma_residual.

magnetics_overview_vacuum — Measured against coil-only and coil+eddy synthetic vacuum magnetics. Reference source
Also exported as vaft.plot.magnetics_overview_vacuum.

magnetics_overview_vacuum_benchmark — The vacuum benchmark’s per-channel scores of one shot, channel by channel. Reference source
Also exported as vaft.plot.magnetics_overview_vacuum_benchmark.

mhd_linear_overview_eigenfunction — Displacement and normal perturbed field of the least-stable mode. Reference source
Also exported as vaft.plot.mhd_linear_overview_eigenfunction.

passive_structure_overview_wall_reduction — Reduced-wall convergence per metric and selection rule. Reference source
Also exported as vaft.plot.passive_structure_overview_wall_reduction.

passive_structure_overview_wall_time — Wall-mode decay times per segment. Reference source
Also exported as vaft.plot.passive_structure_overview_wall_time.

render_panels

function source
render_panels(model: Panels, *, ax: Any = None, show: bool = False, figsize: tuple[float, float] | None = None, row_heights: Sequence[float] | None = None, format: str | None = None, theme: str | None = None, **style: Any) -> tuple[Figure, np.ndarray]

Draw each model in a Panels grid into its own axes.

Also exported as vaft.plot.render_panels, vaft.plot.renderers.render_panels.

soft_x_rays_overview — Soft X-ray overview panels. Reference source
Also exported as vaft.plot.soft_x_rays_overview.

spectrometer_uv_time_impurity — Impurity line-intensity panels against plasma current. Reference source
Also exported as vaft.plot.spectrometer_uv_time_impurity.

startup_proxies_time — Vacuum startup proxies at one point against time, shots overlaid. Reference source
Also exported as vaft.plot.startup_proxies_time.

summary_time_energy — Stored-energy comparison panels across available estimates. Reference source
Also exported as vaft.plot.summary_time_energy.

summary_time_power_balance — Ohmic input, radiated and conducted power balance panels. Reference source
Also exported as vaft.plot.summary_time_power_balance.

summary_time_resistive_zeff — Resistive Z_eff history: Romero voltages, observed vs model R_p, window estimate. Reference source
Also exported as vaft.plot.summary_time_resistive_zeff.

summary_time_romero_balance — Romero’s voltage and volt-second balance. Reference source
Also exported as vaft.plot.summary_time_romero_balance.

summary_time_voltage_consumption — Loop-voltage and flux-consumption panels. Reference source
Also exported as vaft.plot.summary_time_voltage_consumption.

vaft.plot.renderers.profiles

Canonical <domain>_profile_<quantity> renderers.

charge_exchange_profile_fit — Charge-exchange points and their fit on a flux coordinate. Reference source
Also exported as vaft.plot.charge_exchange_profile_fit.

charge_exchange_profile_ion_temperature — Charge-exchange ion temperature versus position. Reference source
Also exported as vaft.plot.charge_exchange_profile_ion_temperature.

charge_exchange_profile_velocity_tor — Charge-exchange toroidal rotation versus position. Reference source
Also exported as vaft.plot.charge_exchange_profile_velocity_tor.

coil_3d_profile_current — Non-axisymmetric coil currents against toroidal angle. Reference source
Also exported as vaft.plot.coil_3d_profile_current.

coil_3d_spectrum_current — Toroidal mode content of a non-axisymmetric coil excitation. Reference source
Also exported as vaft.plot.coil_3d_spectrum_current.

core_profiles_profile_zeff — Stored Z_eff(rho), labelled by the origin its record states. Reference source
Also exported as vaft.plot.core_profiles_profile_zeff.

electron_density_profile — Core electron density profile. Reference source
Also exported as vaft.plot.electron_density_profile.

electron_density_profile_gradient — Core electron density gradient; the model carries the values, the label and the record. Reference source
Also exported as vaft.plot.electron_density_profile_gradient.

electron_temperature_profile — Core electron temperature profile. Reference source
Also exported as vaft.plot.electron_temperature_profile.

electron_temperature_profile_gradient — Core electron temperature gradient; the model carries the values, the label and the record. Reference source
Also exported as vaft.plot.electron_temperature_profile_gradient.

equilibrium_profile_f — Equilibrium poloidal current function F = R*B_t. Reference source
Also exported as vaft.plot.equilibrium_profile_f.

equilibrium_profile_ffprime — Equilibrium F dF/dpsi profile. Reference source
Also exported as vaft.plot.equilibrium_profile_ffprime.

equilibrium_profile_j_tor — Equilibrium toroidal current-density profile. Reference source
Also exported as vaft.plot.equilibrium_profile_j_tor.

equilibrium_profile_pprime — Equilibrium dp/dpsi profile. Reference source
Also exported as vaft.plot.equilibrium_profile_pprime.

equilibrium_profile_pressure — Equilibrium 1D pressure profile. Reference source
Also exported as vaft.plot.equilibrium_profile_pressure.

equilibrium_profile_q — Equilibrium safety-factor profile. Reference source
Also exported as vaft.plot.equilibrium_profile_q.

impa_profile_field — IMPA radial profile against the 1/R toroidal-field model. Reference source
Also exported as vaft.plot.impa_profile_field.

ion_temperature_profile — Core ion temperature profile. Reference source
Also exported as vaft.plot.ion_temperature_profile.

ion_temperature_profile_gradient — Core ion temperature gradient; the model carries the values, the label and the record. Reference source
Also exported as vaft.plot.ion_temperature_profile_gradient.

mhd_linear_profile_b_field_perturbed — Normal perturbed field per poloidal harmonic. Reference source
Also exported as vaft.plot.mhd_linear_profile_b_field_perturbed.

mhd_linear_profile_chirikov — Island overlap per rational surface. Reference source
Also exported as vaft.plot.mhd_linear_profile_chirikov.

mhd_linear_profile_displacement — DCON displacement eigenfunction per poloidal harmonic. Reference source
Also exported as vaft.plot.mhd_linear_profile_displacement.

mhd_linear_spectrum_b_field_perturbed — Perturbed normal flux spectrum at one flux surface. Reference source
Also exported as vaft.plot.mhd_linear_spectrum_b_field_perturbed.

render_profile_1d

function source
render_profile_1d(model: Profile1D, *, ax: Axes | None = None, show: bool = False, figsize: tuple[float, float] | None = None, legend: bool | None = None, grid: bool = True, uncertainty: str = 'auto', validity: str = 'show', format: str | None = None, theme: str | None = None, legend_placement: Mapping[str, Any] | None = None, **style: Any) -> tuple[Figure, Axes]

Draw a Profile1D into one axes.

Also exported as vaft.plot.render_profile_1d, vaft.plot.renderers.render_profile_1d.

thermal_pressure_profile — Core total pressure profile. Reference source
Also exported as vaft.plot.thermal_pressure_profile.

thomson_scattering_profile_electron_density — Thomson-scattering electron density versus position. Reference source
Also exported as vaft.plot.thomson_scattering_profile_electron_density.

thomson_scattering_profile_electron_temperature — Thomson-scattering electron temperature versus position. Reference source
Also exported as vaft.plot.thomson_scattering_profile_electron_temperature.

thomson_scattering_profile_fit — Thomson points and their fit on a flux coordinate. Reference source
Also exported as vaft.plot.thomson_scattering_profile_fit.

vaft.plot.renderers.spectra

Canonical <domain>_spectrum[_<quantity>] renderers.

diagnostics_spectrum_coherence — Coherence and relative phase of two fluctuation channels. Reference source
Also exported as vaft.plot.diagnostics_spectrum_coherence.

interferometer_spectrum — Power spectral density of one interferometer channel’s line density. Reference source
Also exported as vaft.plot.interferometer_spectrum.

mirnov_spectrum — Power spectral density of one Mirnov coil signal. Reference source
Also exported as vaft.plot.mirnov_spectrum.

render_power_spectrum

function source
render_power_spectrum(model: PowerSpectrum, *, ax: Axes | None = None, show: bool = False, figsize: tuple[float, float] | None = None, legend: bool = True, format: str | None = None, theme: str | None = None, **style: Any) -> tuple[Figure, Axes]

Draw a PowerSpectrum with its fits, guides and frequency markers.

Also exported as vaft.plot.render_power_spectrum, vaft.plot.renderers.render_power_spectrum.

soft_x_rays_spectrum — Power spectral density of one soft X-ray channel. Reference source
Also exported as vaft.plot.soft_x_rays_spectrum.

vaft.plot.renderers.spectrograms

Canonical <domain>_spectrogram[_<quantity>] renderers.

camera_visible_spectrogram — Time-frequency map of the summed FAST-camera intensity. Reference source
Also exported as vaft.plot.camera_visible_spectrogram.

interferometer_spectrogram — Time-frequency map of one interferometer channel’s line density. Reference source
Also exported as vaft.plot.interferometer_spectrogram.

mirnov_spectrogram — Time-frequency map of one Mirnov coil signal. Reference source
Also exported as vaft.plot.mirnov_spectrogram.

render_spectrogram

function source
render_spectrogram(model: Spectrogram, *, ax: Axes | None = None, show: bool = False, figsize: tuple[float, float] | None = None, colorbar: bool = True, format: str | None = None, theme: str | None = None, **style: Any) -> tuple[Figure, Axes]

Draw a Spectrogram as a time-frequency mesh.

Also exported as vaft.plot.render_spectrogram, vaft.plot.renderers.render_spectrogram.

soft_x_rays_spectrogram — Time-frequency map of one soft X-ray channel. Reference source
Also exported as vaft.plot.soft_x_rays_spectrogram.

vaft.plot.renderers.tables

Renderers of the non-graphical views: tables and text summaries (issue #1180).

equilibrium_table_fit_quality — EFIT goodness of fit at one slice, by constraint family. Reference source
Also exported as vaft.plot.equilibrium_table_fit_quality.

equilibrium_table_summary — The selected equilibrium slice’s global quantities, tabulated. Reference source
Also exported as vaft.plot.equilibrium_table_summary.

equilibrium_table_validation — The validation verdicts of one equilibrium slice, one row per registered check. Reference source
Also exported as vaft.plot.equilibrium_table_validation.

equilibrium_text_summary — The selected equilibrium slice, summarised in text. Reference source
Also exported as vaft.plot.equilibrium_text_summary.

format_quantity

function source
format_quantity(item: TableCell | TextItem) -> tuple[str | None, str]

(text, unit) of one structured value, or (None, "") when it is missing.

magnetics_table_vacuum_benchmark — The vacuum benchmark’s per-channel scores of one shot, one row per channel. Reference source
Also exported as vaft.plot.magnetics_table_vacuum_benchmark.

magnetics_table_vacuum_benchmark_aggregate — The vacuum benchmark across shots, by case, family, excitation and machine era. Reference source
Also exported as vaft.plot.magnetics_table_vacuum_benchmark_aggregate.

render_table

function source
render_table(model: Table, *, show: bool = False) -> RenderedTable

Present a vaft.plot.models.Table; show=True prints it.

Also exported as vaft.plot.render_table.

render_text_summary

function source
render_text_summary(model: TextSummary, *, show: bool = False) -> RenderedTextSummary

Present a vaft.plot.models.TextSummary; show=True prints it.

Also exported as vaft.plot.render_text_summary.

RenderedTable

class source
RenderedTable(model: Any) -> None

A vaft.plot.models.Table, presented.

Also exported as vaft.plot.RenderedTable.

3 members
  • text method — Fixed-width columns, a rule under the header, the caption and notes after. source
  • markdown method — A GitHub-flavoured Markdown table, alignment in the rule row. source
  • html method — An HTML <table>; a status cell carries data-status, never a colour. source

RenderedTextSummary

class source
RenderedTextSummary(model: Any) -> None

A vaft.plot.models.TextSummary, presented.

Also exported as vaft.plot.RenderedTextSummary.

3 members
  • text method — The title, then each section as a heading over aligned label value lines. source
  • markdown method — A heading per section and one list item per line. source
  • html method — A heading per section over a two-column table of label and value. source

TextView

class source
TextView(model: Any) -> None

A rendered non-graphical view: text in a terminal, HTML in a notebook.

5 members
  • text method source
  • markdown method source
  • html method source
  • show method — Print the fixed-width text form. source
  • save method — Write the form path’s extension names; returns path as a string. source

vaft.plot.request

One reproducible description of a figure, rendered or written as code (issue #1421).

DATA_KINDS

data
DATA_KINDS = ('sample', 'file', 'shot')

DataSource

class source
DataSource(kind: str, values: tuple[Any, ...], namespace: str | None = None) -> None

Where the data comes from: kind with one value or several to compare.

Also exported as vaft.plot.DataSource.

3 fields · 4 members
  • kind: str
  • values: tuple[Any, ...]
  • namespace: str | None
  • load method — The ODS (one value) or list of ODS (several) for sample/file. source
  • python method — The expression that loads the data in a script. source
  • to_dict method source
  • from_dict classmethod source

PlotRequest

class source
PlotRequest(source: DataSource, plot: str | None = None, composition: FigureComposition | None = None, options: Mapping[str, Any] = <factory>, format: str | None = None, theme: str | None = None, backend: str | None = None, figure_options: FigureOptions | None = None) -> None

A figure: data, one plot or a composition, presentation and explicit options.

Also exported as vaft.plot.PlotRequest.

8 fields · 5 members
  • source: DataSource
  • plot: str | None
  • composition: FigureComposition | None
  • options: Mapping[str, Any]
  • format: str | None
  • theme: str | None
  • backend: str | None
  • figure_options: FigureOptions | None
  • render method — Draw the figure: (Figure, axes) with Matplotlib, a Plotly figure with Plotly. source
  • to_dict method source
  • from_dict classmethod source
  • to_python method — The script that draws this figure with the ordinary VAFT API. source
  • to_cli method — The vaft plot command that draws (or, with out, writes) this figure. source

vaft.plot.selection

Physical-region classification and the channel-selection vocabulary (#259).

ACTIVE

data
ACTIVE = 'active'

ALL

data
ALL = 'all'

classify_regions

function source
classify_regions(r_values: Sequence[float] | Any, split: 'RadialSplit | None' = None) -> list[str]

Classify each channel of one family as inboard, outboard or neither.

INBOARD

data
INBOARD = 'inboard'

OUTBOARD

data
OUTBOARD = 'outboard'

PRESETS

data
PRESETS = ('inboard', 'outboard', 'inboard_mid', 'outboard_mid', 'active', 'valid', 'all')

radial_divider

function source
radial_divider(r_values: Sequence[float] | Any) -> RadialSplit

Infer one family’s inboard/outboard divider from its own radii.

RadialSplit

class source
RadialSplit(divider: float | None, tolerance: float = 0.0) -> None

The inboard/outboard divider inferred for one diagnostic family.

REGION_PRESETS

data
REGION_PRESETS = ('inboard', 'outboard')

REGIONS

data
REGIONS = ('inboard', 'outboard', 'unclassified')

representative_index

function source
representative_index(z_values: Sequence[float] | Any, candidates: Sequence[int]) -> int | None

The channel of candidates that best represents the midplane.

REPRESENTATIVE_PRESETS

data
REPRESENTATIVE_PRESETS = ('inboard_mid', 'outboard_mid')

SIGNAL_PRESETS

data
SIGNAL_PRESETS = ('active', 'valid', 'all')

UNCLASSIFIED

data
UNCLASSIFIED = 'unclassified'

VALID

data
VALID = 'valid'

vaft.plot.soft_x_rays

Soft X-ray plotting helpers for OMAS soft_x_rays IDS data.

plot_soft_x_ray_los

function source
plot_soft_x_ray_los(ods: Any, channels: Sequence[int] | int | None = None, arrays: Sequence[str] | str | None = None, ax: Any | None = None, show_wall: bool = True, show_channel_labels: bool = False, title: str | None = None, show: bool = True)

Plot SXR line-of-sight endpoints from soft_x_rays.channel metadata.

Also exported as vaft.plot.soft_x_rays.soft_x_rays_los.

plot_soft_x_ray_overview

function source
plot_soft_x_ray_overview(ods: Any, los_arrays: Sequence[str] | str | None = None, signal_channels: Sequence[int] | int | None = None, spectrogram_channel: int = 0, pattern_channels: Sequence[int] | int | None = None, pattern_arrays: Sequence[str] | str | None = None, time_range: tuple[float, float] | None = None, baseline_range: tuple[float, float] | None = None, show: bool = True)

Create a compact 2x2 overview of SXR LOS, signal, spectrogram, and pattern.

Also exported as vaft.plot.soft_x_rays.soft_x_rays_overview.

plot_soft_x_ray_pattern

function source
plot_soft_x_ray_pattern(ods: Any, channels: Sequence[int] | int | None = None, arrays: Sequence[str] | str | None = None, time_range: tuple[float, float] | None = None, baseline_range: tuple[float, float] | None = None, scale: float = 1.0, orientation: str = 'time_vertical', cmap: str = 'turbo', ax: Any | None = None, title: str | None = None, show: bool = True)

Plot SXR brightness as a chord-time heatmap.

Also exported as vaft.plot.soft_x_rays.soft_x_rays_pattern.

plot_soft_x_ray_signal

function source
plot_soft_x_ray_signal(ods: Any, channels: Sequence[int] | int | None = None, arrays: Sequence[str] | str | None = None, time_range: tuple[float, float] | None = None, baseline_range: tuple[float, float] | None = None, scale: float = 1.0, ylabel: str = 'Brightness proxy [a.u.]', ax: Any | None = None, title: str | None = None, show: bool = True)

Plot one or more SXR brightness time traces.

Also exported as vaft.plot.soft_x_rays.soft_x_rays_signal, vaft.plot.soft_x_rays.soft_x_rays_time.

plot_soft_x_ray_spectrogram

function source
plot_soft_x_ray_spectrogram(ods: Any, channel: int = 0, time_range: tuple[float, float] | None = None, baseline_range: tuple[float, float] | None = None, nperseg: int = 1024, noverlap: int | None = None, max_frequency: float | None = 90000.0, log_power: bool = True, ax: Any | None = None, title: str | None = None, show: bool = True)

Plot a single-channel SXR spectrogram.

Also exported as vaft.plot.soft_x_rays.soft_x_rays_spectrogram.

vaft.plot.stability_atlas

Population histograms of the Tier A stability atlas (#1852).

stability_atlas_population

function source
stability_atlas_population(populations, *, ax=None, show: bool = False, figsize=(5.2, 7.0))

The stability atlas population as three stacked histograms.

vaft.plot.style

Figure and axes plumbing shared by every canonical renderer.

apply_legend

function source
apply_legend(axes: Any, *, legend: bool | None, title: str | None = None, lone_entry: bool = False, placement: Mapping[str, Any] | None = None) -> None

Draw, omit, or summarise the legend according to the display policy.

axis_label

function source
axis_label(label: str, unit: str = '') -> str

Compose "Label [unit]", omitting the bracket when there is no unit.

draw_series

function source
draw_series(axes: Any, series: Any, *, uncertainty: str = 'auto', validity: str = 'show', **options: Any) -> bool

Draw one vaft.plot.models.Series, honouring validity and error.

finalize

function source
finalize(figure: Figure, axes: Any, *, show: bool = False, tight_layout: bool = True, pad: float | None = None) -> tuple[Figure, Any]

Apply the shared closing steps and honor the show contract.

resolve_axes

function source
resolve_axes(ax: Axes | Sequence[Axes] | np.ndarray | None, *, nrows: int = 1, ncols: int = 1, figsize: tuple[float, float] | None = None, sharex: bool = False, sharey: bool = False, squeeze: bool = True, gridspec_kw: dict[str, Any] | None = None) -> tuple[Figure, Any]

Return (figure, axes) for a renderer.

save_figure

function source
save_figure(figure: Figure, path: Any, *, close: bool = True, figure_options: Any = None, **savefig_kwargs: Any)

Write figure to path and release it.

Also exported as vaft.plot.save_figure.

trace_labels

function source
trace_labels(series_list, *, panel_title: str | None = None) -> tuple[list[str], str | None]

Legend text for each trace, and a legend title, from structured identity.

UNCERTAINTY_MODES

data
UNCERTAINTY_MODES = ('auto', 'band', 'errorbar', 'none')

VALIDITY_MODES

data
VALIDITY_MODES = ('show', 'mask', 'ignore')

vaft.plot.taxonomy

Canonical physical-subject vocabulary for VAFT plotting (issue #251).

CANONICAL_QUANTITIES

data
CANONICAL_QUANTITIES = frozenset({'b_t', 'beta_n', 'beta_p', 'beta_t', 'elongation', 'energy_confinement_time', 'estimated_q95', 'greenwald_...

FAMILIES

data
FAMILIES = <builtins.dict>

QUANTITY_ALIASES

data
QUANTITY_ALIASES = <builtins.dict>

QuantityFamily

class source
QuantityFamily(name: str, members: tuple[str, ...], aliases: tuple[str, ...] = ()) -> None

A named group of distinct but closely related canonical quantities.

3 fields
  • name: str
  • members: tuple[str, ...]
  • aliases: tuple[str, ...]

resolve_family

function source
resolve_family(term: str) -> QuantityFamily

Return the QuantityFamily for a family name or family alias.

resolve_quantity

function source
resolve_quantity(term: str) -> str

Return the canonical quantity name for term (name or strict alias).

resolve_subject

function source
resolve_subject(term: str) -> Subject

Return the Subject for a canonical name or strict alias.

Subject

class source
Subject(name: str, kind: str, aliases: tuple[str, ...] = ()) -> None

One canonical plotting subject and its strict aliases.

3 fields
  • name: str
  • kind: str
  • aliases: tuple[str, ...]

subject_names

function source
subject_names() -> tuple[str, ...]

Return every canonical subject name, sorted.

SUBJECTS

data
SUBJECTS = <builtins.dict>

vaft.plot.topview

Top-view plotting wrappers backed by OMAS geometry renderers.

ec_launchers_CX_topview

function source
ec_launchers_CX_topview(ods, *, time_index=None, time=None, ax=None, show=True, **kwargs)

Plot electron-cyclotron launcher geometry in a machine top view.

Also exported as vaft.plot.topview.plot_ec_launchers_CX_topview.

equilibrium_CX_topview

function source
equilibrium_CX_topview(ods, *, time_index=None, time=None, ax=None, show=True, **kwargs)

Plot the equilibrium cross-section in a machine top view.

Also exported as vaft.plot.topview.plot_equilibrium_CX_topview.

lh_antennas_CX_topview

function source
lh_antennas_CX_topview(ods, *, time_index=None, time=None, ax=None, show=True, **kwargs)

Plot lower-hybrid antenna geometry in a machine top view.

Also exported as vaft.plot.topview.plot_lh_antennas_CX_topview.

pellets_trajectory_CX_topview

function source
pellets_trajectory_CX_topview(ods, *, time_index=None, time=None, ax=None, show=True, **kwargs)

Plot pellet trajectories in a machine top view.

Also exported as vaft.plot.topview.plot_pellets_trajectory_CX_topview.

plot_topview

function source
plot_topview(ods, *, time_index=None, time=None, layers=None, ax=None, show=True, figsize=(7, 7), **kwargs)

Overlay each requested top-view layer that is present in ods.

vaft.plot.transport_atlas

Renderers for the (shot, t, rho) transport atlas table (#1427).

axis_label

function source
axis_label(column: str) -> str

<symbol> [<unit>] for an atlas column; the bare name when it has no symbol.

LABELS

data
LABELS = <builtins.dict>

transport_atlas_mode_branch

function source
transport_atlas_mode_branch(table: pd.DataFrame, *, x: str = 'a_over_lne', y: str = 'a_over_lte', ax=None, show: bool = False)

Drive plane coloured by the direction of the fastest-growing ion-scale mode.

transport_atlas_scatter

function source
transport_atlas_scatter(table: pd.DataFrame, x: str, y: str, color: Optional[str] = None, *, where: Optional[Callable[[pd.DataFrame], Any]] = None, symlog: bool = False, cmap: str = 'viridis', ax=None, show: bool = False)

Scatter two atlas columns, coloured by a third.

vaft.plot.utils

Deprecated helpers kept for the vaft.plot compatibility window.

extract_labels_from_odc

function source
extract_labels_from_odc(odc: Any, opt: str = 'shot') -> list[str]

Return one label per ODC entry.

get_from_path

function source
get_from_path(obj: Any, path: str) -> Any

Read a dotted a.b.c path out of a dict-like or attribute-like object.

Modules without a declared public surface

These modules declare no __all__, so this reference cannot tell what they publish and lists nothing from them (docs/api_inventory.yml). Some are reached through a package that re-exports and declares them – vaft.omas publishes the functions of the wrapper modules it star-imports, under vaft.omas above – and the rest are described in the hand-written guides until they declare one: vaft.plot.analysis, vaft.plot.backend, vaft.plot.backend.convention, vaft.plot.history, vaft.plot.mirnov, vaft.plot.onedim, vaft.plot.profile, vaft.plot.time, vaft.plot.twodim.

results matching ""

    No results matching ""