Skip to content

developer.scripting.getParam

Jeremy Faden edited this page Jun 14, 2024 · 3 revisions

Purpose: Discuss how getParam is used to create the GUIs, and how this will be improved.

Audience: Autoplot developers and clients wanting to understand how getParam is used to create GUIs.

Current State

  • scrapes through the code looking for getParam lines, and these are parsed to get input parameters.

Proposed new solution

Automatically simplify code to make it executable within 300 ms. This is a describable process. The simplified code is run, and getParam calls trigger the addition of GUI elements. See JythonUtil.removeSideEffects, JythonUtil.getGetParams

Example Test Codes

Simplest that is currently working

resourceURI= getParam( 'resourceURI', '`<ftp://satdat.ngdc.noaa.gov/sem/poes/data/raw/ngdc/2013/noaa19/poes_n19_20130409_raw.nc>`', 'example file to load' )
parm= getParam( 'parm', 'mep_pro_tel0_cps_p3', 'parameter to load', [  'alt', 'lat', 'lon' )

Here's the problem

resourceURI= getParam( 'resourceURI', '`<ftp://satdat.ngdc.noaa.gov/sem/poes/data/raw/ngdc/2013/noaa19/poes_n19_20130409_raw.nc>`', 'example file to load' )
parm= getParam( 'parm', 'mep_pro_tel0_cps_p3', 'parameter to load', [  'alt', 'lat', 'lon', 'mep_pro_tel0_cps_p1', 'mep_pro_tel0_cps_p2', 'mep_pro_tel0_cps_p3', 'mep_pro_tel0_cps_p4', 'mep_pro_tel0_cps_p5', 'mep_pro_tel0_cps_p6',  'mep_pro_tel90_cps_p1', 'mep_pro_tel90_cps_p2', 'mep_pro_tel90_cps_p3', 'mep_pro_tel90_cps_p4', 'mep_pro_tel90_cps_p5', 'mep_pro_tel90_cps_p6', 'mep_ele_tel0_cps_e1', 'mep_ele_tel0_cps_e2', 'mep_ele_tel0_cps_e3', 'mep_ele_tel90_cps_e1',  'mep_ele_tel90_cps_e2',  'mep_ele_tel90_cps_e3',   'mep_omni_cps_p6', 'mep_omni_cps_p7', 'mep_omni_cps_p8',  'mep_omni_cps_p9' ] )

simple case resolves variables

parms= [ 'alt', 'lat', 'lon']
parm= getParam( 'parm', 'alt', 'parameter to load', params )

continuation supported

parms= [ \
 'alt', \
 'lat', \
 'lon']
parm= getParam( 'parm', 'alt', 'parameter to load', params )

branches supported

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 ] )

See Also

https://sourceforge.net/p/autoplot/feature-requests/320/

Table Of Contents

URIs that Point to Data Files

Download a CDF and Plot it with Autoplot

Load a CDF directly from a website

URIs that Point to Data Servers

Saving to vap files

Loading vap files

Data Sources

CDF Files

HDF/NetCDF Files

Aggregation

CDAWeb

HAPI Servers

Exporting Data

Export Types

Additional controls

Aggregation

Tools

PNGWalk Tool

Data Mash Up

Events List

Run Batch

Advanced Topics

TimeSeriesBrowse and other Capabilities

Events Lists

Caching

Autoranging

Managing Autoplot's Data Cache

Using Autoplot with Python, IDL, and Matlab

Reading data into Python

Reading data into IDL

Reading data into Matlab

QDataSet Data Model

Clone this wiki locally