; ; ; This procedure works only with the data generated by df.pro because it is ; expecting an array of structures as the data format. Any other format ; and this procedure barfs. ; PRO df_writefile,data,path,filename loop_test=WHERE(data.feature EQ 'LOOP') cav_test=WHERE(data.feature EQ 'CAVITY') core_test=WHERE(data.feature EQ 'CORE') header = $ ';Feature Dataset DOY Time Radius Error Xpos Ypos Xcen Ycen Theta Date Mins' OPENW,unit,path+filename,/GET_LUN PRINTF,unit,';This file was written by df.pro on '+systime(0) PRINTF,unit,'; Comments are preceded by a semicolon.' PRINTF,unit,'; The mins column is in units of minutes from midnight' PRINTF,unit,';' PRINTF,unit,';' IF (loop_test[0] NE -1) THEN BEGIN loop_data=data[WHERE(data.feature EQ 'LOOP')] sz=SIZE(loop_data.dataset) printf,unit,';LOOP DATAPOINTS:' printf,unit,header printf,unit, $ ';=========================================================================' FOR i=0,sz(1)-1 DO $ printf,unit,loop_data(i).feature,loop_data(i).dataset,loop_data(i).doy, $ loop_data(i).time_str,loop_data(i).radius,$ loop_data(i).error,loop_data(i).theta, $ loop_data(i).x,loop_data(i).y, $ loop_data(i).xcen,loop_data(i).ycen, $ loop_data(i).date_str,loop_data(i).mins, $ FORMAT="(A8,A5,I5,A10,F10.4,F10.4,F10.2,F10.2,F10.2,F10.2,F10.2,A11,F8.2)" ENDIF IF (cav_test[0] NE -1) THEN BEGIN cav_data=data[WHERE(data.feature EQ 'CAVITY')] sz=SIZE(cav_data.dataset) printf,unit,';CAVITY DATAPOINTS:' printf,unit,header printf,unit, $ ';=========================================================================' FOR i=0,sz(1)-1 DO $ printf,unit,cav_data(i).feature,cav_data(i).dataset,cav_data(i).doy, $ cav_data(i).time_str,cav_data(i).radius,$ cav_data(i).error,cav_data(i).theta, $ cav_data(i).x,cav_data(i).y, $ cav_data(i).xcen,cav_data(i).ycen, $ cav_data(i).date_str, cav_data(i).mins, $ FORMAT="(A8,A5,I5,A10,F10.4,F10.4,F10.2,F10.2,F10.2,F10.2,F10.2,A11,F8.2)" ENDIF IF (core_test[0] NE -1) THEN BEGIN core_data=data[WHERE(data.feature EQ 'CORE')] sz=SIZE(core_data.dataset) printf,unit,';CORE DATAPOINTS:' printf,unit,header printf,unit, $ ';=========================================================================' FOR i=0,sz(1)-1 DO $ printf,unit,core_data(i).feature,core_data(i).dataset,core_data(i).doy, $ core_data(i).time_str,core_data(i).radius,$ core_data(i).error,core_data(i).theta, $ core_data(i).x,core_data(i).y, $ core_data(i).xcen,core_data(i).ycen, $ core_data(i).date_str, core_data(i).mins, $ FORMAT="(A8,A5,I5,A10,F10.4,F10.4,F10.2,F10.2,F10.2,F10.2,F10.2,A11,F8.2)" ENDIF CLOSE,unit END