Skip to content

Use new optics consts classes - #1237

Draft
xresende wants to merge 18 commits into
masterfrom
use-new-optics-consts-classes
Draft

Use new optics consts classes#1237
xresende wants to merge 18 commits into
masterfrom
use-new-optics-consts-classes

Conversation

@xresende

@xresende xresende commented May 6, 2026

Copy link
Copy Markdown
Contributor

needs #1236

@xresende
xresende marked this pull request as ready for review May 6, 2026 17:18
@xresende
xresende requested review from vellosok75 May 6, 2026 17:18
def __init__(self, acc):
"""Init1 method."""
self.acc = acc.upper()
self.acc = acc

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 don't understand. How can you be sure that acc is one of the classes you defined? I think you have to parse this argument here.

Comment thread siriuspy/siriuspy/sofb/csdev.py Outdated
self.nr_svals = min(self.nr_corrs, 2 * self.nr_bpms)
self.circum = 21.2477 if self.acc == "TB" else 26.8933 # in meters
self.rev_per = self.circum / 299792458 # in seconds
self.circum = self.acc.length

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 think if the self.acc has the attribute length, we don't need this self.circum anymore. You can remove it and change the places where it is used.

@xresende
xresende marked this pull request as draft May 20, 2026 20:44
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.

2 participants