Skip to content

New functions #109

@coldfix

Description

@coldfix

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions