PRO Applog, msg openw, unit, 'Reko_Log', /append, /get print, msg printf, unit, msg free_lun, unit END ;;; Reconstruct the full series of Oct 21, 1999 @commoninc close, /all openr, 1, 'jultimes' jultimes = strarr(156) readf, 1, jultimes close, 1 FOR burst=55, 156 DO BEGIN IF burst EQ 55 THEN BEGIN init_variables, 'allvars.dat' cmd = 'nohup /opt/rsi/idl_5.2/bin/idl dosp &' GOTO, Weiter ENDIF ;;; Read chunks from tape IF (burst/10 EQ burst/10.) AND (burst NE 30) THEN BEGIN ;; cmd = 'tar xvf suetter@ruunf3:/dev/nrmt0h -C RAW' cmd = 'tar xvf /dev/tape -C RAW' spawn, cmd spawn, cmd ;;; twice to skip over filemark ENDIF Noread: ;;; convert input data to integer infile = 'RAW/file2'+nnumber(burst, 3) openr, 1, infile bild = assoc(1, bytarr(768, 572)) openw, 2, 'raw/rawdata' FOR i=0, 99 DO writeu, 2, fix(bild(i)) close, 2 close, 1 spawn, 'rm '+infile Weiter: ;;; Preprocessing pre_speckle, 'allvars.dat', /inmem ;;; Check ALPHA value. If too bad, clip off the 25 worst images ;;; and redo alpha calculation / STF generation openr, 1, ResDir + 'alpha' alpha = 0. readf, 1, alpha close, 1 IF alpha LT 15 THEN BEGIN N_Image = 75 applog, 'Burst '+strtrim(burst, 2)+': Alpha too low ('+$ strtrim(alpha, 2)+')' applog, 'Redo with 75 Images' make_stf, /no cmd = 'nohup /opt/rsi/idl_5.2/bin/idl dosp1 &' ENDIF ELSE $ cmd = 'nohup /opt/rsi/idl_5.2/bin/idl dosp &' ;;; spawn a second idl session to do reconstruction in parallel Comp: spawn, cmd testreko, /no ;;; make sure everything is finished WHILE ((f=(findfile('results/teilbild265'))(0) EQ '')) DO wait, 1 WHILE ((f=(findfile('results/teilbild266'))(0) EQ '')) DO wait, 1 Conn: caldat, jultimes(burst-1), month, day, year, hrs, mins, secs tim = nnumber(hrs, 2)+nnumber(mins, 2)+nnumber(fix(secs+.5), 2) name = 'AR8737_21oct99_'+tim+'.fits' ;;; put together the image ;;; with bad seeing, this fails sometimes. Catch that ;;; In any case, save the reconstructions, maybe connect does ;;; not work correctly. cmd = 'tar cfI '+tim+'.tbz results/schrittweite results/teilbild*'+$ ' results/langzeitbild results/alpha results/referenzbild '+$ ' support/rawsum support/flaeche* support/ruhdimensionen '+$ ' support/basisdimensionen' spawn, cmd catch, Error_Status IF Error_Status NE 0 THEN BEGIN applog, 'Burst '+strtrim(burst, 2)+': An error occured during connect!' ENDIF ELSE BEGIN p = connect(/no_ini, /int, /safe) IF min(p) LE 0 THEN BEGIN applog, 'Burst '+strtrim(burst, 2)+': Min data <= 0!' ENDIF ELSE BEGIN save_result, p, 'FITS/'+name, /no applog, 'Burst '+strtrim(burst, 2)+': Saved as '+name ENDELSE ENDELSE catch, /cancel ;;; clean up disk spawn, 'rm -rf results support raw/rawdata' ENDFOR END