@@ -584,7 +584,7 class DigitalRFWriter(Operation): | |||||
584 | self.__nSamples = dataOut.systemHeaderObj.nSamples |
|
584 | self.__nSamples = dataOut.systemHeaderObj.nSamples | |
585 | self.__nProfiles = dataOut.nProfiles |
|
585 | self.__nProfiles = dataOut.nProfiles | |
586 | self.__blocks_per_file = dataOut.processingHeaderObj.dataBlocksPerFile |
|
586 | self.__blocks_per_file = dataOut.processingHeaderObj.dataBlocksPerFile | |
587 |
self.arr_data = arr_data = numpy.ones((self.__nSamples, |
|
587 | self.arr_data = arr_data = numpy.ones((self.__nSamples, 2), dtype=[('r', self.__dtype), ('i', self.__dtype)]) | |
588 |
|
588 | |||
589 | file_cadence_millisecs = long(1.0 * self.__blocks_per_file * self.__nProfiles * self.__nSamples / self.__sample_rate) * 1000 |
|
589 | file_cadence_millisecs = long(1.0 * self.__blocks_per_file * self.__nProfiles * self.__nSamples / self.__sample_rate) * 1000 | |
590 | sub_cadence_secs = file_cadence_millisecs / 500 |
|
590 | sub_cadence_secs = file_cadence_millisecs / 500 | |
@@ -601,7 +601,7 class DigitalRFWriter(Operation): | |||||
601 | compression_level = 1 |
|
601 | compression_level = 1 | |
602 | checksum = False |
|
602 | checksum = False | |
603 | is_complex = True |
|
603 | is_complex = True | |
604 |
num_subchannels = |
|
604 | num_subchannels = 2 | |
605 | is_continuous = True |
|
605 | is_continuous = True | |
606 | marching_periods = False |
|
606 | marching_periods = False | |
607 |
|
607 | |||
@@ -635,8 +635,9 class DigitalRFWriter(Operation): | |||||
635 |
|
635 | |||
636 | def writeData(self): |
|
636 | def writeData(self): | |
637 | for i in range(self.dataOut.systemHeaderObj.nSamples): |
|
637 | for i in range(self.dataOut.systemHeaderObj.nSamples): | |
638 | self.arr_data[i]['r'] = self.dataOut.data[0][i].real |
|
638 | for channel in self.dataOut.channelList: | |
639 |
self.arr_data[i][' |
|
639 | self.arr_data[i][channel]['r'] = self.dataOut.data[channel][i].real | |
|
640 | self.arr_data[i][channel]['i'] = self.dataOut.data[channel][i].imag | |||
640 | self.digitalWriteObj.rf_write(self.arr_data) |
|
641 | self.digitalWriteObj.rf_write(self.arr_data) | |
641 | return |
|
642 | return | |
642 |
|
643 |
@@ -1,1 +1,1 | |||||
1 | <Project description="Testing USRP data reader" id="191" name="test01"><ReadUnit datatype="DigitalRF" id="1911" inputId="0" name="DigitalRFReader"><Operation id="19111" name="run" priority="1" type="self"><Parameter format="str" id="191111" name="datatype" value="DigitalRF" /><Parameter format="str" id="191112" name="path" value="/home/jchavez/jicamarca/mocked_data" /><Parameter format="date" id="191113" name="startDate" value="2000/07/03" /><Parameter format="date" id="191114" name="endDate" value="2017/07/03" /><Parameter format="time" id="191115" name="startTime" value="00:00:00" /><Parameter format="time" id="191116" name="endTime" value="23:59:59" /><Parameter format="int" id="191118" name="online" value="0" /></Operation></ReadUnit><ProcUnit datatype="Voltage" id="1912" inputId="1911" name="VoltageProc"><Operation id="19121" name="run" priority="1" type="self" /></ProcUnit></Project> No newline at end of file |
|
1 | <Project description="Segundo Test" id="191" name="test01"><ReadUnit datatype="VoltageReader" id="1911" inputId="0" name="VoltageReader"><Operation id="19111" name="run" priority="1" type="self"><Parameter format="str" id="191111" name="datatype" value="VoltageReader" /><Parameter format="str" id="191112" name="path" value="/home/jchavez/jicamarca/jro_data/rawdata" /><Parameter format="date" id="191113" name="startDate" value="2010/10/28" /><Parameter format="date" id="191114" name="endDate" value="2017/10/28" /><Parameter format="time" id="191115" name="startTime" value="00:00:00" /><Parameter format="time" id="191116" name="endTime" value="23:59:59" /><Parameter format="int" id="191118" name="online" value="0" /><Parameter format="int" id="191119" name="walk" value="0" /></Operation><Operation id="19112" name="printNumberOfBlock" priority="2" type="self" /></ReadUnit><ProcUnit datatype="VoltageProc" id="1912" inputId="1911" name="VoltageProc"><Operation id="19121" name="run" priority="1" type="self" /><Operation id="19122" name="DigitalRFWriter" priority="2" type="other"><Parameter format="str" id="191221" name="path" value="/media/jchavez/DATA/mocked_data/voltage" /></Operation></ProcUnit></Project> No newline at end of file |
@@ -49,9 +49,9 def main(): | |||||
49 | # opObj10 = procUnitConfObj0.addOperation(name='CohInt', optype='external') |
|
49 | # opObj10 = procUnitConfObj0.addOperation(name='CohInt', optype='external') | |
50 | # opObj10.addParameter(name='n', value='1', format='float') |
|
50 | # opObj10.addParameter(name='n', value='1', format='float') | |
51 |
|
51 | |||
52 |
|
|
52 | opObj11 = procUnitConfObj0.addOperation(name='Scope', optype='external') | |
53 |
|
|
53 | opObj11.addParameter(name='id', value='121', format='int') | |
54 |
|
|
54 | opObj11.addParameter(name='wintitle', value='Scope', format='str') | |
55 |
|
55 | |||
56 | # procUnitConfObj1 = controllerObj.addProcUnit(datatype='Spectra', |
|
56 | # procUnitConfObj1 = controllerObj.addProcUnit(datatype='Spectra', | |
57 | # inputId=procUnitConfObj0.getId()) |
|
57 | # inputId=procUnitConfObj0.getId()) |
@@ -30,7 +30,7 if __name__ == '__main__': | |||||
30 | # opObj11.addParameter(name='wintitle', value='Scope', format='str') |
|
30 | # opObj11.addParameter(name='wintitle', value='Scope', format='str') | |
31 |
|
31 | |||
32 | opObj10 = procUnitConfObj0.addOperation(name='DigitalRFWriter', optype='other') |
|
32 | opObj10 = procUnitConfObj0.addOperation(name='DigitalRFWriter', optype='other') | |
33 |
opObj10.addParameter(name='path', value='/ |
|
33 | opObj10.addParameter(name='path', value='/media/jchavez/DATA/mocked_data/voltage', format='str') | |
34 | # opObj10.addParameter(name='minHei', value='0', format='float') |
|
34 | # opObj10.addParameter(name='minHei', value='0', format='float') | |
35 | # opObj10.addParameter(name='maxHei', value='8', format='float') |
|
35 | # opObj10.addParameter(name='maxHei', value='8', format='float') | |
36 |
|
36 |
General Comments 0
You need to be logged in to leave comments.
Login now