-
Notifications
You must be signed in to change notification settings - Fork 29
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 interface to tracking functions #608
Conversation
@swhite2401
|
Thanks @lfarv for the feedback, concerning test this was a bit of a dilemma: I do not want to integrate deprecated functions in the test (see discussion in #601). For me it makes no sense, so test should be modified to call 'active' functions, that are in any case called by the old ones... Then I hesitated between the new interface and the I agree about the release, this also gives time to review this one properly. |
It's different: we may decide that deprecated functions will not be upgraded any more, but still make sure that they work correctly. New code and access to new functionalities need a switch to the new interface, but existing code must still run ! The tests are the only way to guarantee this ! |
Ok, I agree, but then we should provide only minimal testing for old functions: just make sure that results are identical to the new ones. Otherwise we have to duplicate all tests for all/new functions... this does not make much sense to me since one is calling the other... |
I have parametrized all tests to include ALL functions, the overhead is not so large so this fine |
@swhite2401: |
I think I have fixed everything, is this ok now? |
I think so ! |
@swhite2401 I have run the same test to calculate a diffussion map and it run without errors. |
I am ready to merge, should I wait for another approval? |
Go on, everything is OK ! |
Following #568 , adding a test that track_function does not modify its input parameters would be nice. |
I have added a test of |
@swhite2401: it seems that in internal_epass(elem, in_mat, **kwargs) |
Done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once more ! And last one I hope.
I hope as well! I leave up for comments until the end of the week in case |
@lfarv can you re-approve? I had to resolve conflicts with the master... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I can approve again !
This PR proposes to refactor the pyAT tracking functions, presently we have
element_pass
to track through a single elementlattice_pass
to track through a sequence of elementspatpass
to track through a a sequence of elements using python multiprocessingAll these functions are used in internal pyAT basic functionalities such as orbit search or optics calculations.This has several drawbacks:
This PR proposes to refactor the tracking function as follows:
All existing functions remain valid and usable as before but are moved to the
deprecated
module: they will therefore not be update with future developmentsPresently a minimal set of output is provided (some may not be so useful while others could be added) as an example. With the new implementation it is however possible to add outputs or post processing steps without changing the interface or affecting other pyAT functions.
`