Esempio n. 1
0
    def __init__(self):

        ProcessingUnit.__init__(self)

        self.ext = ".fdt"
        self.optchar = "P"
        self.fpFile = None
        self.fp = None
        self.BlockCounter = 0
        self.fileSizeByHeader = None
        self.filenameList = []
        self.fileSelector = 0
        self.Off2StartNxtRec = 0
        self.RecCounter = 0
        self.flagNoMoreFiles = 0
        self.data_spc = None
        self.data_cspc = None
        self.path = None
        self.OffsetStartHeader = 0
        self.Off2StartData = 0
        self.ipp = 0
        self.nFDTdataRecors = 0
        self.blocksize = 0
        self.dataOut = Spectra()
        self.dataOut.flagNoData = False
Esempio n. 2
0
    def __init__(self):
        """
        Inicializador de la clase VoltageReader para la lectura de datos de voltage.

        Input:
            dataOut    :    Objeto de la clase Voltage. Este objeto sera utilizado para
                              almacenar un perfil de datos cada vez que se haga un requerimiento
                              (getData). El perfil sera obtenido a partir del buffer de datos,
                              si el buffer esta vacio se hara un nuevo proceso de lectura de un
                              bloque de datos.
                              Si este parametro no es pasado se creara uno internamente.

        Variables afectadas:
            self.dataOut

        Return:
            None
        """

        ProcessingUnit.__init__(self)
        
        self.ext = ".r"
        self.optchar = "D"
        self.basicHeaderObj = BasicHeader(LOCALTIME)
        self.systemHeaderObj = SystemHeader()
        self.radarControllerHeaderObj = RadarControllerHeader()
        self.processingHeaderObj = ProcessingHeader()
        self.lastUTTime = 0
        self.profileIndex = 2**32 - 1        
        self.dataOut = Voltage()
        self.selBlocksize = None
        self.selBlocktime = None
Esempio n. 3
0
    def __init__(self):
        """
        Inicializador de la clases SimulatorReader para
        generar datos de voltage simulados.
        Input:
            dataOut: Objeto de la clase Voltage.
            Este Objeto sera utilizado apra almacenar
            un perfil de datos  cada vez qe se haga
            un requerimiento (getData)
        """
        ProcessingUnit.__init__(self)
        print(" [ START ] init - Metodo Simulator Reader")

        self.isConfig                  = False
        self.basicHeaderObj            = BasicHeader(LOCALTIME)
        self.systemHeaderObj           = SystemHeader()
        self.radarControllerHeaderObj  = RadarControllerHeader()
        self.processingHeaderObj       = ProcessingHeader()
        self.profileIndex              = 2**32-1
        self.dataOut                   = Voltage()
        #code0                          = numpy.array([1,1,1,0,1,1,0,1,1,1,1,0,0,0,1,0,1,1,1,0,1,1,0,1,0,0,0,1,1,1,0,1])
        code0                          = numpy.array([1,1,1,-1,1,1,-1,1,1,1,1,-1,-1,-1,1,-1,1,1,1,-1,1,1,-1,1,-1,-1,-1,1,1,1,-1,1])
        #code1                          = numpy.array([1,1,1,0,1,1,0,1,1,1,1,0,0,0,1,0,0,0,0,1,0,0,1,0,1,1,1,0,0,0,1,0])
        code1                          = numpy.array([1,1,1,-1,1,1,-1,1,1,1,1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,1,-1,1,1,1,-1,-1,-1,1,-1])
        #self.Dyn_snCode                = numpy.array([code0,code1])
        self.Dyn_snCode                = None
Esempio n. 4
0
    def __init__(self, **kwargs):

        ProcessingUnit.__init__(self, **kwargs)

        self.dataOut = Parameters()
        self.counter_records = 0
        self.flagNoMoreFiles = 0
        self.isConfig = False
        self.filename = None
        self.clockpulse = 0.15
        self.kd = 213.6
