pro mk_sdo pathx='/media/xuyang/E/data_request/20190811/' ;wave = ['0094','0171','0193','0211','0304','0335','icic','blos'] refnx = [0] wave = ['icic'] ;refnx = [40,40] for i = 0, 0 do begin mk_dir,pathx+'sdoa/'+wave[i] cut_sdo, wL = wave[i], path=pathx, refn=refnx[i] endfor end pro cut_sdo, wL = wL, path=path, refn=refn set_plot,'x' window, 0, xs = 812, ys = 812 !p.multi = [0, 1, 1] dir_in=path+'sdo/'+wL+'/' fn=file_search(dir_in+'*fits',count=nnn) dir_out=path+'sdoa/' read_sdo,fn[refn],iindex,idata,/uncomp_delete aia_prep,iindex,idata,oindex,odata index2map,oindex,odata,ref_map sub_map, ref_map, ref_smap, xrange = [25-75,25+75], yrange = [-33-75,-33+75] sn=dir_out+'sav/ref_smap_'+wL+'.sav' ;save,filename=sn, ref_smap, oindex, odata plot_map, ref_smap, /log ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;drot the aia data ;restore,dir_out+'sav/ref_.sav' window, 1, xs = 1000, ys = 600 !p.multi = [0, 2, 1] for j = 0, nnn-1 do begin print,fn(j) aia_prep, fn(j), [0,1,2], out_index, out_data, index_ref=oindex, data_ref=odata  ;;;;;;;;;;;;correct the exposure time & $ ;out_data = out_data/out_index.exptime   index2map, out_index, out_data, tar_map drmap=drot_map(tar_map,ref_map = ref_smap) ;aia_lct,wave = wL, /load plot_map, tar_map, /log;;;;;;;;;;full disk map plot_map, drmap, /log;;;;;;;;;drot map map2index, drmap, index,data index.date_D$OBS=drmap.time index.time_obs = strmid(index.date_obs,11,8) index.telescop = 'SDO' index.instrume = 'AIA' head = struct2fitshead(index,data) ;fxaddpar,head,'rtime',drmap.rtime index2 = fitshead2struct(head) yymmdd = strmid(index2.date_obs,0,4)+strmid(index2.date_obs,5,2)+strmid(index2.date_obs,8,2)+'_' sfm = strmid(index2.date_obs,11,2) + strmid(index2.date_obs,14,2) + strmid(index2.date_obs,17,2) savfil=dir_out+wL+'/sdo_'+wl+'_'+yymmdd+sfm+'.fits' ;print, 'Writing= ', savfil writefits,savfil,data,index2 endfor ;stop end