@@ -1,5 +1,4 | |||||
1 | import numpy |
|
1 | import numpy | |
2 | import math |
|
|||
3 |
|
2 | |||
4 | from jroproc_base import ProcessingUnit, Operation |
|
3 | from jroproc_base import ProcessingUnit, Operation | |
5 | from schainpy.model.data.jrodata import Spectra |
|
4 | from schainpy.model.data.jrodata import Spectra | |
@@ -496,10 +495,10 class SpectraProc(ProcessingUnit): | |||||
496 | jspc_interf = junkspc_interf.sum(axis = 0) / nhei_interf |
|
495 | jspc_interf = junkspc_interf.sum(axis = 0) / nhei_interf | |
497 | jspc_interf = jspc_interf.transpose() |
|
496 | jspc_interf = jspc_interf.transpose() | |
498 | #Calculando el espectro de interferencia promedio |
|
497 | #Calculando el espectro de interferencia promedio | |
499 |
noiseid = numpy.where(jspc_interf <= tmp_noise/ |
|
498 | noiseid = numpy.where(jspc_interf <= tmp_noise/ numpy.sqrt(num_incoh)) | |
500 | noiseid = noiseid[0] |
|
499 | noiseid = noiseid[0] | |
501 | cnoiseid = noiseid.size |
|
500 | cnoiseid = noiseid.size | |
502 |
interfid = numpy.where(jspc_interf > tmp_noise/ |
|
501 | interfid = numpy.where(jspc_interf > tmp_noise/ numpy.sqrt(num_incoh)) | |
503 | interfid = interfid[0] |
|
502 | interfid = interfid[0] | |
504 | cinterfid = interfid.size |
|
503 | cinterfid = interfid.size | |
505 |
|
504 | |||
@@ -528,11 +527,11 class SpectraProc(ProcessingUnit): | |||||
528 |
|
527 | |||
529 | if cinterfid > 0: |
|
528 | if cinterfid > 0: | |
530 | for ip in range(cinterfid*(interf == 2) - 1): |
|
529 | for ip in range(cinterfid*(interf == 2) - 1): | |
531 |
ind = (jspectra[ich,interfid[ip],:] < tmp_noise*(1 + 1/ |
|
530 | ind = (jspectra[ich,interfid[ip],:] < tmp_noise*(1 + 1/numpy.sqrt(num_incoh))).nonzero() | |
532 | cind = len(ind) |
|
531 | cind = len(ind) | |
533 |
|
532 | |||
534 | if (cind > 0): |
|
533 | if (cind > 0): | |
535 |
jspectra[ich,interfid[ip],ind] = tmp_noise*(1 + (numpy.random.uniform(cind) - 0.5)/ |
|
534 | jspectra[ich,interfid[ip],ind] = tmp_noise*(1 + (numpy.random.uniform(cind) - 0.5)/numpy.sqrt(num_incoh)) | |
536 |
|
535 | |||
537 | ind = numpy.array([-2,-1,1,2]) |
|
536 | ind = numpy.array([-2,-1,1,2]) | |
538 | xx = numpy.zeros([4,4]) |
|
537 | xx = numpy.zeros([4,4]) | |
@@ -547,8 +546,8 class SpectraProc(ProcessingUnit): | |||||
547 | jspectra[ich,mask_prof[maxid],:] = numpy.dot(yy.transpose(),xx) |
|
546 | jspectra[ich,mask_prof[maxid],:] = numpy.dot(yy.transpose(),xx) | |
548 |
|
547 | |||
549 |
|
548 | |||
550 |
indAux = (jspectra[ich,:,:] < tmp_noise*(1-1/ |
|
549 | indAux = (jspectra[ich,:,:] < tmp_noise*(1-1/numpy.sqrt(num_incoh))).nonzero() | |
551 |
jspectra[ich,indAux[0],indAux[1]] = tmp_noise * (1 - 1/ |
|
550 | jspectra[ich,indAux[0],indAux[1]] = tmp_noise * (1 - 1/numpy.sqrt(num_incoh)) | |
552 |
|
551 | |||
553 | #Remocion de Interferencia en el Cross Spectra |
|
552 | #Remocion de Interferencia en el Cross Spectra | |
554 | if jcspectra is None: return jspectra, jcspectra |
|
553 | if jcspectra is None: return jspectra, jcspectra |
General Comments 0
You need to be logged in to leave comments.
Login now