Changeset 553


Ignore:
Timestamp:
05/17/12 15:49:25 (12 years ago)
Author:
lelod
Message:

correc_amsu marche

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/correc_amsu.pro

    r550 r553  
    66; ============ 
    77; 
    8 ; .. function: correc_amsu(numch, yyyyb, mmb, ddb, yyyye, mme, dde, lonmin, lonmax, latmin, latmax) 
     8;  correc_amsu,numch, yyyyb, mmb, ddb, yyyye, mme, dde, lonmin, lonmax, latmin, latmax 
    99; DESCRIPTION 
    1010; =========== 
     
    3535;    latmax=20. 
    3636 
    37 ;    result = cresamsu(numch, yyyyb, mmb, ddb $ 
     37;    cresamsu,numch, yyyyb, mmb, ddb $ 
    3838;            , yyyye, mme, dde $ 
    39 ;            , lonmin, lonmax, latmin, latmax) 
     39;            , lonmin, lonmax, latmin, latmax 
    4040;  
    4141; 
     
    5757; 
    5858 
    59 function correc_amsu $ 
    60    , numch $ 
    61    , yyyyb $ 
    62    , mmb $ 
    63    , ddb $ 
    64    , yyyye $ 
    65    , mme $ 
    66    , dde $ 
    67    , lonmin $ 
    68    , lonmax $ 
    69    , latmin $ 
    70    , latmax 
     59pro correc_amsu, numch, yyyyb, mmb, ddb, yyyye, mme, dde, lonmin, lonmax, latmin, latmax 
    7160 
    7261compile_opt idl2, strictarrsubs 
     
    7665routine = (SCOPE_TRACEBACK(/STRUCTURE))[s-1].Routine 
    7766; 
    78 key_performance=0 
    79 if key_performance EQ 1 THEN BEGIN 
    80     time1 = SYSTIME(1) 
    81 ENDIF 
    8267; 
    83 ; 
    84 ; Return to caller if errors 
    85 ON_ERROR, 2 
    86 result = -1 
    87 ; 
    88 usage = 'result = correc_amsu(numch, yyyyb, mmb, ddb, yyyye, mme, dde, lonmin, lonmax, latmin, latmax)' 
    8968; 
    9069nparam = N_PARAMS() 
     
    9372          + '!C' $ 
    9473          + 'Usage : ' + usage]) 
    95     return, result 
     74    stop 
    9675ENDIF 
    9776; 
     
    11190mmyb=mmb 
    11291mmye=mme 
    113 indic=0 
     92 
    11493for yyyy=yyyyb,yyyye do begin 
    11594   if (yyyye ne yyyyb) then begin 
     
    146125            ; decodage du nb de points (nn) 
    147126         nn=n_elements(tb1) 
     127         deborb=min(desc) 
     128         nborb=max(desc) 
     129         for norb=deborb,nborb do begin 
     130            jnd=where(desc eq norb,orbit) 
     131            if orbit ne 0 then begin             
     132               tb=tb1[jnd] 
     133               fovo=fov[jnd] 
     134               masko=mask[jnd] 
     135               if norb eq deborb then begin 
     136                  nfov=max(fov[jnd]) 
     137                  print,'nb points fauchee', nfov 
     138                  fovv=indgen(nfov)+1 
     139                  sumtb=fltarr(nfov) 
     140                  vartb=fltarr(nfov) 
     141                  kont=intarr(nfov)*0L 
     142               endif 
    148143 
    149          if indic eq 0 then begin 
    150             nfov=max(fov) 
    151             fovv=indgen(nfov)+1 
    152             sumtb=fltarr(nfov) 
    153             vartb=fltarr(nfov) 
    154             kont=intarr(nfov)*0L 
    155          endif 
    156          nfovday=max(fov) 
    157          if nfovday gt nfov then goto, nextday 
    158          for ifov=0,nfov-1 do begin  
    159             ind=where(fov eq ifov+1 and mask eq 1 ,nifov)  
    160             if (nifov ne 0) then begin  
    161                sumtb[ifov]=sumtb[ifov]+tb1[ind]  
    162                vartb[ifov]=vartb[ifov]+tb1[ind]*tb1[ind]  
    163                kont[ifov]=kont[ifov]+1L 
    164             endif  
    165          endfor  
    166  
     144               nfovorb=max(fovo) 
     145               if nfovorb eq nfov then begin 
     146                  for ifov=0,nfov-1 do begin  
     147                     ind=where(fovo eq ifov+1 and masko eq 1 ,nifov)  
     148                     if (nifov ne 0) then begin  
     149                        sumtb[ifov]=sumtb[ifov]+total(tb[ind]) 
     150                        vartb[ifov]=vartb[ifov]+total(tb[ind]*tb[ind])  
     151                        kont[ifov]=kont[ifov]+nifov 
     152                     endif  
     153                  endfor  
     154               endif else begin 
     155                  print,'fauchee plus large que normale ',nfovorb,'pour orbite no ',norb 
     156               endelse 
     157            endif 
     158         endfor 
    167159nofile: 
    168160         print, 'www : no data to read for this day' 
    169161         goto, nextday 
    170162nextday: 
    171          indic=indic+1 
    172163      endfor 
    173164   endfor 
     
    176167 
    177168moytb=sumtb/kont 
    178 sigtb=sqrt((vartb-moytb*moytb)/kont) 
     169sigtb=sqrt((vartb-kont*moytb*moytb)/kont) 
     170print,'moytb',moytb 
    179171window,0 
    180172plot,fovv,moytb,psym=7,xstyle=1,ystyle=1,yrange=[min(moytb)-max(sigtb),max(moytb)+max(sigtb)] 
     
    185177 
    186178realend: 
    187          
    188 result = 0 
    189 return, result   
    190179end 
Note: See TracChangeset for help on using the changeset viewer.