plotter icon indicating copy to clipboard operation
plotter copied to clipboard

Adding nascent source site plot capability.

Open pshriwise opened this issue 2 years ago • 6 comments

This feature is a little rough still but it adds the ability to plot source sites on top of the current view. All sites are plotted whether they're on the slice plane or not. There are a number of things I'd want to add (see below) before incorporating this, but it has a significant amount in place so I thought I'd create a draft PR at least.

See utilization in https://github.com/openmc-dev/openmc/pull/2857

TODO:

  • [x] Toggle for source site visibility in the main dock
  • [x] Toggle filter of visible souce sites based on coincidence with slice plane
  • [ ] Arrows for source locations
  • [ ] Colormap bar for particle energy

pshriwise avatar Jan 23 '24 22:01 pshriwise

Nice to see this PR, I remember a few people where asking for this on the slack channel a while back.

I'm keen to mirror this functionality on the python api if that is ok

shimwell avatar Jan 31 '24 10:01 shimwell

Perhaps a variable could be added for number of source samples (n_samples)

shimwell avatar Jan 31 '24 10:01 shimwell

I built this out a little bit today and I'm pretty happy with it now. The animation below shows an annular CylindricalIndependent source with R=1 and Z=[0,10]. Main additions include the ability to toggle visibility, change the color, and filter source particles out that are too far from the slice plane.

Recording

pshriwise avatar Jun 06 '24 19:06 pshriwise

A couple of features to be added yet I suppose, but I'd call this a good base for the feature and wouldn't mind seeing it merged as-is

pshriwise avatar Jun 06 '24 20:06 pshriwise

@pshriwise I ended up just forging ahead and implementing the changes we talked about today. Let me know if you're happy with how it looks/functions and if so, we can go ahead and merge. Thanks for adding this feature!

paulromano avatar Jun 19 '24 21:06 paulromano

@bohmt so you can use this once it's merged.

pshriwise avatar Aug 27 '24 15:08 pshriwise