pro norp_nclb_stat $ ,stat,value,dtclb,timej $ ,mclbx,nclb,nclbi ;+ ; NAME: ; NORP_NCLB_STAT ; ; PURPOSE: ; This procedure is to searching for the position index of ; calibration sequence in time array by the status information array ; ; CALLING SEQUENCE: ; norp_nclb_time,timejclb,dtclb,timej,mclbx,nclb,nclbi ; ; INPUTS: ; stat: 1-dimensional integer array indicating the status of observation ; value: value of the stat to be searched ; dtclb: time margin for nclbi. 2 elements floating array. ; dtclb(0) is before the calibration, dtclb(1) is after. ; timej: structure array with 'time internal format'. ; ; OUTPUTS: ; mclbx: number of calibration sequences ; nclb: 2-dimensional array. nclb(0,*) is the start position index, ; nclb(1,*) is the end of calibration time in 'time' array. ; nclbi: 2-dimensional array with time mergin corresponding to 'nclb' ; ; OPTIONAL INPUT KEYWORDS: ; ; HISTORY: ; programmed by T. Kosugi in 1984 May as Fortran program ; for old NoRP data format ; re-programmed by H.Sekiguchi 1987 July - 1988 Dec. ; ; 1995 July,20 N,Shinox for new format NoRP data ; 95.04.19 ed. add ATT correction for pol data ,correction data type ; changed intarr() to fltarr()., ; 95.09.04 Ver.2.0 M. Nishio and K. Hori ; 95.11.10 Ver.3.0 M. Nishio refernce level at 9.4GHz= amb -> zero ; <> ; 95.12.12 Ver.3.1 M. Nishio and K. Shibasaki (1GHz ATT 7dB -> 4.3) ; 98.09.03 sekix & shinox add 80GHz ; 98.11.20 K. Hori ; 1999-1-12 TY unify program for old/new NoRP data ; ;- if value ge 65 then pos=(stat eq value) else pos=(stat and value) tmp=fix(pos)-fix(shift(pos,1)) whr0=where(tmp gt 0,mclbx) whr1=where(tmp lt 0) if mclbx ne 0 then begin whr=where(stat and value) nclb=lonarr(2,mclbx) nclbi=lonarr(2,mclbx) for mclb=0,mclbx-1 do begin nclb(0,mclb)=whr0(mclb) nclb(1,mclb)=whr1(mclb)-1 tclbi_st=timej(nclb(0,mclb)).time-dtclb(0) nclbi(0,mclb)=norp_t2i(timej.time,tclbi_st) tclbi_ed=timej(nclb(1,mclb)).time+dtclb(1) nclbi(1,mclb)=norp_t2i(timej.time,tclbi_ed) endfor endif return end