The GUIs created by Jython scripts need to be a bit more sophisticated to support
a tree-like structure in selection. For example, Bob Weigel's server supports a selection of database, then mission within the database, then instrument within the mission. Currently the jython script getParams are static, so there's no way to make one list selection depend on the state of the first.
I was emailing with a fellow looking at POES data in NetCDF files, and for example, it would be nice if the GUI created from a jython script would support:
sp= getParam( 'species', 'ele', 'protons or electron species', ['ele','pro','omni'] )
if ( sp!='omni' ):
t90= getParam( 'angle', 'tel0', 'angle', [ 'tel0', 'tel90' ] )
if ( sp=='ele' ):
ch= getParam( 'ch', 1, 'channel to plot', [ 1,2,3 ] )
elif ( sp=='omni' ):
ch= getParam( 'ch', 1, 'channel to plot', [ 6,7,8,9 ] )
else:
ch= getParam( 'ch', 1, 'channel to plot', [ 1,2,3,4,5,6 ] )
Where it would implement optimizations in the GUI like:
* show just 1,2,3 when species=ele and 6,7,8,9 when species=omni
* don't prompt for angle when species=omni
For that matter, this code doesn't work either:
This should be supported as well.
Last edit: Jeremy Faden 2015-04-19
See also http://autoplot.org/developer.scripting.getParam
Remember that autoplot.py is copied out into HOME/autoplot_data/jython, and there is no mechanism to update this file.
Also I was reminded that the code looking for getParam('timerange') is still a regex and fussy. This is easily cleaned up as well.
See also https://sourceforge.net/p/autoplot/feature-requests/298/
I'm raising the priority of this because I was thinking it was further along.
http://jfaden.net:8080/hudson/job/autoplot-test038/ demos this.
The code above (2013-09-04) failed because "params" was used when the variable name was parms. This is fixed.
I need to improve the feedback when getParam is seen, but there's a problem with parsing.
This was implemented a while back and has been successful.