procedure tesone (cpAcross, runExtspect, inFile, inMatchFile, inWaveFile, inApertFile, threshCol, normSlice, maxDist, S, strgalCut, strgalObs, strMaxFlx, strMinFlx, strMaxFWHM, strMinFWHM, strApNum, ccdUsed, speedUsed, Xcen, Ycen, outFilePref, k, maxRowDepth, obsvReqd, dummyFile, startID, CRcatalogue) bool cpAcross {yes, prompt="Copy and compile extscale.f?"} bool runExtspect {yes, prompt="Run extscale.f? If so, supply inputs:"} string inFile {"cat1.13c8",prompt=" (X-sorted) catalogue (from TSEX)"} string inMatchFile {"-", prompt=" Coordinate file** of field objects to flag"} string inWaveFile {"wave1.13c8", prompt=" Sorted wavelengths file (from TWAVELENGTHS)"} string inApertFile {"apsUS.13c8", prompt=" Aperture sizes/flux threshold file (from TNOISE)"} int threshCol {12, prompt=" Flux thresh column (>=2 => mean values used)"} int normSlice {1, prompt=" Slice number for stellar flux normalisations"} real maxDist {5.0, prompt=" Maximum pixel-distance for an object match"} real S {2.0, prompt=" Sigma threshold for variations in seeing"} real strgalCut {0.5, prompt=" Star/gal. cut-off for defining stellar sample"} int strgalObs {0, prompt=" Maximum number of missed stellar observations"} string strMaxFlx {"2e4", prompt=" Maximum stellar flux"} string strMinFlx {"500", prompt=" Minimum stellar flux"} real strMaxFWHM {10.0, prompt=" Maximum stellar FWHM"} real strMinFWHM {3.4, prompt=" Minimum stellar FWHM"} int strApNum {4, prompt=" Stellar aperture number to use"} string ccdUsed {"1K_TEK", prompt=" (CCD used: 1K_TEK/MIT_LL)"} string speedUsed {"NORMAL", prompt=" (CCD speed: NORMAL/FAST/SLOW)"} int Xcen {576, prompt=" X-coord of optical axis centre"} int Ycen {242, prompt=" Y-coord of optical axis centre"} string outFilePref {"tst", prompt=" Output catalogue file name extensions"} real k {5, prompt=" Maximum comparison factor for checking against previous"} real maxRowDepth {75, prompt=" Maximum search distance from ref obsvn"} int obsvReqd {1, prompt=" EXACT number of obsvns req'd per object"} bool dummyFile {yes, prompt="**Make a dummy (empty) inMatchFile file?"} int startID {540, prompt=" STARTING ID"} string CRcatalogue {"cray1.13c8", prompt=" NAME of CR/ghost catalogue"} begin # Variable declarations: real gn # CCD gain real Dpix # number of CCD pixels covered by angle beta real beta # angle subtended by CCD over a given number of pixels real readN # CCD read noise (not used as extspect.f input) real readTime # CCD read out time (not used as extspect.f input) int inpflag # input flag (=1 for input OK; =0 if input a problem) string c1 # first character of all filenames (for checking, since # FORTRAN will not read filenames beginning with a no.) if (cpAcross==yes) { print (" ") print ("-----------------------------------------------") print (" Copying extscale.f across...") !cp /home/dhj/iraf/TFred/extscale.f . print (" ") print (" Compiling...") # !f77 extscale.f -o extscale !f77 -C extscale.f -o extscale print (" ") } # if (cpSMscri==yes) { # print (" ") # print (" Copying figstacker, figlinesamp(II), figquick, post and round ...") # !cp /home/dhj/iraf/TFred/figstacker . # !cp /home/dhj/iraf/TFred/figlinesamp . # !cp /home/dhj/iraf/TFred/figlinesampII . # !cp /home/dhj/iraf/TFred/figquick . # !cp /home/dhj/iraf/TFred/post . # !cp /home/dhj/iraf/TFred/round . # print (" ") # # } if (runExtspect==yes) { print (" ") print ("-----------------------------------------------") print (" Creating extscale.in...") print (" ") # Checking for numeric starters in supplied file names: # (FORTRAN will not read such names if given as input!!) inpflag = 1 c1 = substr(inFile, 1, 1) if ((c1=="0")||(c1=="1")||(c1=="2")||(c1=="3")|| (c1=="4")||(c1=="5")||(c1=="6")||(c1=="7")||(c1=="8")||(c1=="9")) { print("** ERROR: first character of 'inFile' ("//inFile//") is numeric **") inpflag = 0 } c1 = substr(inMatchFile, 1, 1) if ((c1=="0")||(c1=="1")||(c1=="2")||(c1=="3")|| (c1=="4")||(c1=="5")||(c1=="6")||(c1=="7")||(c1=="8")||(c1=="9")) { print("** ERROR: first character of 'inMatchFile' ("//inMatchFile//") is numeric **") inpflag = 0 } c1 = substr(inWaveFile, 1, 1) if ((c1=="0")||(c1=="1")||(c1=="2")||(c1=="3")|| (c1=="4")||(c1=="5")||(c1=="6")||(c1=="7")||(c1=="8")||(c1=="9")) { print("** ERROR: first character of 'inWaveFile' ("//inWaveFile//") is numeric **") inpflag = 0 } c1 = substr(inApertFile, 1, 1) if ((c1=="0")||(c1=="1")||(c1=="2")||(c1=="3")|| (c1=="4")||(c1=="5")||(c1=="6")||(c1=="7")||(c1=="8")||(c1=="9")) { print("** ERROR: first character of 'inApertFile' ("//inApertFile//") is numeric **") inpflag = 0 } c1 = substr(outFilePref, 1, 1) if ((c1=="0")||(c1=="1")||(c1=="2")||(c1=="3")|| (c1=="4")||(c1=="5")||(c1=="6")||(c1=="7")||(c1=="8")||(c1=="9")) { print("** ERROR: first character of 'outFilePref' ("//outFilePref//") is numeric **") inpflag = 0 } if (inpflag==0) { print(" ") print(" --> Please change incorrect file name(s) and re-run") print(" ") print (" Done.") print (" ") print (" ") bye } if ((dummyFile==yes)||(inMatchFile=="-")) { !/bin/rm match_empty.jnk print ("", >> "match_empty.jnk") print (" (Created dummy inMatchFile: match_empty.jnk)") print (" ") inMatchFile="match_empty.jnk" } inpflag=0 if (ccdUsed=="1K_TEK") { Dpix = 1024 beta = 0.19 if (speedUsed=="FAST") { gn = 5.5 readN = 7.2 readTime = 52 inpflag=1 } if (speedUsed=="NORMAL") { gn = 2.74 readN = 4.8 readTime = 75 inpflag=1 } if (speedUsed=="SLOW") { gn = 1.36 readN = 3.6 readTime = 120 inpflag=1 } } if (ccdUsed=="MIT_LL") { Dpix = 1638.4 beta = 0.19 if (speedUsed=="FAST") { gn = 2.3 readN = 2.9 readTime = 95 inpflag=1 } if (speedUsed=="NORMAL") { gn = 1.11 readN = 2.0 readTime = 160 inpflag=1 } if (speedUsed=="SLOW") { gn = 0.366 readN = 1.45 readTime = 300 inpflag=1 } } if (inpflag==0) { print(" *** PROBLEM WITH INPUT FOR CCD AND/OR READ SPEED ***") print(" --> Please check this and try again.") print(" ") print (" Done.") print (" ") print (" ") bye } print ("-----------------------") print (ccdUsed) print ("Read speed: "//speedUsed) print ("Gain: "//gn//" e-/ADU") print ("R/noise: "//readN//" e-") print ("Read time (1K): "//readTime//" s") print (Dpix//" pixels subtends "//beta) print ("-----------------------") print (" ") !/bin/rm extscale.in print (inFile, >> "extscale.in") print (inMatchFile, >> "extscale.in") print (inWaveFile, >> "extscale.in") print (inApertFile, >> "extscale.in") print (threshCol, >> "extscale.in") print (normSlice, >> "extscale.in") print (maxDist, >> "extscale.in") print (S, >> "extscale.in") print (strgalCut, >> "extscale.in") print (strgalObs, >> "extscale.in") print (strMaxFlx, >> "extscale.in") print (strMinFlx, >> "extscale.in") print (strMaxFWHM, >> "extscale.in") print (strMinFWHM, >> "extscale.in") print (strApNum, >> "extscale.in") print (gn, >> "extscale.in") print (Dpix, >> "extscale.in") print (beta, >> "extscale.in") print (Xcen, >> "extscale.in") print (Ycen, >> "extscale.in") print (outFilePref, >> "extscale.in") print (k, >> "extscale.in") print (maxRowDepth, >> "extscale.in") print (obsvReqd, >> "extscale.in") print (startID, >> "extscale.in") print (CRcatalogue, >> "extscale.in") # print (" ") # print ("extscale.in:") # type (input_fi="extscale.in",map_cc+,device="terminal") print (" ") print ("-----------------------------------------------") print (" Running extscale ...") print (" ") !extscale } print (" ") print ("-----------------------------------------------") # print (" ") # print (" Done.") print (" ") print (" ") end