Fusion-Data-Platform / fdf

Obsolete FDF repo - see FDP repo for current development
MIT License
2 stars 0 forks source link

signal/container feature requests #46

Closed drsmith48 closed 8 years ago

drsmith48 commented 8 years ago

Four feature requests:

  1. Handle methods with names different than module name
    • e.g. <method name=‘binAvgFft’ module=‘fft'> for method binAvgFft() in fft.py
  2. Rename methods
    • e.g. <method name=‘fft’ ref_name=‘doubleSidedFft'> so highk.ch01.fft() can wrap doubleSidedFft()
  3. Container-level methods for multi-signal analysis
    • e.g. <containermethod> for highk.deltaNSpectrum() or magnetics.highn.torModeSpectrum()
  4. Cache auxiliary calculations to avoid re-computing
    • e.g. bes.ch01.fft() somehow stores fft calculation in bes.ch01 to avoid re-computing if fft parameters do not change
ktritz commented 8 years ago

Container methods should already be implemented, the old mpts plot for example. It's up to the method to be aware if it invoked by a container or a signal. You can check if Container is in the class name. I suppose we could add a specific function to return the type of object.

Similarly, the method can already cache results if it wants. I'm not sure we need anything special in the framework code for that. On Nov 17, 2015 9:53 AM, "David R. Smith" notifications@github.com wrote:

Four feature requests:

  1. Handle methods with names different than module name
    • e.g. <method name=‘binAvgFft’ module=‘fft'> for method binAvgFft() in fft.py
  2. Rename methods
    • e.g. <method name=‘fft’ ref_name=‘doubleSidedFft'> so highk.ch01.fft() can wrap doubleSidedFft()
  3. Container-level methods for multi-signal analysis
    • e.g. for highk.deltaNSpectrum() or magnetics.highn.torModeSpectrum()
  4. Cache auxiliary calculations to avoid re-computing
    • e.g. bes.ch01.fft() somehow stores fft calculation in bes.ch01 to avoid re-computing if fft parameters do not change

— Reply to this email directly or view it on GitHub https://github.com/Fusion-Data-Framework/fdf/issues/46.

drsmith48 commented 8 years ago

ok, thanks. I see how 3 and 4 are already feasible. I think 1 and 2 can be accomplished with methods/modules wrapping other methods/modules, but that seems a bit inelegant. I'll take a crack at 1 and 2. Also, FYI, simple isContainer(), etc methods are in test.py.

drsmith48 commented 8 years ago

I added isContainer() and similar methods to factory.py. They'll appear in a subsequent merge. I think all items in this issue have been addressed.