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

Add time-dependent noise handling inside C implementation of Elens beam element #562

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

carlidel
Copy link

@carlidel carlidel commented Dec 3, 2024

Description

As HEL require fast testing with different noise patterns, it is of interest to implement directly in the C code the possibility of handling a time-dependent noise array, representing different realization/operation patterns of HEL.

The code simply implements a float array in the xobjects buffer that the C code then reads depending on the particle at_turn value. Different modes for handling out-of-lenght indexes have been implemented.

A consistency check has been performed. If you think it is of interest, I can include it in the test files.

I have updated the HEL docstring accordingly.

Checklist

Mandatory:

  • [ X ] I have added tests to cover my changes
  • [ X ] All the tests are passing, including my new ones
  • [ X ] I described my changes in this PR description

Optional:

  • [ X ] The code I wrote follows good style practices (see PEP 8 and PEP 20).
  • [ X ] I have updated the docs in relation to my changes, if applicable
  • [ X ] I have tested also GPU contexts

@carlidel carlidel marked this pull request as ready for review December 3, 2024 15:39
@giadarol
Copy link
Member

giadarol commented Dec 6, 2024

Thank you! Would be nice to have a test added....

@carlidel
Copy link
Author

carlidel commented Dec 9, 2024

Thanks! Sorry for the delay, I composed a simple test to check the self-consistency of the noise patterns. Of course the previous elens tests are all still compatible with this addition.

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.

2 participants