Skip to content

Commit

Permalink
add a convenience plot_summary function
Browse files Browse the repository at this point in the history
  • Loading branch information
orso82 committed Oct 3, 2024
1 parent d603cba commit b384894
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/actors/compound/dynamic_plasma_actor.jl
Original file line number Diff line number Diff line change
Expand Up @@ -416,3 +416,15 @@ function plot_plasma_overview(dd::IMAS.dd, time0::Float64=dd.global_time; min_po

return p
end

function plot_summary(dd::DD; kw...)
plot_summary(dd.summary; kw...)
end

function plot_summary(summary::IMASdd.summary; kw...)
for leaf in IMASdd.AbstractTrees.Leaves(summary)
if typeof(leaf.value) <: Vector
display(plot(leaf.ids, leaf.field; title=IMAS.location(leaf.ids,leaf.field), kw...))
end
end
end

2 comments on commit b384894

@bclyons12
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ERROR: LoadError: UndefVarError: `DD` not defined
Stacktrace:
 [1] top-level scope
   @ [~/.julia/dev/FUSE/src/actors/compound/dynamic_plasma_actor.jl:420](http://localhost:8888/~/.julia/dev/FUSE/src/actors/compound/dynamic_plasma_actor.jl#line=419)
 [2] include(mod::Module, _path::String)
   @ Base ./Base.jl:495
 [3] include(x::String)
   @ FUSE ~/.julia/dev/FUSE/src/FUSE.jl:3
 [4] top-level scope
   @ [~/.julia/dev/FUSE/src/FUSE.jl:146](http://localhost:8888/~/.julia/dev/FUSE/src/FUSE.jl#line=145)
 [5] include
   @ ./Base.jl:495 [inlined]
 [6] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt128}}, source::Nothing)
   @ Base ./loading.jl:2222
 [7] top-level scope
   @ stdin:3
in expression starting at [/Users/lyons/.julia/dev/FUSE/src/actors/compound/dynamic_plasma_actor.jl:420](http://localhost:8888/FUSE/src/actors/compound/dynamic_plasma_actor.jl#line=419)

@orso82 open a pull request
Image

@orso82
Copy link
Member Author

@orso82 orso82 commented on b384894 Oct 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this got fixed last night

Please sign in to comment.