#! /bin/csh -f ############################################################## ############################################################## ## ## ## This script makes the individual intensity gif images ## ## that are put at /synoptic/gifs/intensities. It requires ## ## /synoptic/new_scripts/Ic_synop/CR[/peq., which ## ## must have been generated when you ran ## ## /synoptic/new_scripts/Ic_synop/get_data_cr to ## ## make the intensity synoptic charts. The images pop up ## ## on your screen, so your display needs to be running. ## ## If you "set_plot, z" in the idl script, the images come ## ## out very dark. ## ## ## ## It creates various scratch files in the cwd ## ## ## ############################################################## ############################################################## if ( $#argv != 1 ) then echo "*** Requires Carrington Rotation number ***" echo " make_gifs_cr [CR]" echo "*** Retry" exit endif set WDIR = /synoptic/new_scripts/Ic_synop set CR = $1 set CRDIR = $WDIR/CR$CR if (!(-e $CRDIR)) then echo "*** Required directory doesn't existis - $CRDIR" echo "*** Likely no peq.$CR file available" exit endif set peq_file = $CRDIR/peq.$CR set INTPEQlst = $CRDIR/int.peq.$CR set DOinten = $CRDIR/do_int.$CR set DOdarks = $CRDIR/do_dark.$CR ### This part makes the gifs for the lev2 intensity files ### @ start = `head -1 $peq_file | awk -F\[ '{print $2}' | awk -F\] '{print $1}'` @ end = `tail -1 $peq_file | awk -F\[ '{print $2}' | awk -F\] '{print $1}'` echo "Will run: snqry -pmdi -llev2 -sfd_Ic_6h_01d -b$start -e$end " snqry -pmdi -llev2 -sfd_Ic_6h_01d -b$start -e$end > $INTPEQlst echo Making $DOinten echo "#! /bin/csh -f" > $DOinten echo "setenv IDL_DIR /usr/local/rsi/idl_6.2" >> $DOinten echo "source /mdisw/setup/setup_mdisoi" >> $DOinten echo "/ssw/gen/setup/ssw_idl <> $DOinten echo ".run $WDIR/int_gif" >> $DOinten echo ".run $WDIR/int_dk_gif" >> $DOinten echo ".run $WDIR/mag_gif" >> $DOinten echo "" >> $DOinten foreach dir ( `peq -A -w -t4 -f $INTPEQlst | grep PDS | awk '{print $3}'` ) foreach file ( `ls -1 $dir/*fits | grep -v overview` ) echo "int_gif, '$file'" >> $DOinten end end echo "BAR" >> $DOinten chmod +x $DOinten echo $DOinten now complete ### This part makes a new lev2 dataset that has the limb darkening restored ### if (-e $CRDIR/darkmaps) then if (-e $CRDIR/darkmaps_temp) then rm -rf $CRDIR/darkmaps_temp endif echo $CRDIR/darkmaps exists, moving to darkmaps_temp mv $CRDIR/darkmaps $CRDIR/darkmaps_temp endif mkdir $CRDIR/darkmaps foreach i ( `awk -F\[ '{print $2}' $INTPEQlst | awk -F\] '{print $1}'` ) set DARKMAP = $CRDIR/darkmaps/map.$CR.$i echo "\!setenv mdi wd:{dbase}/{level}/{series}.{#%d#series},bn:{series}.{#%04d#series}" > $DARKMAP echo "DSDSOUT=2500" >> $DARKMAP echo "p=fitlimbdark d=1 a=n2 \\" >> $DARKMAP echo " r=1 g=1 ld_limit=0.995 F=1 \\" >> $DARKMAP echo " in=prog:mdi,level:lev2,series:fd_Ic_6h_01d[$i] \\" >> $DARKMAP echo " out=prog:mdi,level:lev2,series:fd_Ic_+lmdk_6h_01d[$i]" >> $DARKMAP # @ i++ end echo Making limb darkened maps set CWD = `pwd` cd $CRDIR/darkmaps foreach map ( map* ) pe -v -A map=$map end snqry -pmdi -llev2 -sfd_Ic_+lmdk_6h_01d -b$start -e$end > $CRDIR/int_dk.peq.$CR echo "#! /bin/csh -f" > $DOdarks echo "setenv IDL_DIR /usr/local/rsi/idl_6.2" >> $DOdarks echo "source /mdisw/setup/setup_mdisoi" >> $DOdarks echo "/ssw/gen/setup/ssw_idl <> $DOdarks echo ".run $WDIR/int_gif" >> $DOdarks echo ".run $WDIR/int_dk_gif" >> $DOdarks # echo ".run $WDIR/gifs/mag_gif" >> $DOdarks echo "" >> $DOdarks foreach dir ( `peq -A -w -t4 -f $CRDIR/int_dk.peq.$CR | grep PDS | awk '{print $3}'` ) foreach file ( `ls -1 $dir/*fits | grep -v overview` ) echo "int_dk_gif, '$file'" >> $DOdarks end end echo "BAR" >> $DOdarks chmod +x $DOdarks echo "On your own machine run $DOinten" echo "On your own machine run $DOdarks" cd $PWD