Skip to content

Propagate changes in orbcorr tracking dimension flag#305

Merged
vellosok75 merged 13 commits intomasterfrom
6dtrack-flag
Sep 19, 2025
Merged

Propagate changes in orbcorr tracking dimension flag#305
vellosok75 merged 13 commits intomasterfrom
6dtrack-flag

Conversation

@vellosok75
Copy link
Copy Markdown
Contributor

In PR #303, the string convention for specifying tracking dimension in OrbitCorr and OrbRespmat was replaced by a boolean flag: dim="4D" -> use6dorb=False.

This PR propagates this new convention to other codes using these classes. Since use6dorb was quite specific for orbit and orbit correction contexts, this flag was renamed use6dtrack to be more generic, specifically because of its use in optics correction contexts (LOCO, OpticsCorr, CouplingCorr).

- with the introduction of  `use6dorb`  in recent commits, code using `OrbRespmat` and `OrbitCorr` classes, such as LOCO, broke.
- In a an effort to propagate this new convention to other classes, we agreed to standardize the flag name to `use6dtrack` instead of of `use6dorb`.
…` flag)

- with the introduction of  `use6dorb`  in recent commits, code using `OrbRespmat` and `OrbitCorr` classes got broken.
- In a an effort to propagate this new convention to other classes, we agreed to standardize the flag name to `use6dtrack` instead of of `use6dorb`.
- with the introduction of  `use6dorb` flag  in recent commits, code using `OrbRespmat` and `OrbitCorr` classes got broken.
- In a an effort to propagate this change to other classes, we agreed to standardize the flag name to `use6dtrack` instead of of `use6dorb`.
- with the introduction of  `use6dorb` flag  in recent commits, code using `OrbRespmat` and `OrbitCorr` classes got broken.
- In a an effort to propagate this change to other classes, we agreed to standardize the flag name to `use6dtrack` instead of of `use6dorb`.
…dtrack` flag)

- with the introduction of  `use6dorb` flag  in recent commits, code using `OrbRespmat` and `OrbitCorr` classes got broken.
- In a an effort to propagate this change to other classes, we agreed to standardize the flag name to `use6dtrack` instead of of `use6dorb`.
@vellosok75 vellosok75 changed the title Propagate changes in orbcorr for tracking dimension flag Propagate changes in orbcorr tracking dimension flag Aug 27, 2025
- some files have not been change since we started to format w/ ruff
- others (mostly LOCO's) have already been formatted, however, we recently agreed to go back to single-quotes, instead of doubles
- some imports also have been sorted
- import function incorrectly removed in previous commits
- the default values for `use6dtrack` in the Params and Correction classes were different
- this raised ValueError when stantiating `OrbitCorr` with default values + default instantiatied `CorrParams` object
- this error was observed when using `lattice_errors.create_machines`, as exemplified in `examples/generate_random_machines.py`
- in `apsuite.orbcorr` the default values for `use6dtrack` in the Params and Correction classes were different
- this raised `ValueError` when instantiating `OrbitCorr` with default values + default instantiated `CorrParams` object
- this error was observed when using `lattice_errors.create_machines`, as exemplified in `examples/generate_random_machines.py`
- the previous commit standardized the flag to `True` in orbcorr
- here I am explicitly declaring `use6dtrack=False`, as in the example file
@vellosok75
Copy link
Copy Markdown
Contributor Author

@xresende there have been updates since your last review. Could you please take another look?

@vellosok75 vellosok75 merged commit 1ce8f5e into master Sep 19, 2025
@vellosok75 vellosok75 deleted the 6dtrack-flag branch September 19, 2025 19:21
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.

4 participants