#!/bin/csh alias echo "echo > /dev/null" kappa figaro unalias echo gdclear lutheat convert # echo " " echo " *** SLOPE OF SLIT *** " echo " " echo " Extract three rows near top, centre and bottom of array from " echo " image of the slit. Fit gaussians to the spectra to check " echo " positions of the peaks. Calculates angle of slit - should " echo " be 90 degrees " echo " " echo " Use QUICK_LOOK _raw frames" echo " " set date=20060201 echo "Date set to" $date echo -n "Number of calibration frame: " set in="$<" if ($in < 10) set numcal=0000${in} if ($in > 9 && $in < 100) set numcal=000${in} if ($in > 99 && $in < 1000) set numcal=00${in} if ($in > 999) set numcal=0${in} gaiadisp u${date}_${numcal}_raw echo " Extract two rows, top and bottom" extract image=u${date}_${numcal}_raw ystart=190 yend=195 spectrum=bottom extract image=u${date}_${numcal}_raw ystart=500 yend=505 spectrum=middle extract image=u${date}_${numcal}_raw ystart=970 yend=975 spectrum=top echo " " echo " Assuming arc line in range x1=600 to x2=630..." echo " " echo " " echo " ******************************************** " echo " ******************************************** " echo " GAUSSIAN FITTING... " echo " " fitgauss in=bottom device=xw mask1=600 mask2=630 echo " " echo " ******************************************** " echo " ******************************************** " echo " *** Make a note of X-posn. of peak at BOTTOM" echo " " fitgauss in=middle device=xw mask1=600 mask2=630 echo " " echo " ******************************************** " echo " ******************************************** " echo " *** Make a note of X-posn. of peak at MIDDLE" echo " " fitgauss in=top device=xw mask1=600 mask2=630 echo " " echo " ******************************************** " echo " ******************************************** " echo " *** Make a note of X-posn. of peak at TOP" echo " " echo " " echo " ******************************************** " echo " ******************************************** " echo " " echo " Finally..." echo " " echo -n " Enter x-value at BOTTOM of slit: " set xa = ( $< ) echo -n " Enter x-value at TOP of slit: " set xb = ( $< ) echo " " # HK vertical dispersion echo " y1 - y2 = 100 (rows 190 and 370 extracted) " # POL #echo " y1 - y2 = 100 (rows 670 and 770 extracted) " # LONG #echo " y1 - y2 = 900 (rows 50 and 950 extracted) " # X-DISP #echo " y1 - y2 = 100 (rows 505 and 605 extracted) " set angle = `calc exp="atand(180/($xa-$xb))"` #set angle = `calc exp="atand(900/($xa-$xb))"` #set angle = `calc exp="atand(100/($xa-$xb))"` echo " " echo " >>>> ANGLE OF SLIT = " $angle echo " " echo " "