@@ -0,0 +1,34 | |||||
|
1 | #!/usr/bin/env python | |||
|
2 | ''' | |||
|
3 | Created on Jul 7, 2014 | |||
|
4 | ||||
|
5 | @author: roj-idl71 | |||
|
6 | ''' | |||
|
7 | import os, sys | |||
|
8 | ||||
|
9 | schainpy_path = os.path.dirname(os.getcwd()) | |||
|
10 | source_path = os.path.dirname(schainpy_path) | |||
|
11 | sys.path.insert(0, source_path) | |||
|
12 | ||||
|
13 | from schainpy.controller_api import ControllerThread | |||
|
14 | ||||
|
15 | def main(): | |||
|
16 | desc = "Segundo Test" | |||
|
17 | filename = "/Users/miguel/Downloads/mst_blocks.xml" | |||
|
18 | ||||
|
19 | controllerObj = ControllerThread() | |||
|
20 | controllerObj.readXml(filename) | |||
|
21 | ||||
|
22 | #Configure use of external plotter before start | |||
|
23 | plotterObj = controllerObj.useExternalPlotter() | |||
|
24 | ######################################## | |||
|
25 | ||||
|
26 | controllerObj.start() | |||
|
27 | plotterObj.start() | |||
|
28 | ||||
|
29 | ||||
|
30 | if __name__ == '__main__': | |||
|
31 | import time | |||
|
32 | start_time = time.time() | |||
|
33 | main() | |||
|
34 | print("--- %s seconds ---" % (time.time() - start_time)) No newline at end of file |
@@ -445,7 +445,7 class Voltage(JROData): | |||||
445 | if type == 1: |
|
445 | if type == 1: | |
446 | noise = self.getNoisebyHildebrand(channel) |
|
446 | noise = self.getNoisebyHildebrand(channel) | |
447 |
|
447 | |||
448 |
return |
|
448 | return noise | |
449 |
|
449 | |||
450 | def getPower(self, channel = None): |
|
450 | def getPower(self, channel = None): | |
451 |
|
451 |
@@ -135,21 +135,24 class SpectraProc(ProcessingUnit): | |||||
135 | dtype='complex') |
|
135 | dtype='complex') | |
136 |
|
136 | |||
137 | if self.dataIn.flagDataAsBlock: |
|
137 | if self.dataIn.flagDataAsBlock: | |
|
138 | #data dimension: [nChannels, nProfiles, nSamples] | |||
|
139 | nVoltProfiles = self.dataIn.data.shape[1] | |||
|
140 | nVoltProfiles = self.dataIn.nProfiles | |||
138 |
|
141 | |||
139 |
if |
|
142 | if nVoltProfiles == nProfiles: | |
140 | self.buffer = self.dataIn.data.copy() |
|
143 | self.buffer = self.dataIn.data.copy() | |
141 | self.profIndex = nProfiles |
|
144 | self.profIndex = nVoltProfiles | |
142 |
|
145 | |||
143 |
elif |
|
146 | elif nVoltProfiles < nProfiles: | |
144 |
|
147 | |||
145 | if self.profIndex == 0: |
|
148 | if self.profIndex == 0: | |
146 | self.id_min = 0 |
|
149 | self.id_min = 0 | |
147 |
self.id_max = |
|
150 | self.id_max = nVoltProfiles | |
148 |
|
151 | |||
149 | self.buffer[:,self.id_min:self.id_max,:] = self.dataIn.data |
|
152 | self.buffer[:,self.id_min:self.id_max,:] = self.dataIn.data | |
150 |
self.profIndex += |
|
153 | self.profIndex += nVoltProfiles | |
151 |
self.id_min += |
|
154 | self.id_min += nVoltProfiles | |
152 |
self.id_max += |
|
155 | self.id_max += nVoltProfiles | |
153 | else: |
|
156 | else: | |
154 | raise ValueError, "The type object %s has %d profiles, it should be equal to %d profiles"%(self.dataIn.type,self.dataIn.data.shape[1],nProfiles) |
|
157 | raise ValueError, "The type object %s has %d profiles, it should be equal to %d profiles"%(self.dataIn.type,self.dataIn.data.shape[1],nProfiles) | |
155 | self.dataOut.flagNoData = True |
|
158 | self.dataOut.flagNoData = True |
@@ -502,6 +502,7 class CohInt(Operation): | |||||
502 | Si la data es leida por bloques, dimension = [nChannels, nProfiles, nHeis] |
|
502 | Si la data es leida por bloques, dimension = [nChannels, nProfiles, nHeis] | |
503 | """ |
|
503 | """ | |
504 | avgdata, avgdatatime = self.integrateByBlock(dataOut) |
|
504 | avgdata, avgdatatime = self.integrateByBlock(dataOut) | |
|
505 | dataOut.nProfiles /= self.n | |||
505 | else: |
|
506 | else: | |
506 | avgdata, avgdatatime = self.integrate(dataOut.data, dataOut.utctime) |
|
507 | avgdata, avgdatatime = self.integrate(dataOut.data, dataOut.utctime) | |
507 |
|
508 |
General Comments 0
You need to be logged in to leave comments.
Login now