@@ -399,7 +399,7 class HDFWriter(Operation): | |||||
399 | return |
|
399 | return | |
400 |
|
400 | |||
401 | def setup(self, path=None, blocksPerFile=10, metadataList=None, dataList=None, setType=None, |
|
401 | def setup(self, path=None, blocksPerFile=10, metadataList=None, dataList=None, setType=None, | |
402 |
description= |
|
402 | description={},timeZone = "ut",hourLimit = 3, breakDays=True): | |
403 | self.path = path |
|
403 | self.path = path | |
404 | self.blocksPerFile = blocksPerFile |
|
404 | self.blocksPerFile = blocksPerFile | |
405 | self.metadataList = metadataList |
|
405 | self.metadataList = metadataList | |
@@ -442,9 +442,10 class HDFWriter(Operation): | |||||
442 |
|
442 | |||
443 | def timeFlag(self): |
|
443 | def timeFlag(self): | |
444 | currentTime = self.dataOut.utctime |
|
444 | currentTime = self.dataOut.utctime | |
|
445 | timeTuple = None | |||
445 | if self.timeZone == "lt": |
|
446 | if self.timeZone == "lt": | |
446 | timeTuple = time.localtime(currentTime) |
|
447 | timeTuple = time.localtime(currentTime) | |
447 | elif self.timeZone == "ut": |
|
448 | else : | |
448 | timeTuple = time.gmtime(currentTime) |
|
449 | timeTuple = time.gmtime(currentTime) | |
449 |
|
450 | |||
450 | dataDay = timeTuple.tm_yday |
|
451 | dataDay = timeTuple.tm_yday | |
@@ -484,6 +485,7 class HDFWriter(Operation): | |||||
484 | ext = self.ext |
|
485 | ext = self.ext | |
485 | path = self.path |
|
486 | path = self.path | |
486 | setFile = self.setFile |
|
487 | setFile = self.setFile | |
|
488 | timeTuple = None | |||
487 | if self.timeZone == "lt": |
|
489 | if self.timeZone == "lt": | |
488 | timeTuple = time.localtime(self.dataOut.utctime) |
|
490 | timeTuple = time.localtime(self.dataOut.utctime) | |
489 | elif self.timeZone == "ut": |
|
491 | elif self.timeZone == "ut": | |
@@ -643,6 +645,7 class HDFWriter(Operation): | |||||
643 | if (self.blockIndex == self.blocksPerFile) or self.timeFlag(): |
|
645 | if (self.blockIndex == self.blocksPerFile) or self.timeFlag(): | |
644 | self.closeFile() |
|
646 | self.closeFile() | |
645 | self.setNextFile() |
|
647 | self.setNextFile() | |
|
648 | print("breaking file") | |||
646 |
|
649 | |||
647 | for i, ds in enumerate(self.ds): |
|
650 | for i, ds in enumerate(self.ds): | |
648 | attr, ch = self.data[i] |
|
651 | attr, ch = self.data[i] |
@@ -121,7 +121,7 class SpectraProc(ProcessingUnit): | |||||
121 | self.dataOut.flagShiftFFT = False |
|
121 | self.dataOut.flagShiftFFT = False | |
122 |
|
122 | |||
123 | def run(self, nProfiles=None, nFFTPoints=None, pairsList=None, ippFactor=None, shift_fft=False): |
|
123 | def run(self, nProfiles=None, nFFTPoints=None, pairsList=None, ippFactor=None, shift_fft=False): | |
124 |
|
124 | #print("spectra run") | ||
125 | if self.dataIn.type == "Spectra": |
|
125 | if self.dataIn.type == "Spectra": | |
126 | self.dataOut.copy(self.dataIn) |
|
126 | self.dataOut.copy(self.dataIn) | |
127 | if shift_fft: |
|
127 | if shift_fft: |
General Comments 0
You need to be logged in to leave comments.
Login now