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

Use unit.name as key cache #2381

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

EdgarGF93
Copy link
Collaborator

@EdgarGF93 EdgarGF93 commented Jan 17, 2025

For two units called scattering_angle_horz and scattering_angle_vert ; the key to cache the arrays is the same for both units (scattering).
Can we change it and use just the full unit.name?

@EdgarGF93 EdgarGF93 requested a review from kif January 17, 2025 14:41
@EdgarGF93 EdgarGF93 added the ready to merge Please review label Jan 17, 2025
@kif
Copy link
Member

kif commented Jan 20, 2025

If I understand correctly, the issue comes from the _ in your unit name.
If we agree that the second half should never gave a _ as separator, wouldn't it be simpler to use:
space = "_".join(name.split("_")[:-1]))
instead of
space = name.split("_")[0]
This would avoid different behaviour for azimuthal- and fiber- units ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready to merge Please review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants