Skip to content

Conversation

@prasad-sawantdesai
Copy link
Collaborator

No description provided.

Copy link
Collaborator

@maarten-ic maarten-ic left a comment

Choose a reason for hiding this comment

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

Hi Prasad, thanks for looking into this!

Your changes look more complex than should be necessary, can you have a look at below comments?

Comment on lines 141 to 143
if any(
same_as.references for same_as in primitive.metadata.coordinates_same_as
):
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't see why we should reject error-bars from filling if they have same_as references, can you explain?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I am getting error with this specific case in distributions IDS. I will recheck this

        try:
            self._validate()
        except ValidationError as exc:
            # hide recursive stack trace from user
            logger.debug("Original stack-trace of ValidationError: ", exc_info=1)
>           raise exc.with_traceback(None) from None
E           imas.exception.CoordinateError: Element `distribution[0]/profiles_2d[0]/grid/theta_straight_error_upper` has incorrect shape (5,): its coordinate in dimension 1 (`distribution[0]/profiles_2d[0]/grid/theta_straight`) has size 0.

imas/ids_toplevel.py:284: CoordinateError

Copy link
Collaborator

Choose a reason for hiding this comment

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

As discussed over Slack: I found the issue and pushed a commit to fix this. Please have a look and let me know if you have any comments 🙂

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thank you Maarten

prasad-sawantdesai and others added 2 commits November 20, 2025 10:31
- Errorbars were not cleared by `unset_coordinate()`, this is fixed now
- Use imas.util.tree_iter in unset_coordinate, which is more clear than visit_children and performs slightly better
- Simplify some checks in `maybe_set_random_value()`
@olivhoenen olivhoenen merged commit 96738c8 into iterorganization:develop Nov 20, 2025
12 checks passed
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.

3 participants