Skip to content

Remove core_profiles_2d() and reorganize testing #28

@anchal-physics

Description

@anchal-physics

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions