sc= getParam( 'sc', 'A', 'Spacecraft', ['A','B']) lowsc=sc.lower() cadence= getParam ( 'cadence', '4sec', 'Cadence', ['1sec','4sec','hires'] ) tr= getParam( 'timerange', '2012-11-15', 'timerange to load' ) mag= getDataSet('vap+cdf:http://emfisis.physics.uiowa.edu/Flight/RBSP-%s/L3/$Y/$m/$d/rbsp-%s_magnetometer_%s-gei_emfisis-L3_$Y$m$d_v$(v,sep).cdf?timerange=%s&Magnitude' % (sc, lowsc, cadence, tr),monitor ) typ= getParam( 'typ', 'fce', 'the parameter to use', [ 'bmag', '3fce', '2fce', 'fce', '0.5fce', 'fci', 'flhr' ] ) if ( typ=='fce' ): result= mag*28 result.putProperty( QDataSet.UNITS, Units.hertz ) result.putProperty( QDataSet.LABEL, 'f_ce' ) elif ( typ=='3fce'): result= mag*28*3 result.putProperty( QDataSet.UNITS, Units.hertz ) result.putProperty( QDataSet.LABEL, '3*f_ce' ) elif ( typ=='2fce'): result= mag*28*2 result.putProperty( QDataSet.UNITS, Units.hertz ) result.putProperty( QDataSet.LABEL, '2*f_ce' ) elif ( typ=='0.5fce'): result= mag*14 result.putProperty( QDataSet.UNITS, Units.hertz ) result.putProperty( QDataSet.LABEL, '0.5*f_ce' ) elif ( typ=='fci' ): result = (mag*28)/1836.2 result.putProperty( QDataSet.UNITS, Units.hertz ) result.putProperty( QDataSet.LABEL, 'f_ci' ) elif ( typ=='flhr' ): result = (mag*28)/42 result.putProperty( QDataSet.UNITS, Units.hertz ) result.putProperty( QDataSet.LABEL, 'f_lhr' ) elif ( typ=='bmag' ): result= mag elif ( typ=='fuh' ): print else: print 'huh'