;
; ; SOURCE: spider/docs/techs/recon1/Procs/plot-ref-views.spi ; ; PURPOSE: Creates a plot summary of number of particles assigned to each views. ; Selects '*_good'input file if it exists otherwise selects: '*_all'. ; Can display plot. ; ; USAGE: clean ; ./spider spi/dat @plot-ref-views ; ------------ Parameters ---------------------------------------- [wantGoodYN] = 0 ; Use 0 for all particles, 1 for verified particles [wantplot-yn] = 1 ; Set to: 0 if you do not want to open Gnuplot automatically ; ------------ Input files ---------------------------------------- [howmany] = 'views/parts_vsview' ; Particles per view doc file ; --------------- Output files ------------------------------------- [gnuplot] = 'parts_vsview' ; Overall gnuplot script (without extension) ; -------------- END BATCH HEADER ---------------------------------- MD ; Quiet VB OFF IQ FI [goodexist] ; See if this should access 'all' or 'good' [howmany]_good ; Will only use the verified ('_good') data if it exists *and* if [wantGoodYN] = 1 IF ( [goodexist] == 1 ) THEN IF ( [wantGoodYN] == 1 ) [useGood] = 1 ELSE [useGood] = 0 ENDIF IF ( [useGood] == 1 ) THEN [allvsgood] = 'good' ELSE [allvsgood] = 'all' ENDIF ; Concatenate name [plot] = '[gnuplot]_[allvsgood].gnu' [source] = '[howmany]_[allvsgood].$DATEXT' SYS ; Delete the group script output file rm -f [plot] SYS ; Create gnuplot script file echo ' 'set ylabel \"Particles\" > [plot] SYS echo ' 'set xlabel \"View\" >> [plot] SYS echo ' 'set title \"Particles vs View\" >> [plot] SYS echo 'plot [][] \' >> [plot] IF ( [useGood] == 1 ) THEN SYS echo '"[howmany]_all.$DATEXT" using 1:3 title "all" with boxes lw 2, \' >> [plot] ENDIF SYS echo ' ' \'[source]\' using 1:3 title \'[allvsgood]\' with boxes fs solid 1 border -1 >> [plot] SYS echo IF ( [wantplot-yn] == 1 ) THEN SYS echo ' 'Displaying histogram of views using: gnuplot -persist [plot]; echo SYS ; Plot the histogram file gnuplot -persist [plot] ELSE SYS ; Plot the histogram file echo " Plot by typing: ' gnuplot -persist [plot] '" ; echo ENDIF EN D ; Modified 2016-06-03 ; 2016-04-27 (trs) -- uses [wantGoodYN] ; 2015-12-08 (trs) -- overlays total- and good-particle histograms ; 2013-10-23 (agl) -- new file names, modernized syntax & cosmetic ;