[go: up one dir, main page]

Menu

[r9]: / civ / rd_corr.f90  Maximize  Restore  History

Download this file

122 lines (103 with data), 4.0 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
! rd_corr , here we define flags for vectors plottings
! Copyright (C) 1999,2010 Gauthier Delerce
!
! This program is free software; you can redistribute it and/or modify
! it under the terms of the GNU General Public License as published by
! the Free Software Foundation; either version 2, or (at your option)
! any later version.
!
! This program is distributed in the hope that it will be useful,
! but WITHOUT ANY WARRANTY; without even the implied warranty of
! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
! GNU General Public License for more details.
!
! You should have received a copy of the GNU General Public License
! along with this program; if not, write to the Free Software Foundation,
! Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
!
! Gauthier Delerce <gauthier@delerce.fr>
subroutine rd_corr
! HERE WE SETUP THE CORRELATION FLAGS
use mod_parameters
!use modresultats
!use modgrille
!use modvsv
!use modnetcdf
integer::ppp
ppp=0
nbFvect=0
nbMasked=0
nbAvgLessThan=0
nbAvgNull=0
nbAvgLessThanANDMaxCorrLessThan=0
nbInstable=0
nbIsTooSmall=0
nbInstableHart=0
nbInstableHartBis=0
nbHartPrefered=0
nbHartCorrTooLow=0
do i=1,mg*ng
if(grille(i,3)==0) nbMasked=nbMasked+1
if(grille(i,3)==3) nbAvgLessThan=nbAvgLessThan+1
if(grille(i,3)==3.1) nbAvgNull=nbAvgNull+1
if(grille(i,3)==3.2) nbAvgLessThanANDMAxCorrLessThan=nbAvgLessThanANDMaxCorrLessThan+1
if(grille(i,3)==3.3) nbInstable=nbInstable+1
if(grille(i,3)==-2.)then
! Print*,'Rarely this vectors are false'
ppp=ppp+1
!grille(i,6)=0.
nbIsTooSmall=nbIsTooSmall+1
endif
if(grille(i,3)==9) nbInstableHart=nbInstableHart+1
if(grille(i,3)==9.1) nbInstableHartBis=nbInstableHartBis+1
if(grille(i,3)==2) nbHartPrefered=nbHartPrefered+1
if(grille(i,3)==4) nbHartCorrTooLow=nbHartCorrTooLow+1
! print*,'putain ca chie ',i
! THE FOLLOWING VECTORS WONT BE PLOTTED :
! IF HART_INSTABLE && MAX_CORR CLOSE TO THE BORDER
! IF SOFTMASK OR A LACK OF INFORMATION IN THE IMAGE
! PROBLEMS WITH HART ( SELDOM APPEARS )
! IF SFIT INSTABLE
!
! IF HOLE+ (MAX_CORR CLOSE TO THE BORDER||TO KEEP HART RESULTS INSTEAD OR RECOMPUTE ONES
if( (grille(i,3)==9.).or.(grille(i,3)==3.).or.(grille(i,3)==4.).or.( ((grille(i,3)==-2.).or. &
( grille(i,3)==2.)).and.(hole)) ) nbFvect=nbFvect+1 ! compte les vecteurs cachés
enddo
if(nbMasked/=0) print*,"nbMasked = ",nbMasked
if(nbAvgLessThan/=0) print*,"nbAvgLessThan = ",nbAvgLessThan
if(nbAvgNull/=0) print*,"nbAvgNull = ",nbAvgNull
if(nbAvgLessThanANDMaxCorrLessThan/=0) print*,"nbAvgLessThanANDMaxCorrLessThan = ",nbAvgLessThanANDMaxCorrLessThan
if(nbInstable/=0) print*,"nbInstable = ",nbInstable
if(nbIsTooSmall/=0) print*,"nbIsTooSmall = ",nbIsTooSmall
if(nbInstableHart/=0) print*,"nbInstableHart = ",nbInstableHart
if(nbInstableHartBis/=0) print*,"nbInstableHartBis = ",nbInstableHartBis
if(nbHartPrefered/=0) print*,"nbHartPrefered = ",nbHartPrefered
if(nbHartCorrTooLow/=0) print*,"nbHartCorrTooLow = ",nbHartCorrTooLow
if(ppp>0) then
print*,''
print*,''
print*,'*****************************************************************'
print*,''
print*, ' Search Box SIZE is too SMALL for :',ppp,' vectors'
print*,''
print*,''
print*,'*****************************************************************'
print*,''
endif
return
end
! INFO ABOUT THE FLAG GRILLE(I,3)
! RD_GRILLE =0 IF HARD MASK
! =3 IF SOFT MASK
! =-1 IF NONMASKED
! XCORR =0 => CORR_TAB=1
! =3 IF ARMS<=RADIODT
! =3 IF BRMS==0 NOT GOOD AT ALL
! SUBHART =4 IF SUM(ABS(CORR_TAB_HART))<=0.01
! FIND_PEAK_HART =9 IF HART_INSTABLE && MAX_CORR CLOSE TO THE BORDER
! =-2 IF MAX_CORR CLOSE TO THE BORDER
! =2 CRITERE1 TO KEEP HART RESULTS INSTEAD OR RECOMPUTE ONES
! CRITERE1 : if ( ((nint(u(i))/=nint(l1)).or.(nint(v(i))/=nint(l2))).and.(grille(i,3)/=9.) ) then
! FIND PEAK =-2 IF COMPUTED MAX IS CLOSE TO THE CORRELATION FONCTION BORDER
! =1 IF EVERYTHING IS OK
! =3 IF SFIT=>INSTABLE