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

Test setting fields from a Phantom @view #412

Closed
pvillacorta opened this issue Jun 18, 2024 · 0 comments · Fixed by #523
Closed

Test setting fields from a Phantom @view #412

pvillacorta opened this issue Jun 18, 2024 · 0 comments · Fixed by #523

Comments

@pvillacorta
Copy link
Collaborator

pvillacorta commented Jun 18, 2024

phantom = ...
phantom_view = @view(phantom[p])
phantom_view.param .= 0.0
@test phantom_view.param == phantom[p].param

EDIT 2025/12/01:
This is more difficult to implement with the motion field, which is why this:

@view(phantom[1:100]).motion = Translate(0.0, 0.0, 0.1, TimeRange(0.0, 1.0))

Does not work. What needs to be done in that case is:

phantom.motion = Translate(0.0, 0.0, 0.1, TimeRange(0.0, 1.0), SpinRange(1:100))
@pvillacorta pvillacorta linked a pull request Dec 11, 2024 that will close this issue
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 a pull request may close this issue.

1 participant