@@ -13,7 +13,7 import datetime | |||
|
13 | 13 | |
|
14 | 14 | import numpy |
|
15 | 15 | |
|
16 | from schainpy.model.proc.jroproc_base import ProcessingUnit | |
|
16 | from schainpy.model.proc.jroproc_base import ProcessingUnit, MPDecorator | |
|
17 | 17 | from schainpy.model.data.jrodata import Parameters |
|
18 | 18 | from schainpy.model.io.jroIO_base import JRODataReader, isNumber |
|
19 | 19 | from schainpy.utils import log |
@@ -83,7 +83,7 DATA_STRUCTURE = numpy.dtype([ | |||
|
83 | 83 | ('sea_algorithm', '<u4') |
|
84 | 84 | ]) |
|
85 | 85 | |
|
86 | ||
|
86 | @MPDecorator | |
|
87 | 87 | class BLTRParamReader(JRODataReader, ProcessingUnit): |
|
88 | 88 | ''' |
|
89 | 89 | Boundary Layer and Tropospheric Radar (BLTR) reader, Wind velocities and SNR from *.sswma files |
@@ -185,7 +185,6 class BLTRParamReader(JRODataReader, ProcessingUnit): | |||
|
185 | 185 | file_id = self.fileIndex |
|
186 | 186 | |
|
187 | 187 | if file_id == len(self.fileList): |
|
188 | log.success('No more files in the folder', 'BLTRParamReader') | |
|
189 | 188 | self.flagNoMoreFiles = 1 |
|
190 | 189 | return 0 |
|
191 | 190 | |
@@ -240,7 +239,7 class BLTRParamReader(JRODataReader, ProcessingUnit): | |||
|
240 | 239 | |
|
241 | 240 | pointer = self.fp.tell() |
|
242 | 241 | header_rec = numpy.fromfile(self.fp, REC_HEADER_STRUCTURE, 1) |
|
243 | self.nchannels = header_rec['nchan'][0] / 2 | |
|
242 | self.nchannels = int(header_rec['nchan'][0] / 2) | |
|
244 | 243 | self.kchan = header_rec['nrxs'][0] |
|
245 | 244 | self.nmodes = header_rec['nmodes'][0] |
|
246 | 245 | self.nranges = header_rec['nranges'][0] |
@@ -357,8 +356,7 class BLTRParamReader(JRODataReader, ProcessingUnit): | |||
|
357 | 356 | ''' |
|
358 | 357 | if self.flagNoMoreFiles: |
|
359 | 358 | self.dataOut.flagNoData = True |
|
360 | log.success('No file left to process', 'BLTRParamReader') | |
|
361 | return 0 | |
|
359 | self.dataOut.error = (1, 'No More files to read') | |
|
362 | 360 | |
|
363 | 361 | if not self.readNextBlock(): |
|
364 | 362 | self.dataOut.flagNoData = True |
@@ -12,10 +12,10 from time import gmtime | |||
|
12 | 12 | |
|
13 | 13 | from numpy import transpose |
|
14 | 14 | |
|
15 | from .jroproc_base import ProcessingUnit, Operation | |
|
15 | from schainpy.model.proc.jroproc_base import ProcessingUnit, Operation, MPDecorator | |
|
16 | 16 | from schainpy.model.data.jrodata import Parameters |
|
17 | 17 | |
|
18 | ||
|
18 | @MPDecorator | |
|
19 | 19 | class BLTRParametersProc(ProcessingUnit): |
|
20 | 20 | ''' |
|
21 | 21 | Processing unit for BLTR parameters data (winds) |
@@ -39,13 +39,12 class BLTRParametersProc(ProcessingUnit): | |||
|
39 | 39 | self.dataOut.year - Experiment year |
|
40 | 40 | ''' |
|
41 | 41 | |
|
42 |
def __init__(self |
|
|
42 | def __init__(self): | |
|
43 | 43 | ''' |
|
44 | 44 | Inputs: None |
|
45 | 45 | ''' |
|
46 |
ProcessingUnit.__init__(self |
|
|
46 | ProcessingUnit.__init__(self) | |
|
47 | 47 | self.dataOut = Parameters() |
|
48 | self.isConfig = False | |
|
49 | 48 | |
|
50 | 49 | def setup(self, mode): |
|
51 | 50 | ''' |
General Comments 0
You need to be logged in to leave comments.
Login now