function tykw_stt_freq,rdstt,mfreq

;+
; NAME:
;       TYKW_STT_FREQ
;
; PURPOSE:
;       This function is to extract the stt data of the specified frequency
;
; CALLING SEQUENCE:
;       dstt=tykw_stt_freq(rdstt,mfreq)
;
; INPUTS:
;       rdstt: structure of the stt data
;       mfreq: frequency ID (0: 9GHz, 1: 4GHz, 2: 2GHz, 3: 1GHz)
;
; OPTIONAL INPUT KEYWORDS:
;
; OUTPUTS:
;       dstt: structure of the stt data of the specified frequency
;
; HISTORY:
;    4/6/79        ver.0.0 K. Shibasaki as fortran program
;    Sep. 09, 1994 ver.1.0 M. Nishio
;    Jan. 10, 1995 ver.2.0 M. Nishio
;    Apr. 13, 1995 ver.3.2 M. Nishio
;    Apr. 13, 1995 ver.4.0 M. Nishio
;    May. 23, 1995 ver.5.0 M. Nishio
;    May  01, 1995 ver.5.2 M. Nishio
;    Apr. 25, 1995 ver.5.0 M. Nishio
;
;    1999-01-12 ported to IDL by TY
;
;-

case mfreq of
  0 : freq=9400
  1 : freq=3750
  2 : freq=2000
  3 : freq=1000
endcase

whr=where(rdstt.freq eq freq,count)
if (count eq 1) then dstt=rdstt(whr)

return,dstt
end
