@@ -11,7 +11,7 class Data: | |||||
11 | ''' |
|
11 | ''' | |
12 | classdocs |
|
12 | classdocs | |
13 | ''' |
|
13 | ''' | |
14 |
|
|
14 | type = None | |
15 |
|
15 | |||
16 | def __init__(self): |
|
16 | def __init__(self): | |
17 | ''' |
|
17 | ''' | |
@@ -50,7 +50,7 class JROData(Data): | |||||
50 | m_ProcessingHeader = ProcessingHeader() |
|
50 | m_ProcessingHeader = ProcessingHeader() | |
51 | m_SystemHeader = SystemHeader() |
|
51 | m_SystemHeader = SystemHeader() | |
52 | m_BasicHeader = BasicHeader() |
|
52 | m_BasicHeader = BasicHeader() | |
53 | m_Noise = Noise() |
|
53 | m_NoiseObj = Noise() | |
54 |
|
54 | |||
55 | data = None |
|
55 | data = None | |
56 | dataType = None |
|
56 | dataType = None |
@@ -56,7 +56,7 class BasicHeader(Header): | |||||
56 | pass |
|
56 | pass | |
57 |
|
57 | |||
58 | def read(self, fp): |
|
58 | def read(self, fp): | |
59 |
|
59 | try: | ||
60 | header = numpy.fromfile(fp, self.struct,1) |
|
60 | header = numpy.fromfile(fp, self.struct,1) | |
61 | self.size = header['nSize'][0] |
|
61 | self.size = header['nSize'][0] | |
62 | self.version = header['nVersion'][0] |
|
62 | self.version = header['nVersion'][0] | |
@@ -66,6 +66,8 class BasicHeader(Header): | |||||
66 | self.timeZone = header['nTimezone'][0] |
|
66 | self.timeZone = header['nTimezone'][0] | |
67 | self.dstFlag = header['nDstflag'][0] |
|
67 | self.dstFlag = header['nDstflag'][0] | |
68 | self.errorCount = header['nErrorCount'][0] |
|
68 | self.errorCount = header['nErrorCount'][0] | |
|
69 | except: | |||
|
70 | return 0 | |||
69 |
|
71 | |||
70 | return 1 |
|
72 | return 1 | |
71 |
|
73 | |||
@@ -104,6 +106,7 class SystemHeader(Header): | |||||
104 |
|
106 | |||
105 |
|
107 | |||
106 | def read(self, fp): |
|
108 | def read(self, fp): | |
|
109 | try: | |||
107 | header = numpy.fromfile(fp,self.struct,1) |
|
110 | header = numpy.fromfile(fp,self.struct,1) | |
108 | self.size = header['nSize'][0] |
|
111 | self.size = header['nSize'][0] | |
109 | self.numSamples = header['nNumSamples'][0] |
|
112 | self.numSamples = header['nNumSamples'][0] | |
@@ -111,7 +114,8 class SystemHeader(Header): | |||||
111 | self.numChannels = header['nNumChannels'][0] |
|
114 | self.numChannels = header['nNumChannels'][0] | |
112 | self.adcResolution = header['nADCResolution'][0] |
|
115 | self.adcResolution = header['nADCResolution'][0] | |
113 | self.pciDioBusWidth = header['nPCDIOBusWidth'][0] |
|
116 | self.pciDioBusWidth = header['nPCDIOBusWidth'][0] | |
114 |
|
117 | except: | ||
|
118 | return 0 | |||
115 |
|
119 | |||
116 | return 1 |
|
120 | return 1 | |
117 |
|
121 | |||
@@ -184,6 +188,7 class RadarControllerHeader(Header): | |||||
184 |
|
188 | |||
185 |
|
189 | |||
186 | def read(self, fp): |
|
190 | def read(self, fp): | |
|
191 | try: | |||
187 | header = numpy.fromfile(fp,self.struct,1) |
|
192 | header = numpy.fromfile(fp,self.struct,1) | |
188 | self.size = header['nSize'][0] |
|
193 | self.size = header['nSize'][0] | |
189 | self.expType = header['nExpType'][0] |
|
194 | self.expType = header['nExpType'][0] | |
@@ -205,6 +210,8 class RadarControllerHeader(Header): | |||||
205 | # jump Dynamic Radar Controller Header |
|
210 | # jump Dynamic Radar Controller Header | |
206 | jumpHeader = self.size - 116 |
|
211 | jumpHeader = self.size - 116 | |
207 | self.dynamic = numpy.fromfile(fp,numpy.dtype('byte'),jumpHeader) |
|
212 | self.dynamic = numpy.fromfile(fp,numpy.dtype('byte'),jumpHeader) | |
|
213 | except: | |||
|
214 | return 0 | |||
208 |
|
215 | |||
209 | return 1 |
|
216 | return 1 | |
210 |
|
217 | |||
@@ -287,6 +294,7 class ProcessingHeader(Header): | |||||
287 | self.shif_fft = False |
|
294 | self.shif_fft = False | |
288 |
|
295 | |||
289 | def read(self, fp): |
|
296 | def read(self, fp): | |
|
297 | try: | |||
290 | header = numpy.fromfile(fp,self.struct,1) |
|
298 | header = numpy.fromfile(fp,self.struct,1) | |
291 | self.size = header['nSize'][0] |
|
299 | self.size = header['nSize'][0] | |
292 | self.dataType = header['nDataType'][0] |
|
300 | self.dataType = header['nDataType'][0] | |
@@ -314,7 +322,8 class ProcessingHeader(Header): | |||||
314 | self.shif_fft = True |
|
322 | self.shif_fft = True | |
315 | else: |
|
323 | else: | |
316 | self.shif_fft = False |
|
324 | self.shif_fft = False | |
317 |
|
325 | except: | ||
|
326 | return 0 | |||
318 |
|
327 | |||
319 | return 1 |
|
328 | return 1 | |
320 |
|
329 |
@@ -13,6 +13,7 class Spectra(JROData): | |||||
13 | classdocs |
|
13 | classdocs | |
14 | ''' |
|
14 | ''' | |
15 |
|
15 | |||
|
16 | type = "Spectra" | |||
16 | data_spc = None |
|
17 | data_spc = None | |
17 | data_cspc = None |
|
18 | data_cspc = None | |
18 | data_dc = None |
|
19 | data_dc = None | |
@@ -32,11 +33,13 class Spectra(JROData): | |||||
32 |
|
33 | |||
33 | self.m_BasicHeader = BasicHeader() |
|
34 | self.m_BasicHeader = BasicHeader() | |
34 |
|
35 | |||
35 |
|
|
36 | m_NoiseObj = Noise() | |
36 |
|
37 | |||
37 | #data es un numpy array de 3 dmensiones (perfiles, alturas y canales) |
|
38 | #data es un numpy array de 3 dmensiones (perfiles, alturas y canales) | |
38 | self.data_spc = None |
|
39 | self.data_spc = None | |
|
40 | ||||
39 | self.data_cspc = None |
|
41 | self.data_cspc = None | |
|
42 | ||||
40 | self.data_dc = None |
|
43 | self.data_dc = None | |
41 |
|
44 | |||
42 | self.heights = None |
|
45 | self.heights = None |
@@ -13,6 +13,7 class Voltage(JROData): | |||||
13 | classdocs |
|
13 | classdocs | |
14 | ''' |
|
14 | ''' | |
15 |
|
15 | |||
|
16 | type = "Voltage" | |||
16 | data = None |
|
17 | data = None | |
17 | profileIndex = None |
|
18 | profileIndex = None | |
18 |
|
19 | |||
@@ -29,7 +30,7 class Voltage(JROData): | |||||
29 |
|
30 | |||
30 | self.m_BasicHeader= BasicHeader() |
|
31 | self.m_BasicHeader= BasicHeader() | |
31 |
|
32 | |||
32 |
|
|
33 | m_NoiseObj = Noise() | |
33 |
|
34 | |||
34 | #data es un numpy array de 3 dmensiones (perfiles, alturas y canales) |
|
35 | #data es un numpy array de 3 dmensiones (perfiles, alturas y canales) | |
35 | self.data = None |
|
36 | self.data = None |
General Comments 0
You need to be logged in to leave comments.
Login now