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

Feature update interface #1

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from
Draft

Feature update interface #1

wants to merge 11 commits into from

Conversation

lgiacome
Copy link
Collaborator

@lgiacome lgiacome commented Jun 20, 2024

Description

Originally opened by Eskil Vik in the gitlab repo: https://gitlab.cern.ch/IRIS/pywit/-/merge_requests/25

I upload this now as I am going on vacation for some weeks, and the work in progress might be of interest before I return. Anyone can feel free to take over the MR and finish the feature.
This is a draft of how conversion from impedances to wakes can be implemented in pywit, using the neffint package. Note that at this depends on Pull Request 4 in the neffint repository, which at the time of writing is not merged yet.
The neffint package provides functions to perform fourier integration on of a function over an array of non-equidistantly spaced frequencies. The package works best when supplied with a frequency array which catches all important features of the function to integrate (in this case the impedance). The existing procedure for discretizing the frequency array found in wake_to_array and impedance_to_array is therefore reused here, as they have the possibility to define regions of interest. To this end, those functions were slightly refactored as well.
There is also an upcoming feature in neffint to implement the adaptive procedure for finding frequencies used in IW2D. Rudimentary testing with this method shows however that it works best when it given an already decent frequency grid as a starting point. I therefore expect that if we implement that in pywit, it will be very similar to what is done here for the fixed grid, only that there will be an extra step to refine the frequency grid with the adaptive method.
I should mention that I have done very little testing of the suggested changes, and before merge pytests, docstring, etc. would have to be added.

Checklist

Mandatory:

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

Optional:

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

@lgiacome lgiacome marked this pull request as draft June 20, 2024 09:08
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.

1 participant