Skip to content

Conversation

@maarten-ic
Copy link
Collaborator

This Pull Request adds the functionality to directly convert (part of) an IDS to an Xarray Dataset: imas.util.to_xarray.

Copy link
Collaborator

@olivhoenen olivhoenen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works well!
But a minor improvement of the docstring would help the users IMO.

In this lesson you will create a ``DataArray`` manually. In a future version of
IMAS-Python we plan to include functionality that will automatically do this for you.
That should further simplify working with data inside IDSs.
This lesson was written before :py:func:`imas.util.to_xarray` was
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there still value in keeping this lesson if it's completely superceded by the new capabilities introduced by this PR?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some of the examples can still be useful for people, so I would not remove it: there's some practical use cases for accessing IDS metadata, and some examples for working with IMAS data in Xarray Datasets.

@olivhoenen olivhoenen merged commit dffeac7 into iterorganization:develop Mar 13, 2025
5 checks passed
@maarten-ic maarten-ic deleted the feature/to-xarray branch March 14, 2025 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants