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

Make translator between grid subset names and indices #34

Closed
eldond opened this issue Jan 18, 2024 · 1 comment
Closed

Make translator between grid subset names and indices #34

eldond opened this issue Jan 18, 2024 · 1 comment
Assignees
Labels
help wanted Extra attention is needed

Comments

@eldond
Copy link
Contributor

eldond commented Jan 18, 2024

Could be hard to remember what subset number you need if you want to see outer midplane. Maybe functions that take subset index as an argument could also take a string and translate it using a translation table.

  • Example: in src/subset_tools.jl : get_grid_subset_with_index() takes grid_subset_index (an integer) as an input. An alternative to this function could accept the subset name instead and look up the index.
  • Anything that accepts grid_subset_index or subset_index or something equivalent could work the same way.
  • A function could be made for translating between index and string.
@eldond eldond added the help wanted Extra attention is needed label Feb 7, 2024
@anchal-physics
Copy link
Collaborator

Addressed in #37, ProjectTorreyPines/SOLPS2imas.jl#31, ProjectTorreyPines/FusionSyntheticDiagnostics.jl#24, and ProjectTorreyPines/SOLPS2ctrl.jl#48

Now the function is called get_grid_subset() and it works with both an integer for index or string for a name.

Kudos @dautt-silva for completing first set of PRs!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants