OMAS plot examplesΒΆ

This example loads some data from S3, augments the ODS with pressure information, and generates some plots

Traceback (most recent call last):
  File "/Users/meneghini/Coding/atom/omas/omas/examples/plot_omas.py", line 13, in <module>
    ods = load_omas_s3('OMFITprofiles_sample', user='omas_shared')
  File "/Users/meneghini/Coding/atom/omas/omas/omas_s3.py", line 131, in load_omas_s3
    remote_uri(_base_S3_uri(user) + filename, os.path.abspath(tmp_dir) + os.sep + os.sep + os.path.split(filename)[1], 'down')
  File "/Users/meneghini/Coding/atom/omas/omas/omas_s3.py", line 64, in remote_uri
    obj.download_file(filename, Config=TransferConfig(use_threads=False))
  File "/Users/meneghini/Coding/atom/mambaforge/lib/python3.10/site-packages/boto3/s3/inject.py", line 359, in object_download_file
    return self.meta.client.download_file(
  File "/Users/meneghini/Coding/atom/mambaforge/lib/python3.10/site-packages/boto3/s3/inject.py", line 190, in download_file
    return transfer.download_file(
  File "/Users/meneghini/Coding/atom/mambaforge/lib/python3.10/site-packages/boto3/s3/transfer.py", line 326, in download_file
    future.result()
  File "/Users/meneghini/Coding/atom/mambaforge/lib/python3.10/site-packages/s3transfer/futures.py", line 103, in result
    return self._coordinator.result()
  File "/Users/meneghini/Coding/atom/mambaforge/lib/python3.10/site-packages/s3transfer/futures.py", line 266, in result
    raise self._exception
  File "/Users/meneghini/Coding/atom/mambaforge/lib/python3.10/site-packages/s3transfer/tasks.py", line 269, in _main
    self._submit(transfer_future=transfer_future, **kwargs)
  File "/Users/meneghini/Coding/atom/mambaforge/lib/python3.10/site-packages/s3transfer/download.py", line 354, in _submit
    response = client.head_object(
  File "/Users/meneghini/Coding/atom/mambaforge/lib/python3.10/site-packages/botocore/client.py", line 530, in _api_call
    return self._make_api_call(operation_name, kwargs)
  File "/Users/meneghini/Coding/atom/mambaforge/lib/python3.10/site-packages/botocore/client.py", line 947, in _make_api_call
    http, parsed_response = self._make_request(
  File "/Users/meneghini/Coding/atom/mambaforge/lib/python3.10/site-packages/botocore/client.py", line 970, in _make_request
    return self._endpoint.make_request(operation_model, request_dict)
  File "/Users/meneghini/Coding/atom/mambaforge/lib/python3.10/site-packages/botocore/endpoint.py", line 119, in make_request
    return self._send_request(request_dict, operation_model)
  File "/Users/meneghini/Coding/atom/mambaforge/lib/python3.10/site-packages/botocore/endpoint.py", line 198, in _send_request
    request = self.create_request(request_dict, operation_model)
  File "/Users/meneghini/Coding/atom/mambaforge/lib/python3.10/site-packages/botocore/endpoint.py", line 134, in create_request
    self._event_emitter.emit(
  File "/Users/meneghini/Coding/atom/mambaforge/lib/python3.10/site-packages/botocore/hooks.py", line 412, in emit
    return self._emitter.emit(aliased_event_name, **kwargs)
  File "/Users/meneghini/Coding/atom/mambaforge/lib/python3.10/site-packages/botocore/hooks.py", line 256, in emit
    return self._emit(event_name, kwargs)
  File "/Users/meneghini/Coding/atom/mambaforge/lib/python3.10/site-packages/botocore/hooks.py", line 239, in _emit
    response = handler(**kwargs)
  File "/Users/meneghini/Coding/atom/mambaforge/lib/python3.10/site-packages/botocore/signers.py", line 105, in handler
    return self.sign(operation_name, request)
  File "/Users/meneghini/Coding/atom/mambaforge/lib/python3.10/site-packages/botocore/signers.py", line 189, in sign
    auth.add_auth(request)
  File "/Users/meneghini/Coding/atom/mambaforge/lib/python3.10/site-packages/botocore/auth.py", line 418, in add_auth
    raise NoCredentialsError()
botocore.exceptions.NoCredentialsError: Unable to locate credentials

from matplotlib import pyplot
from omas import *

# load some data from S3
ods = load_omas_s3('OMFITprofiles_sample', user='omas_shared')

# augment ODS with pressure information
ods.physics_core_profiles_pressures()

# omas plot for pressures
ods.plot_core_profiles_pressures()
pyplot.show()

# omas plot for core profiles
ods.plot_core_profiles_summary()
pyplot.show()

# omas plot for equilibrium
omas_plot.equilibrium_summary(ods, linewidth=1, label='my equilibrium')
pyplot.show()

# omas plot for transport fluxes
ods = ODS().sample(5)
ods.plot_core_transport_fluxes()
pyplot.show()

Gallery generated by Sphinx-Gallery