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

Refactor high-level interface for transitions and levels #224

Open
wtbarnes opened this issue Feb 28, 2023 · 0 comments
Open

Refactor high-level interface for transitions and levels #224

wtbarnes opened this issue Feb 28, 2023 · 0 comments
Labels
API API design, naming conventions, etc. effort-high feature

Comments

@wtbarnes
Copy link
Owner

There are currently classes for energy levels (Level) as well as a class to hold all transitions (Transitions). However, they aren't terribly useful and also do not interact with one another.

One possible way to refactor this would be to create a Transition class and have Transitions hold many instances of Transition instances. Similarly, each transition could emit a Level class for the upper and lower levels that it represents a transition between. The Transitions class would hold many of the same properties that it currently does, but would derive them from these higher-level classes rather than directly from the underlying data itself.

There may be some performance issues with this approach, e.g. every time we want to list all transition wavelengths, it would not make sense to have to rebuild this Transitions object from scratch.

@wtbarnes wtbarnes added effort-high feature API API design, naming conventions, etc. labels Feb 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API API design, naming conventions, etc. effort-high feature
Projects
None yet
Development

No branches or pull requests

1 participant