Ejemplo n.º 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'
Ejemplo n.º 2
0
		else : print 'NOK',
		print '  \r',
		sys.stdout.flush()	
		time.sleep(1)
		timeout += 1
	except KeyboardInterrupt:
		break



if iplasma_ok:
    print 'FROM IPLASMA   ( thresh',iplasma_threshold,')'
    iplasma_shot_time = exposure_time(numpy.abs(iplasma),iplasma_times,iplasma_threshold)
    iplasma_mean_val = special_mean_val(numpy.abs(iplasma),iplasma_threshold)/1.e3
    print 'Mean current {0:.3f} kA'.format(iplasma_mean_val)
    iplasma_periods, s = 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,')'
    dens_shot_time = exposure_time(dens,dens_times,dens_threshold)
    dens_mean_val = special_mean_val(dens,dens_threshold)/1e18;
    print 'Mean density {0:.2e} m'.format(dens_mean_val*1e18)+u'\u207b\u00b3'
    dens_periods , s= period_counter(dens,dens_threshold)
    print 'I counted '+str(dens_periods)+' periods'
else:
    print 'NO DENSITY DATA'