Esempio n. 5
0
    def __init__(self):

        ProcessingUnit.__init__(self)

        self.buffer = None
        self.firstdatatime = None
        self.profIndex = 0
        self.dataOut = Spectra()
        self.id_min = None
        self.id_max = None
        self.setupReq = False  #Agregar a todas las unidades de proc
Esempio n. 6
0
    def __init__(self, **kwargs):

        ProcessingUnit.__init__(self, **kwargs)

        self.dataOut = Parameters()
        self.counter_records = 0
        self.nrecords = None
        self.flagNoMoreFiles = 0
        self.isConfig = False
        self.filename = None
        self.intervals = set()
        self.ext = ('.nc', '.tgz')
        self.online_mode = False
Esempio n. 7
0
    def __init__(self):

        ProcessingUnit.__init__(self)

        self.dataOut = Parameters()
        self.dataOut.timezone = 300
        self.counter_records = 0
        self.flagNoMoreFiles = 0
        self.isConfig = False
        self.filename = None
        self.status_value = 0
        self.datatime = datetime.datetime(1900, 1, 1)
        self.filefmt = "*********%Y%m%d******"
Esempio n. 8
0
 def __init__(self):
     ProcessingUnit.__init__(self)
     self.dataOut = Parameters()
     self.ext = ".hdf5"
     self.optchar = "D"
     self.meta = {}
     self.data = {}
     self.open_file = h5py.File
     self.open_mode = 'r'
     self.description = {}
     self.extras = {}
     self.filefmt = "*%Y%j***"
     self.folderfmt = "*%Y%j"
Esempio n. 9
0
    def __init__(self, **kwargs):

        ProcessingUnit.__init__(self, **kwargs)

        self.isConfig = False
        server = kwargs.get('server', 'zmq.pipe')
        if 'tcp://' in server:
            address = server
        else:
            address = 'ipc:///tmp/%s' % server

        self.address = address
        self.dataOut = JROData()
Esempio n. 10
0
    def __init__(self):

        ProcessingUnit.__init__(self)

        self.dataOut = Parameters()
        self.counter_records = 0
        self.nrecords = None
        self.flagNoMoreFiles = 0
        self.filename = None
        self.intervals = set()
        self.datatime = datetime.datetime(1900, 1, 1)
        self.format = None
        self.filefmt = "***%Y%m%d*******"
Esempio n. 11
0
    def __init__(self, **kwargs):
        '''
        Constructor
        '''

        ProcessingUnit.__init__(self, **kwargs)

        self.dataOut = Voltage()
        self.__printInfo = True
        self.__flagDiscontinuousBlock = False
        self.__bufferIndex = 9999999

        self.__ippKm = None
        self.__codeType = 0
        self.__nCode = None
        self.__nBaud = None
        self.__code = None
Esempio n. 12
0
 def __init__(self):#, **kwargs):
     ProcessingUnit.__init__(self)#, **kwargs)
     self.isConfig = False
     self.ext = '.fits'
     self.setFile = 0
     self.flagNoMoreFiles = 0
     self.flagIsNewFile = 1
     self.flagDiscontinuousBlock = None
     self.fileIndex = None
     self.filename = None
     self.fileSize = None
     self.fitsObj = None
     self.timeZone = None
     self.nReadBlocks = 0
     self.nTotalBlocks = 0
     self.dataOut = self.createObjByDefault()
     self.maxTimeStep = 10# deberia ser definido por el usuario usando el metodo setup()
     self.blockIndex = 1
Esempio n. 13
0
    def __init__(self):
        '''
        Constructor
        '''

        ProcessingUnit.__init__(self)

        self.set = None
        self.subset = None
        self.extension_file = '.h5'
        self.dtc_str = 'dtc'
        self.dtc_id = 0
        self.status = True
        self.isConfig = False
        self.dirnameList = []
        self.filenameList = []
        self.fileIndex = None
        self.flagNoMoreFiles = False
        self.flagIsNewFile = 0
        self.filename = ''
        self.amisrFilePointer = None

        self.dataset = None

        self.profileIndex = 0

        self.beamCodeByFrame = None
        self.radacTimeByFrame = None

        self.dataset = None

        self.__firstFile = True

        self.buffer = None

        self.timezone = 'ut'

        self.__waitForNewFile = 20
        self.__filename_online = None
        #Is really necessary create the output object in the initializer
        self.dataOut = Voltage()
