Skip to content

SIRIUS Models in different simulation tools#107

Draft
VitorSouzaLNLS wants to merge 9 commits intomasterfrom
si-model-in-other-simulators
Draft

SIRIUS Models in different simulation tools#107
VitorSouzaLNLS wants to merge 9 commits intomasterfrom
si-model-in-other-simulators

Conversation

@VitorSouzaLNLS
Copy link

No description provided.

Copy link
Contributor

@fernandohds564 fernandohds564 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no parenthesis in the file names. Add only the files that will be on the on the final PR, try to avoid pushing intermediate files to the main repository.

@murilobalves
Copy link
Contributor

Maybe put the information that it is the version SI_V25_04 in the filename? something like sirius_si_v25_04.seq

@fernandohds564
Copy link
Contributor

fernandohds564 commented Sep 10, 2024

Maybe put the information that it is the version SI_V25_04 in the filename? something like sirius_si_v25_04.seq

@murilobalves, @VitorSouzaLNLS, I don't think this is a good way of keeping this information. It is not easy to visualize the changes from one version to another. Maybe we could keep this information in comments inside the file.

@VitorSouzaLNLS
Copy link
Author

Maybe put the information that it is the version SI_V25_04 in the filename? something like sirius_si_v25_04.seq

@murilobalves, @VitorSouzaLNLS, I don't think this is a good way of keeping this information. It is not easy to visualize the changes from one version to another. Maybe we could keep this information in comments inside the file.

@fernandohds564 What names do you suggest for the MAD-X sequence and the (python) constructor files?

@fernandohds564
Copy link
Contributor

I don't know, I don't have a strong opinion about it...
Maybe sirius_madx.seq?

@fernandohds564
Copy link
Contributor

@VitorSouzaLNLS, what is missing here for this PR be ready for review?

@VitorSouzaLNLS
Copy link
Author

@fernandohds564 I'll open the PR-review. But, as we discussed before the SI-MAD-X model is not "automatically" updated when the SI-pymodels model is updated.

@VitorSouzaLNLS VitorSouzaLNLS marked this pull request as ready for review December 11, 2024 13:02
Copy link
Contributor

@fernandohds564 fernandohds564 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@VitorSouzaLNLS , I don't understand why the file madx_si_constructor.py is needed if we also have the file sirius.seq. It seems as difficult to change one as it is to change another. Is it there, as a process of a more automated script in the future?

stri += "!* BC\n"

monomials = [0, 1, 2, 3, 4, 5, 6, 7, 8, 10]
segmodel = [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not taking this segmented model from the segmented model file?


stri += "!* B1\n"
monomials = [0, 1, 2, 3, 4, 5, 6]
segmodel = [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here.

@VitorSouzaLNLS
Copy link
Author

VitorSouzaLNLS commented Dec 11, 2024

@fernandohds564

The .seq file is the one actually used in MAD-X, while the .py file serves as a constructor. I wrote the constructor to be able to track the changes in pymodels and apply mods more easily.

It's certainly possible to write a more automated script to convert the pymodels SI model into a MAD-X model. However, I opted for a quicker approach since I was asked by Murilo and people from ESRF for studies in September (if I'm not mistaken). As result, I didn't focus on deep optimizations.

About the usage (non-usage) of the pymodels.SI_V5_04.segmented_models: at first, it was easier to understand the conversion of BC, B1, B2 using the segmented models in-file. However, I believe it would now be "simple" to rewrite the conversions pulling the dipole pieces directly from pymodels.

@fernandohds564
Copy link
Contributor

I think we can delay this discussion until I come back, in April. Is it ok for you @VitorSouzaLNLS ?

@fernandohds564 fernandohds564 self-assigned this Jul 7, 2025
@VitorSouzaLNLS VitorSouzaLNLS marked this pull request as draft November 4, 2025 12:46
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.

3 participants