Exemplo n.º 1
0
    dens_ok=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'
Exemplo n.º 2
0
		print ' marteAQ:',
		if marte_ok : print ' OK',
		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'
Exemplo n.º 3
0
        	print ' MARTE CONTROL:',
        	if marte_ok : print 'READY',
        	else : print 'NOT READY',
        	print '  \r',
        	sys.stdout.flush()
        	time.sleep(1)
        	waited_time += 1
        except KeyboardInterrupt:
            return -1;


    if iplasma_ok:
        print 'FROM IPLASMA   ( thresh',iplasma_threshold,')'
        iplasma_shot_time = exposure_time(numpy.abs(iplasma),iplasma_times,iplasma_threshold)
        print 'There was '+str(iplasma_shot_time)+' ms of plasma ('+str(int(((iplasma_shot_time)//25)*25))+' ms)'
        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 = period_counter(numpy.abs(iplasma),iplasma_threshold)
        print 'I counted '+str(iplasma_periods)+' periods ('+str(int((iplasma_shot_time)//25))+')'
    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)
        print 'There was '+str(dens_shot_time)+' ms of plasma ('+str(int(((dens_shot_time)//25)*25))+' ms)'
        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 = period_counter(dens,dens_threshold)
Exemplo n.º 4
0
    print 'DENSITY DATA NOT READY'
    dens_ok = 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: