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

Remove core_profiles_2d() and reorganize testing #28

Open
2 tasks
anchal-physics opened this issue Nov 11, 2023 · 1 comment
Open
2 tasks

Remove core_profiles_2d() and reorganize testing #28

anchal-physics opened this issue Nov 11, 2023 · 1 comment

Comments

@anchal-physics
Copy link
Collaborator

core_profiles_2d() functionality has been moved to overloaded function GGDUtils.interp in ProjectTorreyPines/IMASggd.jl#17

To get the same result as:

prof_time_idx = 1
eq_time_idx = 1
get_n_e = core_profile_2d(dd, prof_time_idx, eq_time_idx, "electrons.density")
get_n_e(5.0, 3.5) # Returns electron density at (R, Z) = (5.0, 3.5)

one can now use:

eqt = dd.equilibrium.time_slice[1]
core_profile_n_e = dd.core_profiles.profiles_1d[1].electrons.density
get_n_e = interp(core_profile_n_e, dd.core_profiles.profiles_1d[1], eqt)
get_n_e(5.0, 3.5) # Returns electron density at (R, Z) = (5.0, 3.5)

Further, the tests in this repo are unorganized at this point. Many tests are doing the same things and should be merged together into a smaller set of tests.

Tasks:

  • We should remove the code of core_profiles_2d and any use of this function elsewhere in the package which is only at a test point in the runtests.jl.
  • Reorganize tests
@anchal-physics
Copy link
Collaborator Author

@eldond Please assign to me if you think this should be done at this point in development. We should discuss the reorganization of tests.

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

No branches or pull requests

1 participant