omas.omas_physics

physics-based ODS methods and utilities


Functions

add_to__ALL__(f)

add_to__ODS__(f)

anything wrapped here will be available as a ODS method with name 'physics_'+f.__name__

cache_interpolator(cache, time_index, ...)

Utility function for equilibrium_profiles_2d_map.

check_iter_scenario_requirements(ods)

Check that the current ODS satisfies the ITER scenario database requirements as defined in https://confluence.iter.org/x/kQqOE

cocos_transform(cocosin_index, cocosout_index)

Returns a dictionary with coefficients for how various quantities should get multiplied in order to go from cocosin_index to cocosout_index

consistent_times(ods[, attempt_fix, ...])

Assign .time and .ids_properties.homogeneous_time info for top-level structures since these are required for writing an IDS to IMAS

core_profiles_consistent(ods[, update, ...])

Calls all core_profiles consistency functions including

core_profiles_currents(ods[, time_index, ...])

This function sets currents in ods['core_profiles']['profiles_1d'][time_index]

core_profiles_densities(ods[, update, ...])

Density, density_thermal, and density_fast for electrons and ions are filled and are self-consistent

core_profiles_pressures(ods[, update])

Calculates individual ions pressures

core_profiles_zeff(ods[, update, ...])

calculates effective charge

core_sources_j_parallel_sum(ods[, time_index])

ods function used to sum all j_parallel contributions from core_sources (j_actuator)

create_scatter_interpolator(r, z, data[, ...])

Create an interpolator for scattered data points.

current_from_eq(ods, time_index)

This function sets the currents in ods['core_profiles']['profiles_1d'][time_index] using ods['equilibrium']['time_slice'][time_index]['profiles_1d']['j_tor']

define_cocos(cocos_ind)

Returns dictionary with COCOS coefficients given a COCOS index

delete_ggd(ods[, ds])

delete all .ggd and .grids_ggd entries

derive_equilibrium_profiles_2d_quantity(ods, ...)

This function derives values of empty fields in prpfiles_2d from other parameters in the equilibrium ods Currently only the magnetic field components are supported

equilibrium_consistent(ods)

Calculate missing derived quantities for equilibrium IDS

equilibrium_form_constraints(ods[, times, ...])

generate equilibrium constraints from experimental data in ODS

equilibrium_ggd_to_rectangular(ods[, ...])

Convert GGD data to profiles 2D

equilibrium_profiles_2d_map(ods, time_index, ...)

This routines creates interpolators for quantities and stores them in the cache for future use.

equilibrium_stored_energy(ods[, update])

Calculate MHD stored energy from equilibrium pressure and volume

equilibrium_transpose_RZ(ods[, flip_dims])

Transpose 2D grid values for RZ grids under equilibrium.time_slice.:.profiles_2d.:.

generate_cocos_signals([structures, ...])

This is a utility function for generating the omas_cocos.py Python file

grids_ggd_points_triangles(grid)

Return points and triangles in grids_ggd structure

identify_cocos(B0, Ip, q, psi[, ...])

Utility function to identify COCOS coordinate system If multiple COCOS are possible, then all are returned.

imas_info(ods)

add ids_properties.version_put.

magnetics_sanitize(ods[, remove_bpol_probe])

Take data in legacy magnetics.bpol_probe and store it in current magnetics.b_field_pol_probe and magnetics.b_field_tor_probe

map_flux_coordinate_to_pol_flux(ods, ...)

Maps from one magnetic coordinate system to psi :param ods: input ods

map_pol_flux_to_flux_coordinate(ods, ...)

omas_environment(ods[, cocosio, coordsio, ...])

Provides environment for data input/output to/from OMAS

preprocess_ods(*require[, require_mode])

Decorator function that:

probe_endpoints(r0, z0, a0, l0, cocos)

Transform r,z,a,l arrays commonly used to describe poloidal magnetic probes geometry to actual r,z coordinates of the end-points of the probes.

remap_flux_coordinates(ods, time_index, ...)

Maps from one magnetic coordinate system to another.

remove_integrator_drift(time, data, ...)

resolve_equilibrium_profiles_2d_grid_index(...)

Convenience function to identify which of profiles_2d[:].grid_type.index matches the specified grid_identifier

scatter_to_rectangular(r, z, data, R, Z[, ...])

Interpolate scattered data points to rectangular grid

search_in_array_structure(ods, conditions[, ...])

search for the index in an array structure that matches some conditions

search_ion(ion_ods[, label, Z, A, ...])

utility function used to identify the ion number and element numbers given the ion label and or their Z and/or A

summary_consistent_global_quantities(ods[, ...])

Generate summary.global_quantities from global_quantities of other IDSs

summary_currents(ods[, time_index, update])

Calculatess plasma currents from core_profiles for each time slice and stores them in the summary ods

summary_global_quantities(ods[, update])

Calculates global quantities for each time slice and stores them in the summary ods:

summary_greenwald(ods[, update])

Calculates Greenwald Fraction for each time slice and stores them in the summary ods.

summary_heating_power(ods[, update])

Integrate power densities to the total and heating and current drive systems and fills summary.global_quantities

summary_lineaverage_density(ods[, ...])

Calculates line-average electron density for each time slice and stores them in the summary ods

summary_taue(ods[, thermal, update])

Calculates Energy confinement time estimated from the IPB98(y,2) scaling for each time slice and stores them in the summary ods

summary_thermal_stored_energy(ods[, update])

Calculates the stored energy based on the contents of core_profiles for all time-slices

transform_current(rho[, JtoR, JparB, ...])

Given <Jt/R> returns <J.B>, or vice versa Transformation obeys <J.B> = (1/f)*(<B^2>/<1/R^2>)*(<Jt/R> + dp/dpsi*(1 - f^2*<1/R^2>/<B^2>)) N.B.

wall_add(ods[, machine])

Add wall information to the ODS

Classes

CocosSignals()

ScatterInterpolator(interpolant, method)

Interface class for a unified call function for the scipy interpolators:

constants()