pro mmgbra_remapmmgf,remapmmgf,stime,mmgbra,B0,clog0,crn,t_obs,LOW=low if n_params( ) lt 0 then begin print,'pro mmgbra_remapmmgf,remapmmgf,stime,' print,'mmgbra,B0,clog0,crn,t_obs,/low' print,'kk=0,...,14' return endif ; get kk based on stime, the one of 15 96min images hh=FIX(strmid(stime,0,2)) mm=FIX(strmid(stime,3,2)) otime=hh*60.+mm nimg=indgen(15)*96 adtime=ABS(nimg-otime) mn=MIN(adtime) ind=WHERE(adtime eq mn) kk=ind(0) fname=findfile(remapmmgf(kk),count=count) if count eq 1 then begin mgbla=readfits(remapmmgf(kk),hd,/silent) ; NaN for data gap missv=sxpar(hd,'MISSVALS') if missv eq 0 then begin t_obs=strmid(sxpar(hd,'T_OBS'),0,19) t_obs=strmid(t_obs,0,13)+'.'+strmid(t_obs,14,2)+'.'+ $ strmid(t_obs,17,2) B0=sxpar(hd,'OBS_B0') clog0=sxpar(hd,'OBS_L0') dclog=clog0-FIX(clog0) if dclog ge 0.5 then clog0=FIX(clog0)+1 else clog0=FIX(clog0) crn=sxpar(hd,'OBS_CR') br1800a_bl1800a,mgbla,br1800a,B0=B0 ; mgbra=CONGRID(br1800a,181,180,/interp) ; added br1800a=br1800a(1:1800,*) if keyword_set(low) then mmgbra=REBIN(br1800a,180,180) endif else print,'missv ne 0' endif else print,'No MDI MG' end