Skip to content
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

BeamlinePrefix does not support branch beamlines (e.g. i13-1 does not resolve to BL13J) #926

Open
DiamondJoseph opened this issue Nov 26, 2024 · 2 comments
Labels
bug Something isn't working i13-1 i19-1

Comments

@DiamondJoseph
Copy link
Contributor

DiamondJoseph commented Nov 26, 2024

get_beamline_name returns what is set in the environment variable BEAMLINE, or a default string.
The return of get_beamline_name is (often) used to create the BeamlinePrefix, which is used by both device_instantiation and device_factory to create the device prefix.

On e.g. i13-1-ws001, BEAMLINE=i13-1, and BeamlinePrefix("i13-1").beamline_prefix = "BL13I" however devices on i13-1 are actually prefixed BL13J.

Is using the environment variable to connect, other than in the cases of a simulated twin, a common behaviour that we need to support? This is done by the training_rigs, which share a dodal beamline module, and so must be distinguished.

Acceptance Criteria

  • Specific criteria that will be used to judge if the issue is fixed
@noemifrisina
Copy link
Collaborator

noemifrisina commented Nov 27, 2024

IIRC, in a case such as i13-1, specifying the suffix in BeamlinePrefix should do the trick - even if it's not a very nice solution (and we might want something else in the long run):

from dodal.utils import BeamlinePrefix

bl = BeamlinePrefix("i13-1", suffix="J")

This should return bl.beamline_prefix = "BL13J"

Btw, just to make things more interesting, I'll note that the beamline prefix for both i19-1 and i19-2 is BL19I but that might be a single edge case.

@DominicOram
Copy link
Contributor

FYI, this is a duplicate of #760. I will close the older one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working i13-1 i19-1
Projects
None yet
Development

No branches or pull requests

3 participants