Skip to content

Fix pyaccel Accelerator serialization#162

Open
xresende wants to merge 3 commits intomasterfrom
fix-pyaccel-accelerator-serialization
Open

Fix pyaccel Accelerator serialization#162
xresende wants to merge 3 commits intomasterfrom
fix-pyaccel-accelerator-serialization

Conversation

@xresende
Copy link
Copy Markdown
Contributor

No description provided.

@xresende xresende changed the title Fix pyaccel Accelerato serialization Fix pyaccel Accelerator serialization Mar 25, 2026
@xresende xresende requested a review from fernandohds564 March 26, 2026 00:47
self._brho, self._velocity, self._beta, self._gamma, \
self.trackcpp_acc.energy = \
_mp.beam_optics.beam_rigidity(gamma=1.0)
electron_rest_energy_ev = _c.electron_rest_energy * _u.joule_2_eV
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

electron_rest_energy_ev → electron_rest_energy_eV

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I originally used _eV, @VitorSouzaLNLS , but my ruff linter complained about it and I gave up. do you a strong opinion/reason about this choice ?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I prefer how it is now.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I originally used _eV, @VitorSouzaLNLS , but my ruff linter complained about it and I gave up. do you a strong opinion/reason about this choice ?

No, not at all. I just added this comment because of the mismatch between the units in mathphys and this.

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.

5 participants