Esempio n. 14
0
    def __init__(self, **kwargs):

        # Eliminar de la base la herencia
        ProcessingUnit.__init__(self, **kwargs)
        self.PointerReader = 0
        self.FileHeaderFlag = False
        self.utc = None
        self.ext = ".zspca"
        self.optchar = "P"
        self.fpFile = None
        self.fp = None
        self.BlockCounter = 0
        self.dtype = None
        self.fileSizeByHeader = None
        self.filenameList = []
        self.fileSelector = 0
        self.Off2StartNxtRec = 0
        self.RecCounter = 0
        self.flagNoMoreFiles = 0
        self.data_spc = None
        # self.data_cspc=None
        self.data_output = None
        self.path = None
        self.OffsetStartHeader = 0
        self.Off2StartData = 0
        self.ipp = 0
        self.nFDTdataRecors = 0
        self.blocksize = 0
        self.dataOut = Spectra()
        self.profileIndex = 1  # Always
        self.dataOut.flagNoData = False
        self.dataOut.nRdPairs = 0
        self.dataOut.data_spc = None
        self.nextfileflag = True
        self.dataOut.RadarConst = 0
        self.dataOut.HSDV = []
        self.dataOut.NPW = []
        self.dataOut.COFA = []
Esempio n. 15
0
    def __init__(self, **kwargs):
        '''
        Constructor
        '''
        ProcessingUnit.__init__(self, **kwargs)

        self.isConfig = False

        self.datablock = None

        self.filename_current = None

        self.utc = 0

        self.ext = '.hdf5'

        self.flagIsNewFile = 1

        #-------------------------------------------------
        self.fileIndex = None

        self.profileIndex_offset = None

        self.filenameList = []

        self.hfFilePointer = None

        self.filename_online = None

        self.status = True

        self.flagNoMoreFiles = False

        self.__waitForNewFile = 20

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

        self.dataOut = self.createObjByDefault()
Esempio n. 16
0
    def __init__(self):  #, **kwargs):
        """
        Inicializador de la clase SpectraReader para la lectura de datos de espectros.

        Inputs:
            dataOut    :    Objeto de la clase Spectra. Este objeto sera utilizado para
                              almacenar un perfil de datos cada vez que se haga un requerimiento
                              (getData). El perfil sera obtenido a partir del buffer de datos,
                              si el buffer esta vacio se hara un nuevo proceso de lectura de un
                              bloque de datos.
                              Si este parametro no es pasado se creara uno internamente.

        Affected:
            self.dataOut

        Return      : None
        """

        ProcessingUnit.__init__(self)

        self.pts2read_SelfSpectra = 0
        self.pts2read_CrossSpectra = 0
        self.pts2read_DCchannels = 0
        self.ext = ".pdata"
        self.optchar = "P"
        self.basicHeaderObj = BasicHeader(LOCALTIME)
        self.systemHeaderObj = SystemHeader()
        self.radarControllerHeaderObj = RadarControllerHeader()
        self.processingHeaderObj = ProcessingHeader()
        self.lastUTTime = 0
        self.maxTimeStep = 30
        self.dataOut = Spectra()
        self.profileIndex = 1
        self.nRdChannels = None
        self.nRdPairs = None
        self.rdPairList = []
Esempio n. 17
0
    def __init__(self, **kwargs):

        ProcessingUnit.__init__(self, **kwargs)

        self.isConfig = False
        self.clientObj = None
Esempio n. 18
0
 def __init__(self):
     '''
     Inputs: None           
     '''
     ProcessingUnit.__init__(self)
     self.dataOut = Parameters()