示例#1
0
try:
    [marte,marte_times] =       LoadSdasData(client, marte_power_channelID, shotnr);
    marte_ok=numpy.all(numpy.isfinite(marte))  # check if all finite
except xmlrpclib.Fault:
    print 'MARTE CONTROL DATA NOT READY'
    marte_ok=0


print 'Data loaded\n'


if iplasma_ok:
    print 'FROM IPLASMA   ( thresh',iplasma_threshold,')'
    exposure_time(numpy.abs(iplasma),iplasma_times,iplasma_threshold)
    print 'Mean current {0:.3f} kA'.format(special_mean_val(numpy.abs(iplasma),iplasma_threshold)/1.e3)
    iplasma_periods = period_counter(numpy.abs(iplasma),iplasma_threshold)
    print 'I counted '+str(iplasma_periods)+' periods'
else:
    print 'NO IPLASMA DATA'

print ''

if dens_ok:
    print 'FROM DENSITY   ( thresh',dens_threshold,')'
    exposure_time(dens,dens_times,dens_threshold)
    print 'Mean density {0:.2e} m'.format(special_mean_val(dens,dens_threshold))+u'\u207b\u00b3'
    dens_periods = period_counter(dens,dens_threshold)
    print 'I counted '+str(dens_periods)+' periods'
else:
    print 'NO DENSITY DATA'