Пример #1
0
    def __init__(self):
        super().__init__()

        host = 'baco.ipfn.ist.utl.pt'
        port = 8888
        self.client = SDASClient(host, port)

        self.top_signals = []
        self.top_time = []
        self.out_signals = []
        self.out_time = []
        self.index = None
Пример #2
0
 def load_sdas_data(self, channelID, shotnr):
     host = 'baco.ipfn.ist.utl.pt'
     port = 8888
     self.client = SDASClient(host, port)
     dataStruct = self.client.getData(channelID, '0x0000', shotnr)
     dataArray = dataStruct[0].getData()
     len_d = len(dataArray)
     tstart = dataStruct[0].getTStart()
     tend = dataStruct[0].getTEnd()
     tbs = (tend.getTimeInMicros() - tstart.getTimeInMicros()) * 1.0 / len_d
     events = dataStruct[0].get('events')[0]
     tevent = TimeStamp(tstamp=events.get('tstamp'))
     delay = tstart.getTimeInMicros() - tevent.getTimeInMicros()
     timeVector = np.linspace(delay, delay + tbs * (len_d - 1), len_d)
     return [dataArray, timeVector]
Пример #3
0
    def fill_Plot(self):

        # server = ServerProxy("http://localhost:8000") # local server "http://betty.userland.com"
        host = 'baco.cfn.ist.utl.pt'
        port = 8888
        client = SDASClient(host, port)
        #dS=client.getData('CENTRAL_OS9_ADC.IIGBT','0x0000', 11244)
        dS = client.getData('CENTRAL_OS9_ADC_VME_I8.IF0SN', '0x0000', 11244)
        isine = dS.getData()
        dS = client.getData('CENTRAL_OS9_ADC_VME_I8.IF0CS', '0x0000', 11244)
        cosine = dS.getData()
        ic = Density(cosine, isine)
        sze = ic.size()
        print sze
        #ic=_Numeric.arange(ic)
        # 25,000 point line
        data1 = _Numeric.arange(2 * sze)
        data2 = data1.astype(_Numeric.Float32)
        data2.shape = (-1, 2)
        data2[:, 1] = ic
        line1 = PolyLine(data2, legend='Wide Line', colour='green', width=2)
        self.plot.Draw(PlotGraphics([line1], "SDAS Plot", "Time", ""))
Пример #4
0
def StartSdas():
    host = 'baco.ipfn.ist.utl.pt'
    port = 8888
    client = SDASClient(host, port)
    return client
Пример #5
0
from __future__ import print_function

import numpy as np
import matplotlib.pyplot as plt

# -------------------------------------------------------------------------

from sdas.core.client.SDASClient import SDASClient
from sdas.core.SDAStime import TimeStamp

client = SDASClient('baco.ipfn.tecnico.ulisboa.pt', 8888)


def get_data(shot, channel):
    info = client.getData(channel, '0x0000', shot)
    data = info[0].getData()
    t0 = TimeStamp(tstamp=info[0]['events'][0]['tstamp']).getTimeInMicros()
    t1 = info[0].getTStart().getTimeInMicros()
    t2 = info[0].getTEnd().getTimeInMicros()
    dt = float(t2 - t1) / float(len(data))
    time = np.arange(t1 - t0, t2 - t0, dt, dtype=data.dtype) * 1e-6
    return data, time


# -------------------------------------------------------------------------

shot = 47238

channels = [

    # vertical camera
Пример #6
0
# libraries for data loading processing and representation
from sdas.core.client.SDASClient import SDASClient
from sdas.tests.LoadSdasData import LoadSdasData
import matplotlib.pyplot as plt
from matplotlib import animation
import numpy as np

# variables declaration
Range = 620
InitialT = 0
Mag = [[0], [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], [0]]
times = [[0], [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], [0]]
CRR = [[0], [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], [0]]
host = 'baco.ipfn.ist.utl.pt'
port = 8888
Client = SDASClient(host, port)
EventN = 45994
Channels = [
    '202', '203', '204', '205', '206', '207', '208', '209', '210', '211',
    '212', '213'
]
Ro = np.zeros((Range))
Zo = np.zeros((Range))
Zk = np.zeros((12), dtype='float')
Ro = np.zeros((Range), dtype='float')
Zo = np.zeros((Range), dtype='float')
ix = np.zeros((Range), dtype='float')
iy = np.zeros((Range), dtype='float')
Ipf = np.zeros((Range, 12), dtype='float')
ang = [30, 60, 90, 120, 150, 180, 210, 240, 270, 300, 330, 360]