# Last edited on 2008-02-04 13:01:33 by stolfi # Creates "eps" figures showing the best N candidates # for some run of the program. # Which test data: DATASET = ceramic-3 # Which candidate sets to show: FIGSETS = \ run-2/f/002/r/00059/by-hand-new/tru-m/1 NONFIGSETS = \ by-hand/f/001/t/00999/NOREF/-/- \ by-hand/f/002/t/00039/run-2/r/1 \ \ run-2/f/004/r/00004/by-hand/t/210 \ run-2/f/008/r/00004/by-hand/t/210 \ run-2/f/016/r/00004/by-hand/t/210 \ run-2/f/032/r/00004/by-hand/t/210 \ .PHONY: all clean singleclean singleset singlerun singleshow clean: for figset in ${FIGSETS}; do \ ${MAKE} FIGSET=$$figset singleclean; \ done all: for figset in ${FIGSETS}; do \ ${MAKE} FIGSET=$$figset singleset singleshow; \ done # ====================================================================== # For recursive "make" only -- caller must define ${FIGSET} FIGSET := FIGSET.IS.UNDEFINED ifneq "${FIGSET}" "FIGSET.IS.UNDEFINED" # singleset: singleclean singlerun singleshow singleset: singleclean singlerun # singleset: singleshow # Get figset attributes FIELDS := ${subst /, ,${FIGSET}} RUN := ${word 1,${FIELDS}} FILTERTAG := ${word 2,${FIELDS}} BAND := ${word 3,${FIELDS}} CANDTAG := ${word 4,${FIELDS}} LASTCAND := ${word 5,${FIELDS}} REFRUN := ${word 6,${FIELDS}} REFCANDTAG := ${word 7,${FIELDS}} REFLMIN := ${word 8,${FIELDS}} FIRSTCAND := 00000 # The /l/sdb version only works on "amelia". The /home/amelia version # has been giving bogus "no such file" errors to FileRd.Open(). # DATADIR := /home/amelia/stolfi/hcgl/tests-for-export/${DATASET} DATADIR = /l/sdb/staff/stolfi/hcgl/tests-for-export/${DATASET} PROGDIR = ${STOLFIHOME}/programs/pm3-1.1.15/THESES/hcgl/1/bin/${PLATFORM} SETPATH = PATH=".:${PROGDIR}:$$PATH"; export PATH # Which filtering scale to plot: FBAND := ${FILTERTAG}${BAND} # Target files are ${ESPPREFIX}-pg*.eps EPSPREFIX := ${RUN}-${FBAND}-${CANDTAG} # Candidate file name CANDFILE := ${DATADIR}/results/${RUN}/${FBAND}-${CANDTAG} # Curve directory: ifeq "${FILTERTAG}" "r" CURVEDIR := ${DATADIR}/data/fragments LAMBDA := 0.0 else CURVEDIR := ${DATADIR}/data/multiscale LAMBDA := ${shell echo `cat ${CURVEDIR}/f${BAND}.lambda`} endif STEP := ${shell gawk -v lam=${LAMBDA} 'BEGIN{printf "%.4f", lam/4;}'} # Decide style options OPTS := OPTS := ${OPTS} -noColors -noPointers OPTS := ${OPTS} -scaleBar 1 -scaleBarStep 118.1 -labelSize 20 -displace 1 OPTS := ${OPTS} -mismatchSize 20 # Decide plotting resolution for the chains: OPTS := ${OPTS} ${shell \ if [ ${BAND} -ge 032 ]; then \ echo ' -drawAllSamples -sampleDots'; \ elif [ ${BAND} == 000 ]; then \ echo ' -drawAllSamples'; \ fi} ifneq "(${REFRUN})" "(NOREF)" # We have a reference file: REFCANDFILE := ${DATADIR}/results/${REFRUN}/${FBAND}-${REFCANDTAG} REFOPTS := -refInput ${REFCANDFILE} \ -minRefLength ${REFLMIN} -blurFactor 3 \ -minCompOverlap 20 -maxCompShift 25 endif singleclean: /bin/rm -f ${EPSPREFIX}-pg*.eps singlerun: ${EPSPREFIX}.log ${EPSPREFIX}.log: ${CANDFILE}.can Makefile ${PROGDIR}/PZDrawCands @echo "lambda = ${LAMBDA} step = ${STEP}" ${SETPATH}; PZDrawCands \ -input ${CANDFILE} \ ${REFOPTS} \ -chainDir ${CURVEDIR} -chainPrefix ${FILTERTAG} \ -band ${BAND} -step ${STEP} \ -output ${EPSPREFIX} \ -epsFormat \ -candsRange ${FIRSTCAND} ${LASTCAND} \ -actualSize 80 80 -objectSize 1000 1000 \ ${OPTS} \ | tee ${EPSPREFIX}.log singleshow: for f in ${EPSPREFIX}-0000[0-4].*ps; do \ ghostview $$f; \ done endif # End of "singleset" part. # ======================================================================