#! /bin/csh -f # set echo # call with FSN range as 1 or 2 numbers then LEVSN range if needed as 0, 1, or 2 numbers. set noglob echo $0 $* >>log_run set LEVNO = 0 set FFSN = $1 set LFSN = $FFSN shift if ($#argv >= 1) then set LFSN = $1 shift endif set FLEV = 1 set LLEV = 1 if ($#argv >= 1) then set FLEV = $1 set LEVNO = 1 set LLEV = $FLEV shift endif if ($#argv >= 1) then set LLEV = $1 shift endif # setup for CIF set PROG = hmi_ground set LEVEL = lev0 set SERIES = egse_hmifsfm set FLAGS = "fsn_key=FSN keymap=/home/jsoc/hmi/ground/jsd/lev0.keymap" set PEQ = /home/phil/bin/_$MACHINE/PEQ set IMPORT_LEV0 = $JSOCROOT/bin/$JSOC_MACHINE/import_egse_lev0 set FSN = $FFSN while ($FSN <= $LFSN) set LEV = $FLEV while ($LEV <= $LLEV) if ($LEVNO > 0) then set LEVSPEC = "["$LEV"]" else set LEVSPEC = "" endif set DSDSNAME = $PROG","$LEVEL"$LEVSPEC"","$SERIES"["$FSN"]" set LEV0_PATH = `$PEQ "prog:"$PROG",level:"$LEVEL$LEVSPEC",series:"$SERIES"["$FSN"]" ` if ($LEV0_PATH[1] == "###") then echo "$DSDSNAME" not found else set FITSNAME = `printf "%09d" $FSN` echo " " echo Do $LEV0_PATH with $FITSNAME $IMPORT_LEV0 in=$LEV0_PATH/$FITSNAME.fits out=hmi_ground.lev0 "dsds=$DSDSNAME" $FLAGS echo -n "import done: " show_keys "ds=hmi_ground.lev0[$FSN]" key=FSN,T_OBS seg=file -p -q endif @ LEV = $LEV + 1 end @ FSN = $FSN + 1 end