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='RBT' region_str_lowercase='rbt' region_str='ATL' region_str_lowercase='atl' region_str='SOW' region_str_lowercase='sow' line='' 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 ;stop print, '------INTERBALL_time_region string array determined ----------' ;************************** ;--------- begin gif creation loop --------------- ;for i=5, 10 do begin for i=0, count-1 do begin line=region_table(i) ;1995080615500019950806180000 cmpline=STRCOMPRESS(line, /REMOVE_ALL) print, cmpline ;stop 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)) ;print, year1,' ', month1, ' ',day1 ,' ',hours1,' ',minutes1,' ', seconds1,' ', jd1 ;print, year2,' ', month2, ' ',day2 ,' ',hours2,' ',minutes2,' ', seconds2,' ', jd2 if jd1 eq jd2 then begin start_reg_time=-0.2+hours1+(minutes1*60. + seconds1)/3600. if start_reg_time lt 0. then start_reg_time = 0. end_reg_time=0.2+hours2+(minutes2*60. + seconds2)/3600. if end_reg_time gt 24. then end_reg_time = 24. rf_year=strmid(year1, 2,2) rf_date=rf_year+month1+day1 print, '***************************************' print, 'day number ', i, ' ',rf_date print, '***************************************' ;------------------------ read soft channels ------------------------ xxx=0. ;xxx=ReadRF('T:\zk\siark\s'+rf_date+'.001') xxx=ReadRF('s'+rf_date+'.001') if n_elements(xxx) ne 1 then begin xxx_soft = xxx xxx=0. time_soft=xxx_soft(0,*)/32. ;co 1 sec tmin_soft=min(time_soft/3600.) & tmax_soft=max(time_soft/3600.) print, tmin_soft, tmax_soft ; ----------- plot soft channels ------------------------------------ if (tmax_soft-tmin_soft) gt 0.016667 then begin winplotr,xxx_soft, tmin_soft,tmax_soft,rf_date, ' ' catch_graph=tvrd() WRITE_GIF, 'WDS_'+region_str+rf_date+'_'+hours1_str+minutes1_str+'_'+hours2_str+minutes2_str+'.gif', catch_graph endif ;------------------------ read hard channels ------------------------ ; xxx=ReadRF('T:\zk\siark\1995\h'+rf_date+'.001') xxx=ReadRF('h'+rf_date+'.001') if n_elements(xxx) ne 1 then begin xxx_hard=xxx xxx=0. time_hard=reform(xxx_hard(0,*))/32.d0 info_str=region_str+' '+hours1_str+':'+minutes1_str+' '+hours2_str+':'+minutes2_str wh=where(time_soft/3600. gt tmin_soft and time_soft/3600. lt tmax_soft) whh=where(time_hard/3600. gt tmin_soft and time_hard/3600. lt tmax_soft ) if wh(0) ne -1 and whh(0) ne -1 then begin if (tmax_soft - tmin_soft) gt 2/60. then begin lwinsht,xxx_soft,xxx_hard, tmin_soft,tmax_soft,rf_date, info_str catch_graph=tvrd() ; stop WRITE_GIF, 'WD_'+region_str+rf_date+'_'+hours1_str+minutes1_str+'_'+hours2_str+minutes2_str+'.gif', catch_graph endif endif print, 'gif generated' endif endif endif endfor end ;year1 =strmid(date1, 0,4) ;month1=strmid(date1, 4,2) ;day1 =strmid(date1, 6,2) ;jd1=double(julday(month1, day1, year1)) ;hours1=double(strmid(time1,0,2)) ;minutes1=double(strmid(time1,2,2)) ;seconds1=double(strmid(time1,4,2)) ;jul_time1=jd1+(hours1*3600.+ minutes1*60.+seconds1)/(24.*3600.) ;start_jul_time=jul_time1