@@ -418,7 +418,7 class JRODataReader(JRODataIO): | |||||
418 |
|
418 | |||
419 | return directory, filename, year, doy, set |
|
419 | return directory, filename, year, doy, set | |
420 |
|
420 | |||
421 |
def setup(self, |
|
421 | def setup(self, | |
422 | path=None, |
|
422 | path=None, | |
423 | startDate=None, |
|
423 | startDate=None, | |
424 | endDate=None, |
|
424 | endDate=None, | |
@@ -436,10 +436,8 class JRODataReader(JRODataIO): | |||||
436 | if ext == None: |
|
436 | if ext == None: | |
437 | ext = self.ext |
|
437 | ext = self.ext | |
438 |
|
438 | |||
439 |
if dataOut |
|
439 | if dataOut != None: | |
440 |
dataOut = |
|
440 | self.dataOut = dataOut | |
441 |
|
||||
442 | self.dataOut = dataOut |
|
|||
443 |
|
441 | |||
444 | if online: |
|
442 | if online: | |
445 | print "Searching files in online mode..." |
|
443 | print "Searching files in online mode..." | |
@@ -993,7 +991,7 class JRODataWriter(JRODataIO): | |||||
993 |
|
991 | |||
994 | return 1 |
|
992 | return 1 | |
995 |
|
993 | |||
996 | def setup(self, path, blocksPerFile, profilesPerBlock=None, set=0, ext=None): |
|
994 | def setup(self, dataOut, path, blocksPerFile, profilesPerBlock=None, set=0, ext=None): | |
997 | """ |
|
995 | """ | |
998 | Setea el tipo de formato en la cual sera guardada la data y escribe el First Header |
|
996 | Setea el tipo de formato en la cual sera guardada la data y escribe el First Header | |
999 |
|
997 | |||
@@ -1022,6 +1020,8 class JRODataWriter(JRODataIO): | |||||
1022 |
|
1020 | |||
1023 | self.profilesPerBlock = profilesPerBlock |
|
1021 | self.profilesPerBlock = profilesPerBlock | |
1024 |
|
1022 | |||
|
1023 | self.dataOut = dataOut | |||
|
1024 | ||||
1025 | if not(self.setNextFile()): |
|
1025 | if not(self.setNextFile()): | |
1026 | print "There isn't a next file" |
|
1026 | print "There isn't a next file" | |
1027 | return 0 |
|
1027 | return 0 | |
@@ -1034,8 +1034,7 class JRODataWriter(JRODataIO): | |||||
1034 |
|
1034 | |||
1035 | if not(self.isConfig): |
|
1035 | if not(self.isConfig): | |
1036 |
|
1036 | |||
1037 |
self.dataOut |
|
1037 | self.setup(dataOut, **kwargs) | |
1038 | self.setup(**kwargs) |
|
|||
1039 | self.isConfig = True |
|
1038 | self.isConfig = True | |
1040 |
|
1039 | |||
1041 | self.putData() |
|
1040 | self.putData() | |
@@ -1087,7 +1086,7 class VoltageReader(JRODataReader): | |||||
1087 | dataOut = None |
|
1086 | dataOut = None | |
1088 |
|
1087 | |||
1089 |
|
1088 | |||
1090 |
def __init__(self |
|
1089 | def __init__(self): | |
1091 | """ |
|
1090 | """ | |
1092 | Inicializador de la clase VoltageReader para la lectura de datos de voltage. |
|
1091 | Inicializador de la clase VoltageReader para la lectura de datos de voltage. | |
1093 |
|
1092 | |||
@@ -1179,6 +1178,8 class VoltageReader(JRODataReader): | |||||
1179 | self.nTotalBlocks = 0 |
|
1178 | self.nTotalBlocks = 0 | |
1180 |
|
1179 | |||
1181 | self.blocksize = 0 |
|
1180 | self.blocksize = 0 | |
|
1181 | ||||
|
1182 | dataOut = self.createObjByDefault() | |||
1182 |
|
1183 | |||
1183 | def createObjByDefault(self): |
|
1184 | def createObjByDefault(self): | |
1184 |
|
1185 | |||
@@ -1361,7 +1362,7 class VoltageWriter(JRODataWriter): | |||||
1361 | shapeBuffer = None |
|
1362 | shapeBuffer = None | |
1362 |
|
1363 | |||
1363 |
|
1364 | |||
1364 |
def __init__(self |
|
1365 | def __init__(self): | |
1365 | """ |
|
1366 | """ | |
1366 | Inicializador de la clase VoltageWriter para la escritura de datos de espectros. |
|
1367 | Inicializador de la clase VoltageWriter para la escritura de datos de espectros. | |
1367 |
|
1368 | |||
@@ -1370,13 +1371,6 class VoltageWriter(JRODataWriter): | |||||
1370 |
|
1371 | |||
1371 | Return: None |
|
1372 | Return: None | |
1372 | """ |
|
1373 | """ | |
1373 | if dataOut == None: |
|
|||
1374 | dataOut = Voltage() |
|
|||
1375 |
|
||||
1376 | if not( isinstance(dataOut, Voltage) ): |
|
|||
1377 | raise ValueError, "in VoltageReader, dataOut must be an Spectra class object" |
|
|||
1378 |
|
||||
1379 | self.dataOut = dataOut |
|
|||
1380 |
|
1374 | |||
1381 | self.nTotalBlocks = 0 |
|
1375 | self.nTotalBlocks = 0 | |
1382 |
|
1376 | |||
@@ -1688,7 +1682,7 class SpectraReader(JRODataReader): | |||||
1688 | rdPairList = [] |
|
1682 | rdPairList = [] | |
1689 |
|
1683 | |||
1690 |
|
1684 | |||
1691 |
def __init__(self |
|
1685 | def __init__(self): | |
1692 | """ |
|
1686 | """ | |
1693 | Inicializador de la clase SpectraReader para la lectura de datos de espectros. |
|
1687 | Inicializador de la clase SpectraReader para la lectura de datos de espectros. | |
1694 |
|
1688 | |||
@@ -1781,6 +1775,8 class SpectraReader(JRODataReader): | |||||
1781 | self.nTotalBlocks = 0 |
|
1775 | self.nTotalBlocks = 0 | |
1782 |
|
1776 | |||
1783 | self.blocksize = 0 |
|
1777 | self.blocksize = 0 | |
|
1778 | ||||
|
1779 | dataOut = self.createObjByDefault() | |||
1784 |
|
1780 | |||
1785 |
|
1781 | |||
1786 | def createObjByDefault(self): |
|
1782 | def createObjByDefault(self): | |
@@ -2020,7 +2016,7 class SpectraWriter(JRODataWriter): | |||||
2020 |
|
2016 | |||
2021 | # dataOut = None |
|
2017 | # dataOut = None | |
2022 |
|
2018 | |||
2023 |
def __init__(self |
|
2019 | def __init__(self): | |
2024 | """ |
|
2020 | """ | |
2025 | Inicializador de la clase SpectraWriter para la escritura de datos de espectros. |
|
2021 | Inicializador de la clase SpectraWriter para la escritura de datos de espectros. | |
2026 |
|
2022 | |||
@@ -2033,13 +2029,6 class SpectraWriter(JRODataWriter): | |||||
2033 |
|
2029 | |||
2034 | Return: None |
|
2030 | Return: None | |
2035 | """ |
|
2031 | """ | |
2036 | if dataOut == None: |
|
|||
2037 | dataOut = Spectra() |
|
|||
2038 |
|
||||
2039 | if not( isinstance(dataOut, Spectra) ): |
|
|||
2040 | raise ValueError, "in SpectraReader, dataOut must be an Spectra class object" |
|
|||
2041 |
|
||||
2042 | self.dataOut = dataOut |
|
|||
2043 |
|
2032 | |||
2044 | self.isConfig = False |
|
2033 | self.isConfig = False | |
2045 |
|
2034 |
General Comments 0
You need to be logged in to leave comments.
Login now