evff=yfile_list('../events') waves=[193,94,131,171,211,304,335] for w=1,n_elements(waves)-1 do begin wave=waves[w] for i=2, n_elements(evff)-1 do begin ev=evff[i] ff=yfile_list('../events/'+ev+'/aia/'+string(wave, format='(i04)')+'/*fits') outdir='../events/'+ev+'/00_quicklook/aia'+string(wave, format='(i04)')+'rdif/' if not file_exist(outdir) then yspawn,'mkdir -p '+outdir read_sdo, ff, aindex ss=where(aindex.exptime ge 1.9) ff=ff[ss] daytim=anytim2cal(aindex[ss].t_obs, form=11) pff='' for d=gt_day(min(daytim)),gt_day(max(daytim)) do begin refdate=ygt_date2(d) for hr=0,23 do begin for mn=0,59,2 do begin rdaytim=refdate+' '+string(hr, format='(i02)')+':'+string(mn, format='(i02)') rdaytim1=rdaytim rdaytim2=y_time_keisan(rdaytim, +2/60., form=11) rdaytim3=y_time_keisan(rdaytim, +4/60., form=11) ss1=where(daytim ge rdaytim1 and daytim lt rdaytim2, count1) ss2=where(daytim ge rdaytim2 and daytim lt rdaytim3, count2) if count1 ge 3 and count2 ge 3 then begin if pff ne ff[min(ss1)] then begin read_sdo, ff[ss1], index1, data1 endif else begin index1=pindex data1=pdata endelse read_sdo, ff[ss2], index2, data2 img=bytscl(atan((rebin(data2,512,512)-rebin(data1,512,512))/10.),-1.5,1.5) img=shift(img, 0,12) img(*,0:23)=127 tdaytim=strmid(anytim2cal(min(index2.t_obs), form=11),0,19)+' - '+strmid(anytim2cal(max(index2.t_obs), form=11),11,8) comment='SDO/AIA '+ystring(wave)+': '+tdaytim data_xyouts, 3, 3, comment, img index=index2[0] infil=ff[ss2[0]] outfil=outdir+anytim2yymmdd(index.t_obs, form='yyyymmdd_hhmmss')+'_sdo_a'+ystring(wave,4)+'rdf.jpg' loadct,0,/s write_jpeg, outfil, img, qual=100 ;header file index.crpix2=index.crpix2+12 index.ycen=index.ycen-12./index.cdelt2 break_file, outfil, aa,bb,cc,dd headfil1=aa+bb+'.'+cc+'.hdr' hdr=get_simple_header() tags=tag_names(hdr) for k=0, nlm(tags)-1 do begin ss2=tag_index(index, tags(k)) if ss2(0) ne -1 then begin if size(index.(ss2),/type) eq 7 then begin hdr.(k)=strtrim(index.(ss2),2) endif else begin hdr.(k)=index.(ss2) endelse endif endfor ; hdr.bitpix=8 hdr.naxis=2 hdr.OBSRVTRY='SDO' hdr.DETECTOR='AIA' hdr.solar_r=index.RSUN_OBS hdr.solar_b0=index.CRLT_OBS wcs=fitshead2wcs(index) hdr.solar_l0=((wcs.position.CRLN_OBS-wcs.position.CARR_EARTH+540) mod 360)-180. hdr.sun_time=index.DSUN_OBS/2.99792458d8 dsun_ear=(get_sunspice_lonlat(index.t_obs,'EARTH'))(0)*1.0e3 hdr.ear_time=(dsun_ear-index.DSUN_OBS)/2.99792458d8 hdr.basename='' hdr.filename=extract_filename(infil) simplehead=struct2fitshead(hdr) yfile_append, headfil1, simplehead,/new pff=ff[min(ss2)] pindex=index2 pdata=data2 endif; count1 and count2 endfor;mn endfor;hr endfor;d endfor ;i endfor;w exit end