tr= getParam( 'timerange', '2017-01-01', 'timerange to load' ) sc= getParam( 'sc', 'A', 'the spacecraft name', ['A','B'] ) component= getParam( 'component','Magnitude','component to plot',['Magnitude','X','Y','Z']) fftsize= getParam( 'size', 512, 'size of fft window', [ 512,1024,2048 ] ) if ( component=='Magnitude' ): comp= getDataSet('http://emfisis.physics.uiowa.edu/Flight/RBSP-%s/L3/$Y/$m/$d/rbsp-%s_magnetometer_4sec-gsm_emfisis-L3_$Y$m$d_v$(v,sep).cdf?Magnitude' % (sc.upper(),sc.lower()), tr, monitor.getSubtaskMonitor('read data') ) else: bfield= getDataSet('http://emfisis.physics.uiowa.edu/Flight/RBSP-%s/L3/$Y/$m/$d/rbsp-%s_magnetometer_4sec-gsm_emfisis-L3_$Y$m$d_v$(v,sep).cdf?Mag' % (sc.upper(),sc.lower()), tr, monitor.getSubtaskMonitor('read data') ) if ( component=='X' ): comp= bfield[:,0] elif ( component=='Y' ): comp= bfield[:,1] elif ( component=='Z' ): comp= bfield[:,2] result= fftPower( comp, fftsize, 4, 'Hann', monitor.getSubtaskMonitor('fftPower') ) result.putProperty( QDataSet.TITLE, 'RBSP-%s FFTPower(BField %s)' % ( sc.upper(), component ) )