# Last edited on 2008-02-04 13:02:07 by stolfi # Creates "eps" figures showing the assembled pieces and # adjacency graphs of the true solution and related # candidate sets. # Which test data: DATASET = ceramic-3 # Which candidate sets to show: SOLS = \ by-hand-new/f/000/tru-h/0 \ by-hand-new/f/000/rec-h/0 \ by-hand-new/f/000/unr-h/0 NONSOLS = .PHONY: \ all clean \ sol-clean sol-all sol-draw sol-show sol-print all: clean for sol in ${SOLS}; do \ ${MAKE} SOL=$$sol sol-all; \ done clean: for sol in ${SOLS}; do \ ${MAKE} SOL=$$sol sol-clean; \ done # ====================================================================== # For recursive "make" only -- caller must define ${SOL} SOL := SOL.IS.UNDEFINED ifneq "${SOL}" "SOL.IS.UNDEFINED" # Get sol attributes FIELDS := ${subst /, ,${SOL}} RUN := ${word 1,${FIELDS}} FILTERTAG := ${word 2,${FIELDS}} BAND := ${word 3,${FIELDS}} CANDTAG := ${word 4,${FIELDS}} MINLENGTH := ${word 5,${FIELDS}} FIRSTCAND := 00000 LASTCAND := 99999 # The /l/sdb version only works on "amelia". The /home/amelia version # has been giving bogus "no such file" errors to FileRd.Open(). # DATADIR = /l/sdb/staff/stolfi/hcgl/tests-for-export/${DATASET} DATADIR = /home/amelia/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 chain scale to use: FBAND = ${FILTERTAG}${BAND} # Output file names: OUTPREFIX := ${RUN}-${FBAND}-${CANDTAG} # Candidate file name CANDFILE := ${DATADIR}/results/${RUN}/${FBAND}-${CANDTAG} 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;}'} sol-all: sol-draw sol-show # Positions of pieces in full solution plot POSFILE = ${DATADIR}/results/by-hand/f000 # Drawing program options: DRAWOPTS := DRAWOPTS := ${DRAWOPTS} -scaleBar 1 -scaleBarStep 118.1 -spread 0.05 DRAWOPTS := ${DRAWOPTS} -labelSize 5 -labelFrames -labelShift -8 0 DRAWOPTS := ${DRAWOPTS} -lineWidth 0.15 # DRAWOPTS := ${DRAWOPTS} -grid 118.0 sol-draw: ${OUTPREFIX}.eps ${OUTPREFIX}.eps: ${CANDFILE}.can Makefile ${PROGDIR}/PZDrawCluster @echo POSFILE = "${POSFILE}" @echo CANDFILE = "${CANDFILE}" @echo LAMBDA = "${LAMBDA}" STEP = "${STEP}" ${SETPATH}; PZDrawCluster @M3stackdump \ -input ${POSFILE} \ -chainDir ${CURVEDIR} -chainPrefix ${FILTERTAG} \ -band ${BAND} -step ${STEP} -blurFactor 3 \ -candSet ${CANDFILE} \ minLength ${MINLENGTH} \ segs lineWidth 0.40 color 0.4 0.1 0.0 \ -output ${OUTPREFIX} -epsFormat \ -actualSize 160 128 -objectSize 4250 3400 \ -plotStep 0.5 \ ${DRAWOPTS} \ | tee ${OUTPREFIX}.log sol-show: ${OUTPREFIX}.eps kghostview ${OUTPREFIX}.eps sol-print: ${OUTPREFIX}.eps cat ${OUTPREFIX}.eps \ | gawk '/%%EOF/{print "showpage";} //{print}' \ | lpr -Ppr1 sol-clean: /bin/rm -f ${OUTPREFIX}*.eps ${OUTPREFIX}*.log endif # End of single sol part. # ======================================================================