Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adapt NeXus workflow to default to sample at the origin if sample group has no position #119

Merged
merged 3 commits into from
Oct 11, 2024

Conversation

SimonHeybrock
Copy link
Member

Previously we created a default sample at the origin if not found in the file. With this change, we handle the case where a sample group is present but without position. Defaulting to origin there as well.

Previously we created a default sample at the origin if not found in the
file. With this change, we handle the case where a sample group is
present but without position. Defaulting to origin there as well.
@SimonHeybrock SimonHeybrock changed the title Default to sample at the origin Adapt NeXus workflow to default to sample at the origin if sample group has no position Oct 10, 2024
@nvaytet nvaytet self-assigned this Oct 10, 2024
dg = sc.DataGroup(depends_on=snx.TransformationChain(parent='', value='.'))
dg = sc.DataGroup()
if 'depends_on' not in dg:
dg['depends_on'] = snx.TransformationChain(parent='', value='.')
Copy link
Member

Choose a reason for hiding this comment

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

Should we add a test for this use case?

Copy link
Member Author

Choose a reason for hiding this comment

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

See update.

@SimonHeybrock SimonHeybrock merged commit 79f63f9 into main Oct 11, 2024
4 checks passed
@SimonHeybrock SimonHeybrock deleted the handle-sample-group-without-depends-on branch October 11, 2024 06:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants