pro aia_trend_flats, fpath = fpath, silent = silent t0 = SYSTIME(/sec) ;if N_ELEMENTS(fpath) eq 0 then fpath = '/Users/boerner/data/aia/cal/flat' if N_ELEMENTS(fpath) eq 0 then fpath = '/surge40/jeneen/flats/aia_diffs/files' CD, fpath, current = old_dir winx = 1000 winy = 1000 fps = 20 wavestrs = ['94_THIN', '131_THIN', '171_THIN', '193_THIN', '211_THIN', $ '304_THIN', '335_THIN', '1600', '1700'] mins = [0.7, 0.7, 0.7, 0.7, 0.7, 0.7, 0.7, 0.7, 0.7] maxes = [1.1, 1.1, 1.1, 1.1, 1.1, 1.1, 1.1, 1.1, 1.1] nwave = N_ELEMENTS(wavestrs) d0 = '2010-01-01' d1 = ANYTIM2UTC(RELTIME(/now), /ccsds) oldpmulti = !p.multi !p.multi = 0 TVLCT, rr, gg, bb, /get LOADCT, 0 WDEF, 10, winx, winy t1 = SYSTIME(/sec) for i = 0, nwave - 1 do begin ds = 'aia.flatfield[' + wavestrs[i] + ']' SSW_JSOC_TIME2DATA, '2010-01-01', '2015-06-01', /silent, $ ds = 'aia.flatfield[171_THIN]', drms, files, /files nflat = N_ELEMENTS(drms) if not KEYWORD_SET(silent) then begin t2 = SYSTIME(/sec) PRINT & PRINT, wavestrs[i], form = '(a20)' PRINT, 'Time : ', t2 - t1, form = '(a20,f10.1)' & PRINT t1 = t2 endif READ_SDO, files, hdr, dat, /silent vbase = 'flat_' + wavestrs[i] + '_all.mp4' vfile = CONCAT_DIR(fpath, vbase) video = IDLffVideoWrite(vbase) vidStream = video.AddVideoStream(winx, winy, fps) for j = 0, nflat - 1 do begin tt0 = TIME2FILE(/date, drms[j].t_start) tt1 = TIME2FILE(/date, drms[j].t_stop) PLOT_IMAGE, dat[*,*,j], chars = 1.5, title = wavestrs[i] + ' Flat : ' + $ tt0 + ' - ' + tt1, min = mins[i], max = maxes[i] thisframe = TVRD(/true) WRITE_JPEG, CONCAT_DIR(fpath, 'flat_' + wavestrs[i] + '_' + $ tt0 + '-' + tt1 + '.jpg'), thisframe, /true dummy = video.Put(vidStream, thisframe) endfor ; video.Cleanup PLOT_IMAGE, REFORM(dat[*,1800,*]), /nosq, min = mins[i], max = maxes[i], $ chars = 1.5, xtitle = 'X Position', ytitle = 'Flat number', $ title = wavestrs[i] + ' Flat : Profile for Y = 1800' thisplot = TVRD(/true) WRITE_JPEG, CONCAT_DIR(fpath, 'flat_' + wavestrs[i] + '_px.jpg'), thisplot, /true PLOT_IMAGE, REFORM(dat[1800,*,*]), /nosq, min = mins[i], max = maxes[i], $ chars = 1.5, xtitle = 'Y Position', ytitle = 'Flat number', $ title = wavestrs[i] + ' Flat : Profile for X = 1800' thisplot = TVRD(/true) WRITE_JPEG, CONCAT_DIR(fpath, 'flat_' + wavestrs[i] + '_py.jpg'), thisplot, /true endfor CD, old_dir TVLCT, rr, gg, bb !p.multi = oldpmulti PRINT, 'AIA_TREND_FLAT : Elapsed time ', SYSTIME(/sec) - t0, form = '(a40,f10.1)' end