ProjectTorreyPines / SOLPS2ctrl.jl

Synthetic diagnostic workflow manager for use with SOLPS models
Apache License 2.0
2 stars 0 forks source link

Remove core_profiles_2d() and reorganize testing #28

Open anchal-physics opened 11 months ago

anchal-physics commented 11 months ago

core_profiles_2d() functionality has been moved to overloaded function GGDUtils.interp in https://github.com/ProjectTorreyPines/GGDUtils.jl/pull/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:

anchal-physics commented 11 months ago

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