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

New functions #109

Open
4 tasks
coldfix opened this issue Jun 2, 2022 · 0 comments
Open
4 tasks

New functions #109

coldfix opened this issue Jun 2, 2022 · 0 comments

Comments

@coldfix
Copy link
Member

coldfix commented Jun 2, 2022

Noting this down before I forget: From last discussion with @rdemaria , I think the following functions would be useful:

  • Madx.call_in_process(func, *args, **kwargs), calls the given callable in the MAD-X process and transfers back the result. For a start pickle can be used to transfer over the stuff. Long-term something that can also deal with closures may be desirable.
  • libmadx.select_by_type(sequence_name, elem_type) iterates (in C) through the sequence and returns list of element indices that match given type(s)
  • libmadx.select_element_data(sequence_name, element_indices, field_name) retrieves (in C) the requested field(s) from all selected elements

Later on:

  • provide more low level bindings to all MAD-X types that can be used for very fast access within the MAD-X subprocess
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

No branches or pull requests

1 participant