# Last edited on 2011-04-20 13:54:55 by stolfi

TAGS := un1 un2 un3

PLOT_NAMES := \
  ${addprefix plot-,un1 un2 un3} \
  ${addprefix ptmp-TCn-PCB-,un1} \
  ${addprefix ptmp-TCn-PCA-,un2 un3} \
  ${addprefix ptmp-TCb-PCB-,un1} \
  ${addprefix ptmp-TCb-PCA-,un2 un3} \
  ${addprefix pcor-PCB-PD-,un1} \
  ${addprefix pcor-PCA-PD-,un2 un3} \
  ${addprefix pcor-PD-PS-,un1 un2 un3} \


FULL_PLOT_FILES := ${addsuffix -full.png, ${PLOT_NAMES}}

ICON_PLOT_FILES := ${subst -full,-icon,${FULL_PLOT_FILES}}

all: ${FULL_PLOT_FILES} ${ICON_PLOT_FILES}

icons: ${ICON_PLOT_FILES}

# ----------------------------------------------------------------------
# Reactor plots:

plot-un%-full.png: plot-reactor.sh Makefile \
            data-un%.txt \
            heat-un%.txt \
            wlev-un%.txt \
            cams-un%.txt \
            flow-un%.txt \
            boom-un%.txt
	./plot-reactor.sh $*

# ----------------------------------------------------------------------
# Core/drywell and drywell/torus pressure-tracking plots:

UNIT1_EPOCHS := \
  140 242 290 320

pcor-PCB-PD-un1-full.png: data-un1.txt plot-pressure-tracking.sh Makefile
	./plot-pressure-tracking.sh 1  1 2  'X' '1.56*(X - 85)' ${UNIT1_EPOCHS}

pcor-PD-PS-un1-full.png: data-un1.txt plot-pressure-tracking.sh Makefile
	./plot-pressure-tracking.sh 1  2 3  'X' 'X - 20'        ${UNIT1_EPOCHS}

ptmp-TCn-PCB-un1-full.png: data-un1.txt heat-un1.txt plot-pressure-temp.sh Makefile
	./plot-pressure-temp.sh 1  0 1  ${UNIT1_EPOCHS}

ptmp-TCb-PCB-un1-full.png: data-un1.txt heat-un1.txt plot-pressure-temp.sh Makefile
	./plot-pressure-temp.sh 1  1 1  ${UNIT1_EPOCHS}


UNIT2_EPOCHS := \
  135 230 242 260

pcor-PCA-PD-un2-full.png: data-un2.txt plot-pressure-tracking.sh Makefile
	./plot-pressure-tracking.sh 2  0 2  'X' 'X + 60'        ${UNIT2_EPOCHS}

pcor-PD-PS-un2-full.png: data-un2.txt plot-pressure-tracking.sh Makefile
	./plot-pressure-tracking.sh 2  2 3  'X' 'X'             ${UNIT2_EPOCHS}

ptmp-TCn-PCA-un2-full.png: data-un2.txt heat-un2.txt plot-pressure-temp.sh Makefile
	./plot-pressure-temp.sh 2  0 0  ${UNIT2_EPOCHS}

ptmp-TCb-PCA-un2-full.png: data-un2.txt heat-un2.txt plot-pressure-temp.sh Makefile
	./plot-pressure-temp.sh 2  1 0  ${UNIT2_EPOCHS}


UNIT3_EPOCHS := \
  62 208 242 260

pcor-PCA-PD-un3-full.png: data-un3.txt plot-pressure-tracking.sh Makefile
	./plot-pressure-tracking.sh 3  0 2  'X + 70' 'X + 20'   ${UNIT3_EPOCHS}

pcor-PD-PS-un3-full.png: data-un3.txt plot-pressure-tracking.sh Makefile
	./plot-pressure-tracking.sh 3  2 3  'X' 'X - 50'        ${UNIT3_EPOCHS}

ptmp-TCn-PCA-un3-full.png: data-un3.txt heat-un3.txt plot-pressure-temp.sh Makefile
	./plot-pressure-temp.sh 3  0 0  ${UNIT3_EPOCHS}

ptmp-TCb-PCA-un3-full.png: data-un3.txt heat-un3.txt plot-pressure-temp.sh Makefile
	./plot-pressure-temp.sh 3  1 0  ${UNIT3_EPOCHS}

# ----------------------------------------------------------------------
# Icons:
        
%-icon.png: %-full.png
	convert $*-full.png -resize 'x160' $*-icon.png