subroutine lmstssr (kode,is,ie) c c----------------------------------------------------------------------- c checks to see what part of record to use, if any c c call up lmstst to see if any of the record is within the time period c specified: c c kode = -1 all of record prior to specified time period c kode = 0 at least one of data the samples in specified time period c kode = 1 all of record after to specified time period c----------------------------------------------------------------------- c v1.0 jfe johnson 31 oct 81 c refined Richard L. West CSC 1999/09/29 c----------------------------------------------------------------------- c len = length of data records in millisecs c nsamp = the number of data samples in that record c f = nsamp / len (samples/milliseconds) c----------------------------------------------------------------------- c real*8 strip_times(4),rec_yd,rec_t,idms c integer*4 iyd,it,iflag,me,ms c common /blktim/iyd,it common /comlim/strip_times c data f,nsamp/0.064,512/ c c----------------------------------------------------------------------- c check to see if any of the record is within specified time period c----------------------------------------------------------------------- c call lmststr (kode) if (kode .ne. 0) return c c----------------------------------------------------------------------- c calculate first sample within time perion c----------------------------------------------------------------------- c is = 1 rec_yd = iyd rec_t = float(it) * 1000.0d0 call diftmsr (strip_times(1), strip_times(2), rec_yd, rec_t, * iflag, idms) if (iflag .ne. 0) go to 20 c----------------------------------------------------------------------- ms = 1.0d0 + (idms / 1000.0d0) * f if (ms .gt. 0) is = ms if (ms .lt. 1) is = 1 c c----------------------------------------------------------------------- c calculate last sample within time perion c----------------------------------------------------------------------- c 20 continue ie = nsamp call diftmsr (strip_times(3), strip_times(4), rec_yd, rec_t, * iflag, idms) if (iflag .ne. 0) return c----------------------------------------------------------------------- me = 1.0d0 + (idms / 1000.0d0) * f if (me .le. nsamp .and. me .gt. 1) ie = me - 1 if (me. gt. nsamp) ie = nsamp c c----------------------------------------------------------------------- c----------------------------------------------------------------------- c return end