gafusion / omas

Ordered Multidimensional Array Structure
http://gafusion.github.io/omas
MIT License
32 stars 15 forks source link

Add new nbi plot #102

Closed smithsp closed 3 years ago

smithsp commented 4 years ago

@eldond Can you point me to the right workflow for adding a plot for NBI related stuff in an ODS (especially omas vs OMFIT)? I want to plot beam powers/voltage/energy fraction per 'energy harmonic' vs time and possibly also top-down and poloidal cross-section plots.

eldond commented 4 years ago

The general strategy I recommend is:

  1. Add a method for loading NBI data from MDS into an ODS to https://github.com/gafusion/OMFIT-source/blob/unstable/omfit/classes/omfit_omas_d3d.py or omfit_omas_east.py or omfit_omas.py (if it's general, which given what I know about DIII-D vs KSTAR NBI setups and pointnames, is probably not worthwhile.)
  2. Add a method for putting minimal sample NBI data into an ODS in https://github.com/gafusion/omas/blob/master/omas/omas_sample.py
  3. Add the relevant plot methods to https://github.com/gafusion/omas/blob/master/omas/omas_plot.py
  4. While developing 3, also develop a test using the sample data and the plot method in https://github.com/gafusion/omas/tree/master/omas/tests

Of course, you could put the plot method in OMFIT instead if you wanted to, but it keeping the hardware overlay methods in OMAS worked pretty well for me. When OMAS attaches methods to ODS, it adds prefixes to their names. So the methods as defined in the script don't start with plot_, for example; that gets added.

github-actions[bot] commented 3 years ago

Stale issue message