#!/bin/csh -f
# Extract the source list from the property files.
# Have many alternatives when making a source list:
#   Assume L\propto M
#   Assume L\propto\sigma^4.
#   Draw from a luminosity function.
#
# z=6.0
#
grep -v \# pm_1.prop | sort -k 2 -n -r | head -10 | \
  awk '{printf "%.4f %.4f %.4f\n",$5,$6,$7}' > source.tmp
/f/mwhite/work/lyasim/jfluct/sources 11.6 0.5 25.0 source.tmp > source_1.lst
#
#
# z=5.5
#
grep -v \# pm_2.prop | sort -k 2 -n -r | head -10 | \
  awk '{printf "%.4f %.4f %.4f\n",$5,$6,$7}' > source.tmp
/f/mwhite/work/lyasim/jfluct/sources 23.9 5.1 25.0 source.tmp > source_2.lst
#
#
# z=5.0
#
grep -v \# pm_3.prop | sort -k 2 -n -r | head -10 | \
  awk '{printf "%.4f %.4f %.4f\n",$5,$6,$7}' > source.tmp
/f/mwhite/work/lyasim/jfluct/sources 49.1 49.0 25.0 source.tmp > source_3.lst
#
rm -f source.tmp
#
