pro triplets,Log db='/DB' ; PC Version ; Last Modified 2005.01.12 csee ; For individual images...to do the whole Log use tripletfiles.pro ;This program makes a jpeg file of the image that you select ; (along with its corrispoding triplet mates). ; The output file is: ~/triplet.jpg cd,'',current=cdir & cd,cdir if n_params() eq 0 then log = cdir ;current log is the default print,'' print,'The Test Log is: ',log ;____________________________________________________________________________ ;check to see if Bushroe's processor has been run on this log. ;file_ck=findfile(log+'\DB2') ;if file_ck(0) ne '' then db='\DB2' ;;if file_ck(0) ne '' then begin ;i.e. /DB2 does exist ;;ans='n' ;;read,'Do you want to use the images in /DB2 (Bushroe Processed)? (y or n): ',ans ;;if ans eq 'y' then begin & print,'using /DB2' & db='/DB2' & endif else print,'using /DB' ;;endif cd,Log+db+'/Image' ;____________________________________________________________________________ ;List Files... files=t_getfil('*') ;spawn,'lsf',files,/noshell s=size(files) nfiles=fix(s(1)) numfiles=sstr(nfiles) ;numfiles=short string (nfiles) if files(0) eq '' then begin & print,'No files found' & goto,exit & endif array_sort,files ;sorts files in assending order first_file=fix(strmid(files(0),4,3)) ;the number of the first file last_file=fix(strmid(files(nfiles-1),4,3)) ;the number of the last file print,'The number of Images in this log is: ',sstr(nfiles),' (',sstr(first_file),' thru ',sstr(last_file),')' window,1,xsize=250, ysize=850 ;____________________________________________________________________________ ;Initalize... auto=2 ;for auto=0:manual_stretch auto=1:tvscl,min-to-max auto=2:tvscl,min-to-2.5xaverage min=0 ;the tvscl min setting max=4095 ;the tvscl max setting ilast=0 ;ilast is the previous value of i space=1.5 ;x spacing in inches sf=.75 ;scale factor (scales the size of the images on the page) ypos=0.5 ;sets the y position for each row ff=-1 ;flag for flat fields, 1=>enabled, -1=>disabled menu: print,'' print,'Enter to... Enter to... print,' 0 Get this menu -4 Autoscale, min to max print,' -1 Quit the program -5 Scale from min to 2.5 x average print,' -2 Change minimum -6 Print current image print,' -3 Change maximum -7 Toggle flat field ;____________________________________________________________________________ ;begin the loop that does the deed... again: file_no=0 read,'Which triplet do you want to display, 1 thru '+sstr(last_file)+'? (0 for menu): ',file_no if file_no eq 0 then goto,menu ;display menu if file_no eq -1 then goto, exit ;end of program if file_no eq -2 then begin ;set minimum of stretch auto=0 read,'Old Min = '+sstr(min)+'; New Min? ',min print,'Min set to: ',sstr(min) file_no=ilast endif if file_no eq -3 then begin ;set maximum of stretch auto=0 read,'Old Max = '+sstr(max)+'; New Max? ',max print,'Max set to: ',sstr(max) file_no=ilast endif if file_no eq -4 then begin ;autoscale to max and min auto=1 print,'Set to Autoscale, min to max.' file_no=ilast endif if file_no eq -5 then begin ;autoscale, range = minimum to 2.5 x average auto=2 print,'Set to Autoscale, min to 2.5xAve.' file_no=ilast endif if file_no eq -6 then begin ;prints current image set_plot,'ps' device,filename = '~/idl.ps',/times,/portrait,xsize=7.5,ysize=9,yoffset=1.0,/inches,bits_per_pixel=8 ;;device,filename = '~/idl.ps',/times,/portrait,xsize=4.5,ysize=5.4,yoffset=1.0,/inches,bits_per_pixel=8 if auto eq 1 then tvscl,bytscl(p,min=min(p),max=max(p),top=255) else tvscl,bytscl(p,min=min,max=max,top=255) ;p>minmin