@@ -616,8 +616,8 class SpectraProc(ProcessingUnit): | |||||
616 | # hei_interf |
|
616 | # hei_interf | |
617 | if hei_interf is None: |
|
617 | if hei_interf is None: | |
618 | count_hei = num_hei / 2 # Como es entero no importa |
|
618 | count_hei = num_hei / 2 # Como es entero no importa | |
619 | hei_interf = numpy.asmatrix(list(range(count_hei))) + num_hei - count_hei |
|
619 | hei_interf = numpy.asmatrix(list(range(int(count_hei)))) + num_hei - count_hei | |
620 | hei_interf = numpy.asarray(hei_interf)[0] |
|
620 | hei_interf = numpy.asarray(hei_interf)[0].astype('int') | |
621 | # nhei_interf |
|
621 | # nhei_interf | |
622 | if (nhei_interf == None): |
|
622 | if (nhei_interf == None): | |
623 | nhei_interf = 5 |
|
623 | nhei_interf = 5 | |
@@ -687,7 +687,7 class SpectraProc(ProcessingUnit): | |||||
687 | for ip in range(new_cinterfid): |
|
687 | for ip in range(new_cinterfid): | |
688 | ind = junkspc_interf[:, new_interfid[ip]].ravel().argsort() |
|
688 | ind = junkspc_interf[:, new_interfid[ip]].ravel().argsort() | |
689 | jspc_interf[new_interfid[ip] |
|
689 | jspc_interf[new_interfid[ip] | |
690 | ] = junkspc_interf[ind[nhei_interf / 2], new_interfid[ip]] |
|
690 | ] = junkspc_interf[ind[nhei_interf // 2], new_interfid[ip]] | |
691 |
|
691 | |||
692 | jspectra[ich, :, ind_hei] = jspectra[ich, :, |
|
692 | jspectra[ich, :, ind_hei] = jspectra[ich, :, | |
693 | ind_hei] - jspc_interf # Corregir indices |
|
693 | ind_hei] - jspc_interf # Corregir indices | |
@@ -728,7 +728,7 class SpectraProc(ProcessingUnit): | |||||
728 | # Remocion de Interferencia en el Cross Spectra |
|
728 | # Remocion de Interferencia en el Cross Spectra | |
729 | if jcspectra is None: |
|
729 | if jcspectra is None: | |
730 | return jspectra, jcspectra |
|
730 | return jspectra, jcspectra | |
731 | num_pairs = jcspectra.size / (num_prof * num_hei) |
|
731 | num_pairs = int(jcspectra.size / (num_prof * num_hei)) | |
732 | jcspectra = jcspectra.reshape(num_pairs, num_prof, num_hei) |
|
732 | jcspectra = jcspectra.reshape(num_pairs, num_prof, num_hei) | |
733 |
|
733 | |||
734 | for ip in range(num_pairs): |
|
734 | for ip in range(num_pairs): | |
@@ -747,17 +747,17 class SpectraProc(ProcessingUnit): | |||||
747 |
|
747 | |||
748 | ind = numpy.abs(jcspc_interf[mask_prof]).ravel().argsort() |
|
748 | ind = numpy.abs(jcspc_interf[mask_prof]).ravel().argsort() | |
749 |
|
749 | |||
750 | median_real = numpy.median(numpy.real( |
|
750 | median_real = int(numpy.median(numpy.real( | |
751 | junkcspc_interf[mask_prof[ind[list(range(3 * num_prof / 4))]], :])) |
|
751 | junkcspc_interf[mask_prof[ind[list(range(3 * num_prof // 4))]], :]))) | |
752 | median_imag = numpy.median(numpy.imag( |
|
752 | median_imag = int(numpy.median(numpy.imag( | |
753 | junkcspc_interf[mask_prof[ind[list(range(3 * num_prof / 4))]], :])) |
|
753 | junkcspc_interf[mask_prof[ind[list(range(3 * num_prof // 4))]], :]))) | |
|
754 | comp_mask_prof = [int(e) for e in comp_mask_prof] | |||
754 | junkcspc_interf[comp_mask_prof, :] = numpy.complex( |
|
755 | junkcspc_interf[comp_mask_prof, :] = numpy.complex( | |
755 | median_real, median_imag) |
|
756 | median_real, median_imag) | |
756 |
|
757 | |||
757 | for iprof in range(num_prof): |
|
758 | for iprof in range(num_prof): | |
758 | ind = numpy.abs(junkcspc_interf[iprof, :]).ravel().argsort() |
|
759 | ind = numpy.abs(junkcspc_interf[iprof, :]).ravel().argsort() | |
759 | jcspc_interf[iprof] = junkcspc_interf[iprof, |
|
760 | jcspc_interf[iprof] = junkcspc_interf[iprof, ind[nhei_interf // 2]] | |
760 | ind[nhei_interf / 2]] |
|
|||
761 |
|
761 | |||
762 | # Removiendo la Interferencia |
|
762 | # Removiendo la Interferencia | |
763 | jcspectra[ip, :, ind_hei] = jcspectra[ip, |
|
763 | jcspectra[ip, :, ind_hei] = jcspectra[ip, |
General Comments 0
You need to be logged in to leave comments.
Login now