#! /bin/bash export P=1303310 echo Doing healpixes from $1 to $2 #for ((hp=0; hp<48; hp++)); do #for ((hp=1; hp<7; hp++)); do for ((hp=$1; hp<=$2; hp++)); do HP=$(printf %02i $hp) fitscopy ../the-making-of/2mass-split/2mass-hp${HP}.fits"[col ra;dec;j_mag;id(1K)=#row]" 2mass-hp${HP}.fits build-index -i 2mass-hp${HP}.fits -o index-${P}00-${HP}.fits -I ${P}00 -P 0 -S j_mag -n 20 -L 20 -E -j 1 -r 1 -s 2 -H ${hp} > hp${HP}-0.log build-index -1 index-${P}00-${HP}.fits -o index-${P}01-${HP}.fits -I ${P}01 -P 1 -S j_mag -L 20 -E -M -j 1 -s 2 -H ${hp} > hp${HP}-1.log & build-index -1 index-${P}00-${HP}.fits -o index-${P}02-${HP}.fits -I ${P}02 -P 2 -S j_mag -L 20 -E -M -j 1 -s 2 -H ${hp} > hp${HP}-2.log & build-index -1 index-${P}00-${HP}.fits -o index-${P}03-${HP}.fits -I ${P}03 -P 3 -S j_mag -L 20 -E -M -j 1 -s 2 -H ${hp} > hp${HP}-3.log & build-index -1 index-${P}00-${HP}.fits -o index-${P}04-${HP}.fits -I ${P}04 -P 4 -S j_mag -L 20 -E -M -j 1 -s 2 -H ${hp} > hp${HP}-4.log & wait done