Skip to content

Commit

Permalink
Reset betaN values to NaN if there's no equilibrium
Browse files Browse the repository at this point in the history
  • Loading branch information
mgyoo86 committed Oct 23, 2024
1 parent c18a826 commit 7f46868
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/TroyonBetaNN.jl
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@ end
function Calculate_Troyon_beta_limits_for_a_given_time_slice(TD::Troyon_Data, eqt::IMAS.equilibrium__time_slice; kwargs...)
if isnan(eqt.global_quantities.vacuum_toroidal_field.b0)
@warn("Given time_slice has no equilirbium information\nSkipping Troyon βₙ calculations ...\n");

# reset NN models' betaN value to NaN
setfield!.(TD.MLPs,:βₙ_limit,NaN)
TD.CNN.βₙ_limit=NaN
return
end

Expand Down

0 comments on commit 7f46868

Please sign in to comment.