Menu

#320 jython script guis need to be a little bit more sophisticated

closed
nobody
None
5
2015-05-21
2013-09-04
No

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

Discussion

  • Jeremy Faden

    Jeremy Faden - 2013-09-04

    For that matter, this code doesn't work either:

    resourceURI= getParam( 'resourceURI', 'ftp://satdat.ngdc.noaa.gov/sem/poes/data/raw/ngdc/2013/noaa19/poes_n19_20130409_raw.nc', 'example file to load' )
    
    parms= [ \
      'alt', \
      'lat', \
      'lon']
    parm= getParam( 'parm', 'alt', 'parameter to load', parms )
    
    result= getDataSet( resourceURI + "?" + parm )
    

    This should be supported as well.

     

    Last edit: Jeremy Faden 2015-04-19
  • Jeremy Faden

    Jeremy Faden - 2013-09-10

    Remember that autoplot.py is copied out into HOME/autoplot_data/jython, and there is no mechanism to update this file.

     
  • Jeremy Faden

    Jeremy Faden - 2013-10-21

    Also I was reminded that the code looking for getParam('timerange') is still a regex and fussy. This is easily cleaned up as well.

     
  • Jeremy Faden

    Jeremy Faden - 2015-04-19

    I'm raising the priority of this because I was thinking it was further along.

     
  • Jeremy Faden

    Jeremy Faden - 2015-04-19

    The code above (2013-09-04) failed because "params" was used when the variable name was parms. This is fixed.

     
  • Jeremy Faden

    Jeremy Faden - 2015-04-19

    I need to improve the feedback when getParam is seen, but there's a problem with parsing.

     
  • Jeremy Faden

    Jeremy Faden - 2015-05-21
    • status: open --> closed
     
  • Jeremy Faden

    Jeremy Faden - 2015-05-21

    This was implemented a while back and has been successful.

     
MongoDB Logo MongoDB