;;; Reconstruct the full series of Oct 23, 1999 @commoninc close, /all openr, 1, 'jultimes' jultimes = strarr(307) readf, 1, jultimes close, 1 restore, 'queue.save' FOR burst=263, 305 DO BEGIN IF burst EQ 263 THEN BEGIN ; init_variables, 'allvars1.dat' ; cmd = 'nohup /opt/rsi/idl_5.2/bin/idl dosp1 &' GOTO, Weiter ENDIF ;;; Read chunks from tape IF (burst/10 EQ burst/10.) 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/file01.'+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' ;;; 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 print, 'Burst '+strtrim(burst, 2)+': Alpha too low ('+$ strtrim(alpha, 2)+')' print, '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 = 'AR8739_23oct99_'+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 print, 'An error occured during connect!' ENDIF ELSE BEGIN p = connect('', queue, /no_ini, /int, /safe) IF min(p) LE 0 THEN BEGIN print, 'Min data <= 0!' ENDIF ELSE $ save_result, p, 'FITS/'+name, /no ENDELSE catch, /cancel ;;; clean up disk spawn, 'rm -rf results support raw/rawdata' ENDFOR END