OMAS users API documentation

Following are the classes/routines that are directly available to users within the omas library namespace

OMAS data class

omas.ODC(*args, **kw)

OMAS Data Collection class

omas.ODS([imas_version, consistency_check, ...])

OMAS Data Structure class

omas.ODX([DS])

OMAS data xarray class

Functions

omas.browse_imas([user, pretty, quiet, ...])

Browse available IMAS data (machine/pulse/run) for given user

omas.cocos_transform(cocosin_index, ...)

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

omas.codeparams_xml_load(f)

Decorator function to be used around the omas_load_XXX methods to enable loading of code.parameters from an XML string

omas.codeparams_xml_save(f)

Decorator function to be used around the omas_save_XXX methods to enable saving of code.parameters as an XML string

omas.define_cocos(cocos_ind)

Returns dictionary with COCOS coefficients given a COCOS index

omas.del_omas_s3(filename[, user])

Delete an OMAS object from S3

omas.different_ods(ods1, ods2[, ...])

Checks if two ODSs have any difference and returns the string with the cause of the different

omas.get_actor_io_ids(filename)

Parse IMAS Python actor script and return actor input and output IDSs

omas.get_plot_scale_and_unit(phys_quant[, ...])

Returns normalizing scale for a physical quantity.

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

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

omas.list_omas_s3([user])

List S3 content

omas.load_omas_ascii(filename[, machine, ...])

Load an ODS from ASCII (follows IMAS ASCII_BACKEND convention)

omas.load_omas_ds(filename[, consistency_check])

Load ODS from xarray dataset

omas.load_omas_dx(filename[, consistency_check])

Load ODX from xarray dataset

omas.load_omas_h5(filename[, ...])

Load ODS or ODC from HDF5

omas.load_omas_hdc(hdc[, consistency_check])

Convert HDC data structure to OMAS

omas.load_omas_imas([user, machine, pulse, ...])

Load OMAS data from IMAS

omas.load_omas_iter_scenario(pulse[, run, ...])

Load ODS from ITER IMAS scenario database

omas.load_omas_json(filename[, ...])

Load ODS or ODC from Json

omas.load_omas_machine(machine, pulse[, ...])

omas.load_omas_mongo(find, collection[, ...])

Load an ODS from MongoDB

omas.load_omas_nc(filename[, ...])

Load ODS or ODC from NetCDF file

omas.load_omas_pkl(filename[, ...])

Load ODS or ODC from Python pickle

omas.load_omas_s3(filename[, user, ...])

Download an OMAS object from S3 and read it as pickle

omas.machine_mapping_function(...)

Decorator used to identify machine mapping functions

omas.machine_mappings(machine, branch[, ...])

Function to load the json mapping files (local or remote) Allows for merging external mapping rules defined by users.

omas.machines([machine, branch])

Function to get machines that have their mappings defined This function takes care of remote transfer the needed files (both .json and .py) if a remote branch is requested

omas.ods_2_odx(ods[, homogeneous])

Map ODS to an ODX

omas.ods_sample([ntimes])

Returns an ODS populated with all of the samples

omas.odx_2_ods(odx[, consistency_check])

Map ODX to ODS

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

Provides environment for data input/output to/from OMAS

omas.omas_info([structures, ...])

This function returns an ods with the leaf nodes filled with their property informations

omas.omas_info_node(key[, imas_version])

return information about a given node

omas.omas_testdir([filename_topic])

Return path to temporary folder where OMAS TEST file are saved/loaded

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

omas.rcparams_environment(**kw)

omas.save_omas_ascii(ods, filename[, ...])

Save an ODS to ASCII (follows IMAS ASCII_BACKEND convention)

omas.save_omas_ds(ods, filename)

Save an ODS to xarray dataset

omas.save_omas_dx(odx, filename)

Save an ODX to xarray dataset

omas.save_omas_h5(ods, filename)

Save an ODS to HDF5

omas.save_omas_hdc(ods)

Convert OMAS data structure to HDC

omas.save_omas_imas(ods, *args, **kwargs)

omas.save_omas_json(ods, filename[, ...])

Save an ODS to Json

omas.save_omas_mongo(ods, collection[, ...])

Save an ODS to MongoDB

omas.save_omas_nc(ods, filename, **kw)

Save an ODS to NetCDF file

omas.save_omas_pkl(ods, filename, **kw)

Save ODS to Python pickle

omas.save_omas_s3(ods, filename[, user, tmp_dir])

Save an OMAS object to pickle and upload it to S3

omas.search_in_array_structure(ods, conditions)

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

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

omas.test_machine_mapping_functions(machine, ...)

Function used to test python mapping functions

omas.through_omas_ascii(ods[, method, ...])

Test save and load OMAS ASCII

omas.through_omas_ds(ods[, method])

Test save and load ODS via xarray file format

omas.through_omas_dx(odx[, method])

Test save and load OMAS data xarray via xarray file format

omas.through_omas_h5(ods[, method])

Test save and load OMAS HDF5

omas.through_omas_hdc(ods[, method])

Test save and load HDC

omas.through_omas_imas(ods[, method])

Test save and load OMAS IMAS

omas.through_omas_json(ods[, method])

Test save and load OMAS Json

omas.through_omas_mongo(ods[, method])

Test save and load OMAS MongoDB

omas.through_omas_nc(ods[, method])

Test save and load NetCDF

omas.through_omas_pkl(ods)

Test save and load Python pickle

omas.through_omas_s3(ods[, method])

Test save and load S3

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

Misc

omas.CodeParameters([string])

Class used to interface with IMAS code-parameters XML files

omas.OmasDynamicException

Exception raised when dynamic data fetching fails

omas.__version__

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

omas.imas_versions

Dictionary with list of IMAS version and their sub-folder name in the imas_json_dir

omas.latest_imas_version

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

omas.latexit

omas.machine_expression_types

Built-in mutable sequence.

omas.mdstree(server, treename, pulse)

Class to handle the structure of an MDS+ tree.

omas.mdsvalue(server, treename, pulse, TDI)

Execute MDS+ TDI functions

omas.omas_dir

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

omas.omas_rcparams

dictionary of parameters that control how OMAS operates

Modules

omas.omas_physics

physics-based ODS methods and utilities

omas.omas_plot

plotting ODS methods and utilities

omas.omas_sample

sample ODS methods and utilities

omas.omas_structure

functions for handling IMAS XML data dictionaries