8000 Handle TbtData objects as input files by Mael-Le-Garrec · Pull Request #512 · pylhc/omc3 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Handle TbtData objects as input files #512

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

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

Mael-Le-Garrec
Copy link
Contributor
@Mael-Le-Garrec Mael-Le-Garrec commented May 13, 2025

Now that XSuite exists, it's possible to run tracking simulations directly in python. Using harpy requires to create a TbtData object and write an SDDS.
This PR skips the SDDS writing step, as now TbtData objects can be loaded directly.

Harpy's logic was to use the filename to determine the output, a new argument tbt_name is introduced for the user to choose the name of the output.

2025-05-13_11-35-42


2025-05-13_11-37-03

@Mael-Le-Garrec Mael-Le-Garrec added Type: Feature A (suggetion for a) new feature or enhancement in functionality. Priority: Medium Work on this. labels May 13, 2025
Copy link
codeclimate bot commented May 13, 2025

Code Climate has analyzed commit 31ea6e3 and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 95.0% (50% is the threshold).

This pull request will bring the total coverage in the repository to 85.7% (0.0% change).

View more on Code Climate.

@JoschD
Copy link
Member
JoschD commented May 13, 2025

I was thinking that we could possibly add an optional file, info, name or source attribute to the TbTData class (that we might as well even set automatically in the reader for whoever wants to use it for other things, but that's not neccessay for this to work here). And then we could skip the tbt_name argument here and say "try this attribute, if this is not set, use str(files) as before". That way you can just set the name manually directly at the object, keep better track of it and we do not have an additional argument to hio. But that's just an idea, might have downsides that I don't see at the moment (apart from having to also update the tbt package).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: Medium Work on this. Type: Feature A (suggetion for a) new feature or enhancement in functionality.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0