#!/bin/sh
###################################################
# Display a grid with specified age:
# Argument = Age,rec1-rec2
###################################################
file=$theTab.dat
age=`echo $1|acut -d, -f1`
rec=`echo $1|acut -d, -f2`
A=`glufilter -r "<&Cat.file,u $theCat>"`
echo1 "\section*{Isochrone from \A{$A/$file}{$file} (age=${age}Gyr)}"
echo1 "{\em(all isochrones can be copied from $A)}"
echo1 "\begin{PRE}\begin{verbatim}"
tabmap -ascii $file | gawk -v age="$age" '\
 /^-----------/{ phase++ ; print; next }\
 { if (phase != 2) { print; next} \
   if ($1 == age) { n++; print } \
   else if (n>0) exit(0);
 }'
echo1 "\end{verbatim}\end{PRE}"
