# Last edited on 2008-02-04 13:01:44 by stolfi # Creates "eps" figures showing the assembled pieces and the # adjacency graphs of found solutions # Which test data: DATASET = ceramic-3 # Which candidate sets to show: SOLS = \ run-2-new/f/002/r-AND-tru-r/run-2-new/rec-r-NOT-r/210 NONSOLS = \ run-2-new/f/002/r-AND-tru-r/by-hand-new/rec-r/210 .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}} REFRUN := ${word 5,${FIELDS}} REFCANDTAG := ${word 6,${FIELDS}} REFLMIN := ${word 7,${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;}'} PLOTSTEP := 0.5 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 ifneq "(${REFRUN})" "(NOREF)" # We have a reference file: REFCANDFILE := ${DATADIR}/results/${REFRUN}/${FBAND}-${REFCANDTAG} REFOPTS := -candSet ${REFCANDFILE} minLength ${REFLMIN} \ adjs lineWidth 0.50 color 0.65 0.65 0.65 else REFOPTS := endif sol-draw: ${OUTPREFIX}.eps ${OUTPREFIX}.eps: ${CANDFILE}.can Makefile ${PROGDIR}/PZDrawCluster @echo POSFILE = "${POSFILE}" @echo CANDFILE = "${CANDFILE}" ${SETPATH}; PZDrawCluster @M3stackdump \ -input ${POSFILE} \ -chainDir ${CURVEDIR} -chainPrefix ${FILTERTAG} \ -band ${BAND} -step ${STEP} -plotStep ${PLOTSTEP} -blurFactor 3 \ ${REFOPTS} \ -candSet ${CANDFILE} both lineWidth 0.25 color 0.0 0.0 0.0 \ -output ${OUTPREFIX} \ -epsFormat \ -actualSize 160 128 -objectSize 4250 3400 \ ${DRAWOPTS} \ | tee ${OUTPREFIX}.log sol-show: ${OUTPREFIX}.eps ghostview ${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. # ======================================================================