Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GUI in an Instrument via Trigger Callback #2

Open
rstoneback opened this issue Jul 7, 2018 · 4 comments
Open

GUI in an Instrument via Trigger Callback #2

rstoneback opened this issue Jul 7, 2018 · 4 comments

Comments

@rstoneback
Copy link

The origin of pysat was a GUI written in IDL. Written specifically for C/NOFS, it worked well with IVM, adding VEFI was tough, and it wasn't going to scale for further. Thus I started down the path that lead to here. Adding trigger callbacks at then end of the main load function gets us 90% of the way to a GUI, fully contained within the Instrument object. The graphical interface is missing, but a Trigger Callback enables plotting that automatically updates with a load call.

Plan:

  • Create Trigger class that subclasses Custom. First change is the add function is replaced with a partial call to existing add function with kind set to 'pass'.
  • Trigger functions must be generators
  • Only accept the actual generator, not the function that creates the generator
  • At the end of load, invoke the _apply_all method
  • To get an equivalent trigger on orbits, put trigger call in the to be created output function
  • Need a way for the orbit call to disable the trigger on main load in favor of orbit (can do this in orbit print function, set a flag or something)
  • Instruments will be required to have a summary plot routine designed for the Trigger
  • pysat.Instrument needs a summary_plot routine to allow user to invoke the process from terminal, as well as a flag upon instantiation to do the same call

Feature:

  • Include summary_plot functions with each instrument
  • The function returns a generator, creates the plot window, axes, etc, then in a loop clears the current data, plots new data, then returns a generator
  • This generator is hooked up to the Instrument trigger
  • Every time data is loaded into Instrument, the plot generator is triggered
  • summary plot clears the axes, then plots the newly loaded data
  • works at the terminal

GUI Feature:

  • All GUI foundation is in the Instrument object
  • Create the GUI with buttons that map to Instrument calls
  • The main feature is the self updating window into the data, but relies upon all the data handling within the Instrument object
  • Users could provide their own plotting routine for their own custom view
  • Users could hook in custom routines, to view their own custom parameters
@jklenzing
Copy link
Member

Add to new package to be created.

@jklenzing
Copy link
Member

Assuming the GUI is a new package to be created, what would need to be added to pysat?

@rstoneback
Copy link
Author

We'd need to add an available hook within the Instrument object for other packages to grab onto and use for good. Most likely the hook will need to be developed along with a GUI to make sure things work well together. It's a project.

@jklenzing jklenzing transferred this issue from pysat/pysat Sep 9, 2020
@asher-pembroke
Copy link
Collaborator

asher-pembroke commented Aug 28, 2021

A brief update:

I believe we can produce much of the requested functionality through the pysatKamodo interface. The idea is that the pysatKamodo class provides a functional interpolation interface for a given underlying pysat instrument. This allows kamodo's plotting routines to generate quick-look graphics. Kamodo has a couple prototype dashboards, and we're starting development on a production-ready version. This includes development of a gRPC API which will allow you to programmatically interact with various pysat instruments in isolated containers hosted locally or in the cloud.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants