Please enable JavaScript to use RhodeCode Enterprise
##// END OF EJS Templates
avaldez
- Thu, 22 Aug 2019 22:52:22
Show More
0
schainpy/model/data/jrodata.py
schainpy/model/data/jrodata.py
+3
0
@@
-605,8
+605,11
class Spectra(JROData):
605
605
noise = numpy . zeros ( self . nChannels )
606
606
607
607
for channel in range ( self . nChannels ):
608
#print "confuse",self.data_spc.dtype
608
609
daux = self . data_spc [ channel ,
609
610
xmin_index : xmax_index , ymin_index : ymax_index ]
611
612
#print "HI3.0",(daux.dtype),daux.shape
610
613
noise [ channel ] = hildebrand_sekhon ( daux , self . nIncohInt )
611
614
612
615
return noise
0
schainpy/model/graphics/jroplot_spectra.py
schainpy/model/graphics/jroplot_spectra.py
+4
-3
@@
-142,9
+142,10
class SpectraPlot(Figure):
142
142
z = numpy . where ( numpy . isfinite ( z ), z , numpy . NAN )
143
143
zdB = 10 * numpy . log10 ( z )
144
144
145
#print "a000",dataOut.data_spc.dtype
145
146
avg = numpy . average ( z , axis = 1 )
146
147
avgdB = 10 * numpy . log10 ( avg )
147
148
#print "before plot"
148
149
noise = dataOut . getNoise () / factor
149
150
noisedB = 10 * numpy . log10 ( noise )
150
151
@@
-315,7
+316,7
class CrossSpectraPlot(Figure):
315
316
316
317
if len ( pairsIndexList ) > 4 :
317
318
pairsIndexList = pairsIndexList [ 0 : 4 ]
318
319
319
320
if normFactor is None :
320
321
factor = dataOut . normFactor
321
322
else :
@@
-544,7
+545,7
class RTIPlot(Figure):
544
545
#colormap = kwargs.get('colormap', 'jet')
545
546
if HEIGHT is not None :
546
547
self . HEIGHT = HEIGHT
547
548
548
549
if not isTimeInHourRange ( dataOut . datatime , xmin , xmax ):
549
550
return
550
551
0
schainpy/model/proc/jroproc_spectra.py
schainpy/model/proc/jroproc_spectra.py
+2
0
@@
-85,8
+85,10
class SpectraProc(ProcessingUnit):
85
85
86
86
# calculo de self-spectra
87
87
fft_volt = numpy . fft . fftshift ( fft_volt , axes = ( 1 ,))
88
#print "spec dtype 0",fft_volt.dtype
88
89
spc = fft_volt * numpy . conjugate ( fft_volt )
89
90
spc = spc . real
91
#print "spec dtype 1",spc.dtype
90
92
91
93
blocksize = 0
92
94
blocksize += dc . size
0
schainpy/model/proc/jroproc_spectra_acf.py
schainpy/model/proc/jroproc_spectra_acf.py
+22
-1
@@
-102,10
+102,13
class SpectraAFCProc(ProcessingUnit):
102
102
# fft_volt = numpy.fft.fftshift(fft_volt, axes=(1,))
103
103
spc = fft_volt * numpy . conjugate ( fft_volt )
104
104
105
105
106
data = numpy . fft . ifft ( spc , axis = 1 )
106
107
data = numpy . fft . fftshift ( data , axes = ( 1 ,))
107
108
108
spc = data
109
spc = data . real
110
111
109
112
110
113
blocksize = 0
111
114
blocksize += dc . size
@@
-140,6
+143,24
class SpectraAFCProc(ProcessingUnit):
140
143
141
144
self . dataOut . flagNoData = True
142
145
146
if self . dataIn . type == "Spectra" :
147
self . dataOut . copy ( self . dataIn )
148
spc = self . dataOut . data_spc
149
data = numpy . fft . ifft ( spc , axis = 1 )
150
data = numpy . fft . fftshift ( data , axes = ( 1 ,))
151
spc = data . real
152
spc = spc [ 0 ,:, 0 ] / numpy . max ( numpy . abs ( spc [ 0 ,:, 0 ]))
153
print spc
154
import matplotlib.pyplot as plt
155
#plt.plot(spc[10:])
156
plt . show ()
157
158
159
self . dataOut . data_spc = spc
160
161
return True
162
163
143
164
if code is not None :
144
165
self . code = numpy . array ( code ) . reshape ( nCode , nBaud )
145
166
else :
0
schainpy/model/proc/jroproc_voltage.py
schainpy/model/proc/jroproc_voltage.py
+2
-2
@@
-1209,7
+1209,7
class SSheightProfiles(Operation):
1209
1209
self . __nProfiles = dataOut . nProfiles
1210
1210
self . __nHeis = dataOut . nHeights
1211
1211
shape = dataOut . data . shape #nchannels, nprofiles, nsamples
1212
1212
print "shape" , shape
1213
1213
#last test
1214
1214
residue = ( shape [ 1 ] - self . nsamples ) % self . step
1215
1215
if residue != 0 :
@@
-1219,7
+1219,7
class SSheightProfiles(Operation):
1219
1219
numberProfile = self . nsamples
1220
1220
numberSamples = ( shape [ 1 ] - self . nsamples ) / self . step
1221
1221
1222
print "New number of profile: %d , number of height: %d , Resolution %d " % ( numberProfile , numberSamples , deltaHeight * self . step )
1222
print "New number of profile: %d , number of height: %d , Resolution %d Km "% ( numberProfile , numberSamples , deltaHeight * self . step )
1223
1223
1224
1224
self . bufferShape = shape [ 0 ], numberSamples , numberProfile # nchannels, nsamples , nprofiles
1225
1225
self . profileShape = shape [ 0 ], numberProfile , numberSamples # nchannels, nprofiles, nsamples
Site-wide shortcuts
/
Use quick search box
g h
Goto home page
g g
Goto my private gists page
g G
Goto my public gists page
g 0-9
Goto bookmarked items from 0-9
n r
New repository page
n g
New gist page
Repositories
g s
Goto summary page
g c
Goto changelog page
g f
Goto files page
g F
Goto files page with file search activated
g p
Goto pull requests page
g o
Goto repository settings
g O
Goto repository access permissions settings
t s
Toggle sidebar on some pages