function ReadRF,path ;+ ; NAME: ; ReadRFs ; PURPOSE: ; read a RF15-i datas ; ; CALLING EXAMPLES: ; ; xxx=ReadRFs('c:\951021.001') ; ; INPUTS: ; path - full path to the RF15-I soft X-ray data files ; ; ; OUTPUTS: ; returns RF15-I data buffer for soft X-ray channels ; ; MODIFICATION HISTORY: ; Written, Szymon Gburek 1998. ;- COMMON ERRORS, e_status e_status=0 ON_IOERROR, bad_path restore,path e_status=0 close, /file, /all return, xxx bad_path: PRINT, 'NO RF DATA FOR '+path e_status=1 close, /file, /all return, 0 end ;---------------------------------------------------- ;****************************************************** ;****************************************************** region_str='AUR' region_str_lowercase='aur' ;region_str='SOW' ;region_str_lowercase='sow' region_str='RBT' region_str_lowercase='rbt' region_str='LBN' region_str_lowercase='lbn' ;region_str='BSW' ; no data ;region_str_lowercase='bsw' region_str='MSH' region_str_lowercase='msh' region_str='MBL' region_str_lowercase='mbl' region_str='LBS' region_str_lowercase='lbs' region_str='PSH' region_str_lowercase='psh' region_str='NSH' region_str_lowercase='nsh' region_str='POC' region_str_lowercase='poc' region_str='CSP' region_str_lowercase='csp' region_str='EVN' region_str_lowercase='evn' region_str='HH5' region_str_lowercase='hh5' region_str='HH4' region_str_lowercase='hh4' ;region_str='LDE' ;region_str_lowercase='lde' ;region_str='HHH' ;region_str_lowercase='hhh' region_str='SHH' region_str_lowercase='shh' line='' class='' count=0. line='' ;------------------------------------------------------------------- openr,1,region_str_lowercase+'d.txt' WHILE NOT EOF(1) DO begin readf,1,line count=count+1. endwhile close,1 print, count; print, '------size of region text *d.txt file determined ----------' ;---- create and fill an region string table ----- region_table=strarr(count) openr,1,region_str_lowercase+'d.txt' for i=0L,count-1 DO begin READF, 1, line region_table(i)=line endfor close,1 print, '------INTERBALL_time_region string array determined ----------' ;************************** ;--------- begin gif creation loop --------------- for i=0, count-1 do begin line=region_table(i) ;1995080615500019950806180000 cmpline=STRCOMPRESS(line, /REMOVE_ALL) ;print, cmpline year1 =strmid(cmpline, 0,4) month1=strmid(cmpline, 4,2) day1 =strmid(cmpline, 6,2) jd1=double(julday(month1, day1, year1)) hours1_str=strmid(cmpline,8,2) minutes1_str=strmid(cmpline,10,2) seconds1_str=strmid(cmpline,12,2) hours1=double(strmid(cmpline,8,2)) minutes1=double(strmid(cmpline,10,2)) seconds1=double(strmid(cmpline,12,2)) year2 =strmid(cmpline, 14,4) month2=strmid(cmpline, 18,2) day2 =strmid(cmpline, 20,2) jd2=double(julday(month1, day1, year1)) hours2_str=strmid(cmpline,22,2) minutes2_str=strmid(cmpline,24,2) seconds2_str=strmid(cmpline,26,2) hours2=double(strmid(cmpline,22,2)) minutes2=double(strmid(cmpline,24,2)) seconds2=double(strmid(cmpline,26,2)) class=strmid(cmpline,28,3) day =day2 year=strmid(year1 , 2,2) month=month1 ;print, year1,' ', month1, ' ',day1 ,' ',hours1,' ',minutes1,' ', seconds1,' ', jd1 ;print, year2,' ', month2, ' ',day2 ,' ',hours2,' ',minutes2,' ', seconds2,' ', jd2 if month eq '01' then month='jan' if month eq '02' then month='feb' if month eq '03' then month='mar' if month eq '04' then month='apr' if month eq '05' then month='may' if month eq '06' then month='jun' if month eq '07' then month='jul' if month eq '08' then month='aug' if month eq '09' then month='sep' if month eq '10' then month='oct' if month eq '11' then month='nov' if month eq '12' then month='dec' pr_evn_str1=day+'-'+month+'-'+year+' '+hours1_str+':'+minutes1_str pr_evn_str2=day+'-'+month+'-'+year+' '+hours2_str+':'+minutes2_str ;print, pr_evn_str1,'//', pr_evn_str2 print, pr_evn_str1+' '+pr_evn_str2+' ****************************************' pr_evn, pr_evn_str1, pr_evn_str2 ; /counts print, '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++' print, ' ' ;stop endfor end