Init2
This commit is contained in:
parent
a0f0371126
commit
7f3ae182e1
76 changed files with 76901 additions and 0 deletions
27
masks/sdss/README
Normal file
27
masks/sdss/README
Normal file
|
@ -0,0 +1,27 @@
|
|||
To run the quickstart example script:
|
||||
sdss_quickstart.sh
|
||||
|
||||
|
||||
To prepare the full SDSS mask:
|
||||
|
||||
Download the SDSS window and mask files from the mangle website at
|
||||
http://space.mit.edu/home/tegmark/mangle/download/data.html
|
||||
|
||||
|
||||
or from the NYU VAGC:
|
||||
http://sdss.physics.nyu.edu/lss/<release>/<cut>/<number>/lss/
|
||||
download window.<release><cut><number>.ply and mask.<release><cut><number>.ply
|
||||
|
||||
|
||||
e.g. for the safe0 sample for fixed version of Data Release 6, go to
|
||||
http://sdss.physics.nyu.edu/lss/dr6fix/safe/0/lss/
|
||||
and download window.dr6fixsafe0.ply and mask.dr6fixsafe0.ply
|
||||
|
||||
then run the mangle_sdss.sh script:
|
||||
mangle_sdss.sh <release> <cut><number>
|
||||
|
||||
e.g.:
|
||||
mangle_sdss.sh dr6fix safe0
|
||||
|
||||
This will balkanize the window function and the holes together.
|
||||
|
1
masks/sdss/args.dat
Normal file
1
masks/sdss/args.dat
Normal file
|
@ -0,0 +1 @@
|
|||
1 512 jhd rast_512.fits ../../bin/dat2fits_binary.x0 ../../bin/dat2fits_binary.x1 ../../bin/dat2fits_binary.x2 ../../bin/dat2fits_binary.x3 ../../bin/dat2fits_binary.x4 ../../bin/dat2fits_binary.x5 ../../bin/dat2fits_binary.x6 ../../bin/dat2fits_binary.x7 ../../bin/dat2fits_binary.x8 ../../bin/dat2fits_binary.x9 10 11 12 13 14 15 16
|
142
masks/sdss/mangle_sdss.sh
Executable file
142
masks/sdss/mangle_sdss.sh
Executable file
|
@ -0,0 +1,142 @@
|
|||
#! /bin/sh
|
||||
# © M E C Swanson 2007
|
||||
#script to combine window and holes of SDSS, as provided by the NYU VAGC:
|
||||
# http://sdss.physics.nyu.edu/vagc/
|
||||
#the window and mask files used by this script are in
|
||||
#lss/<release>/<cut>/<number>/lss/
|
||||
#window.<release><cut><number>.ply and mask.<release><cut><number>.ply
|
||||
#USAGE: mangle_sdss.sh <release> <cut><number>
|
||||
#EXAMPLE:mangle_sdss.sh dr7 safe0
|
||||
|
||||
if [ "$MANGLEBINDIR" = "" ] ; then
|
||||
MANGLEBINDIR="../../bin"
|
||||
fi
|
||||
if [ "$MANGLESCRIPTSDIR" = "" ] ; then
|
||||
MANGLESCRIPTSDIR="../../scripts"
|
||||
fi
|
||||
if [ "$MANGLEDATADIR" = "" ] ; then
|
||||
MANGLEDATADIR="../../masks"
|
||||
fi
|
||||
|
||||
sample=$1
|
||||
cuts=$2
|
||||
|
||||
#check command line arguments
|
||||
if [ "$sample" = "" ] || [ "$cuts" = "" ] ; then
|
||||
echo >&2 "ERROR: enter the SDSS release and cuts to use as command line arguments."
|
||||
echo >&2 ""
|
||||
echo >&2 "USAGE: mangle_sdss.sh <release> <cut><number>"
|
||||
echo >&2 "EXAMPLE:mangle_sdss.sh dr7 safe0"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
user=`whoami`
|
||||
names=`finger $user | fgrep "ame:" | sed 's/.*: *\([^ ]*\)[^:]*/\1/'`
|
||||
for name in ${names}; do break; done
|
||||
echo "Hello $name, watch me combine the window function and holes for the SDSS survey."
|
||||
|
||||
# to make verbose
|
||||
quiet=
|
||||
# to make quiet
|
||||
#quiet=-q
|
||||
|
||||
#to assign new id numbers
|
||||
old=
|
||||
#to keep old id numbers
|
||||
#old=-vo
|
||||
|
||||
#to pixelize dynamically
|
||||
#pix=
|
||||
#restag=
|
||||
#to pixelize everything to fixed resolution
|
||||
scheme="d"
|
||||
res=6
|
||||
pix="-P${scheme}0,${res}"
|
||||
restag="_res${res}${scheme}"
|
||||
|
||||
#uncomment this to put files from different releases in individual directories
|
||||
#filedir=$MANGLEDATADIR/$sample/$cuts/
|
||||
#cd $filedir
|
||||
|
||||
# name of output file to contain sdss polygons
|
||||
pol=sdss_${sample}${cuts}${restag}.pol
|
||||
grph=sdss_${sample}${cuts}${restag}.grph
|
||||
list=sdss_${sample}${cuts}${restag}.list
|
||||
eps=sdss_${sample}${cuts}${restag}.eps
|
||||
fields=window.${sample}${cuts}.ply
|
||||
mask=mask.${sample}${cuts}.ply
|
||||
holes=holes.${sample}${cuts}.ply
|
||||
|
||||
echo 0 > jw
|
||||
echo "$MANGLEBINDIR/weight -zjw $mask $holes"
|
||||
$MANGLEBINDIR/weight -zjw $mask $holes
|
||||
|
||||
echo "$MANGLEBINDIR/snap -S $quiet $fields $holes jfhs"
|
||||
$MANGLEBINDIR/snap -S $quiet $fields $holes jfhs || exit
|
||||
echo "$MANGLEBINDIR/pixelize $quiet $old $pix jfhs jfhp"
|
||||
$MANGLEBINDIR/pixelize $quiet $old $pix jfhs jfhp || exit
|
||||
echo "$MANGLEBINDIR/snap $quiet $old jfhp jfh"
|
||||
$MANGLEBINDIR/snap $quiet $old jfhp jfh || exit
|
||||
echo "$MANGLEBINDIR/balkanize $quiet $old jfh jb"
|
||||
$MANGLEBINDIR/balkanize $quiet $old jfh jb || exit
|
||||
echo "$MANGLEBINDIR/unify $quiet $old jb $pol"
|
||||
$MANGLEBINDIR/unify $quiet $old jb $pol || exit
|
||||
|
||||
echo "Polygons for SDSS $1 $2 are in $pol"
|
||||
|
||||
# Graphics
|
||||
|
||||
# number of points per (2 pi) along each edge of a polygon
|
||||
pts_per_twopi=30
|
||||
|
||||
echo "$MANGLEBINDIR/poly2poly -og$pts_per_twopi $quiet $pol $grph"
|
||||
$MANGLEBINDIR/poly2poly -og$pts_per_twopi $quiet $pol $grph || exit
|
||||
echo "Data suitable for plotting polygons of the SDSS $1 $2 mask are in $grph:"
|
||||
echo "each line is a sequence of az, el points delineating the perimeter of a polygon."
|
||||
|
||||
# for plotting with the matlab script
|
||||
|
||||
if which matlab >/dev/null 2>&1 ; then
|
||||
# name of output file to contain matlab graphics
|
||||
|
||||
echo "$MANGLEBINDIR/poly2poly -ol$pts_per_twopi $quiet $pol $list"
|
||||
$MANGLEBINDIR/poly2poly -ol$pts_per_twopi $quiet $pol $list || exit
|
||||
echo "Data for plotting polygons of the SDSS $1 $2 mask in Matlab are in $list."
|
||||
echo "Using Matlab to plot the SDSS $1 $2 mask ..."
|
||||
echo "$MANGLESCRIPTSDIR/graphmask.sh $list $eps"
|
||||
$MANGLESCRIPTSDIR/graphmask.sh $list $eps 0 0 0 0 "Completeness mask for SDSS $sample $cuts"
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "Made a figure illustrating the SDSS $1 $2 mask: $eps"
|
||||
echo "Type \"ggv $eps\" or \"gv $eps\" to view the figure."
|
||||
###uncomment to automatically plot usng the sm script -- sm tends to get overloaded with the SDSS mask
|
||||
# elif which sm >/dev/null 2>&1 ; then
|
||||
# echo "Using Supermongo to plot the SDSS $1 $2 mask:"
|
||||
# $MANGLESCRIPTSDIR/graphmasksm.sh $grph $eps 0 0 0 0 "Completeness mask for SDSS $sample $cuts"
|
||||
# if [ $? -eq 0 ]; then
|
||||
# echo "Made a figure illustrating the SDSS $1 $2 mask: $eps"
|
||||
# echo "Type \"ggv $eps\" or \"gv $eps\" to view the figure."
|
||||
# echo "A script is also available to plot mangle files Matlab (with the mapping toolbox),"
|
||||
# echo "or you can plot $grph using your own favorite plotting tool."
|
||||
# fi
|
||||
else
|
||||
echo "Scripts are available for plotting mangle polygons in Matlab"
|
||||
echo "(with the mapping toolbox) or Supermongo, or you can plot $grph"
|
||||
echo "using your own favorite plotting tool."
|
||||
fi
|
||||
###uncomment to automatically plot usng the sm script -- sm tends to get overloaded with the SDSS mask
|
||||
#elif which sm >/dev/null 2>&1 ; then
|
||||
# echo "Using Supermongo to plot the SDSS $1 $2 mask:"
|
||||
# $MANGLESCRIPTSDIR/graphmasksm.sh $grph $eps 0 0 0 0 "Completeness mask for SDSS $sample $cuts"
|
||||
# if [ $? -eq 0 ]; then
|
||||
# echo "Made a figure illustrating the SDSS $1 $2 mask: $eps"
|
||||
# echo "Type \"ggv $eps\" or \"gv $eps\" to view the figure."
|
||||
# echo "A script is also available to plot mangle files Matlab (with the mapping toolbox),"
|
||||
# echo "or you can plot $grph using your own favorite plotting tool."
|
||||
# fi
|
||||
else
|
||||
echo "Scripts are available for plotting mangle polygons in Matlab"
|
||||
echo "(with the mapping toolbox) or Supermongo, or you can plot $grph"
|
||||
echo "using your own favorite plotting tool."
|
||||
fi
|
||||
|
||||
rm jw jfhs jfhp jfh jb
|
152
masks/sdss/sdss_quickstart.sh
Executable file
152
masks/sdss/sdss_quickstart.sh
Executable file
|
@ -0,0 +1,152 @@
|
|||
#! /bin/sh
|
||||
# © M E C Swanson 2008
|
||||
#Example script showing how to combine the hole and window functions for SDSS
|
||||
#Calculates mask for one of the equitorial slices of SDSS
|
||||
#type "sdss_quickstart.sh" and see what happens!
|
||||
|
||||
if [ "$MANGLEBINDIR" = "" ] ; then
|
||||
MANGLEBINDIR="../../bin"
|
||||
fi
|
||||
if [ "$MANGLESCRIPTSDIR" = "" ] ; then
|
||||
MANGLESCRIPTSDIR="../../scripts"
|
||||
fi
|
||||
if [ "$MANGLEDATADIR" = "" ] ; then
|
||||
MANGLEDATADIR="../../masks"
|
||||
fi
|
||||
|
||||
sample='dr6'
|
||||
cuts='safe0'
|
||||
|
||||
user=`whoami`
|
||||
names=`finger $user | fgrep "ame:" | sed 's/.*: *\([^ ]*\)[^:]*/\1/'`
|
||||
for name in ${names}; do break; done
|
||||
echo "Hello $name, watch me combine the window function and holes for the SDSS survey."
|
||||
|
||||
# to make verbose
|
||||
quiet=
|
||||
# to make quiet
|
||||
#quiet=-q
|
||||
|
||||
#to assign new id numbers
|
||||
old=
|
||||
#to keep old id numbers
|
||||
#old=-vo
|
||||
|
||||
#to pixelize dynamically
|
||||
pix=
|
||||
restag=
|
||||
#to pixelize everything to fixed resolution
|
||||
#scheme="d"
|
||||
#res=6
|
||||
#pix="-P${scheme}0,${res}"
|
||||
#restag="_res${res}${scheme}"
|
||||
|
||||
#uncomment this to put files from different releases in individual directories
|
||||
#filedir=$MANGLEDATADIR/sdss/$sample/$cuts/
|
||||
#cd $filedir
|
||||
|
||||
# name of output file to contain sdss polygons
|
||||
pol=sdss_${sample}${cuts}${restag}_slice.pol
|
||||
grph=sdss_${sample}${cuts}${restag}_slice.grph
|
||||
list=sdss_${sample}${cuts}${restag}_slice.list
|
||||
eps=sdss_${sample}${cuts}${restag}_slice.eps
|
||||
eps1=sdss_${sample}${cuts}${restag}_slice1.eps
|
||||
eps2=sdss_${sample}${cuts}${restag}_slice2.eps
|
||||
fields=window.${sample}${cuts}.slice.ply
|
||||
mask=mask.${sample}${cuts}.slice.ply
|
||||
holes=holes.${sample}${cuts}.slice.ply
|
||||
|
||||
echo 0 > jw
|
||||
echo "$MANGLEBINDIR/weight -zjw $mask $holes"
|
||||
$MANGLEBINDIR/weight -zjw $mask $holes
|
||||
|
||||
echo "$MANGLEBINDIR/snap -S $quiet $fields $holes jfhs"
|
||||
$MANGLEBINDIR/snap -S $quiet $fields $holes jfhs || exit
|
||||
echo "$MANGLEBINDIR/pixelize $quiet $old $pix jfhs jfhp"
|
||||
$MANGLEBINDIR/pixelize $quiet $old $pix jfhs jfhp || exit
|
||||
echo "$MANGLEBINDIR/snap $quiet $old jfhp jfh"
|
||||
$MANGLEBINDIR/snap $quiet $old jfhp jfh || exit
|
||||
echo "$MANGLEBINDIR/balkanize $quiet $old jfh jb"
|
||||
$MANGLEBINDIR/balkanize $quiet $old jfh jb || exit
|
||||
echo "$MANGLEBINDIR/unify $quiet $old jb $pol"
|
||||
$MANGLEBINDIR/unify $quiet $old jb $pol || exit
|
||||
|
||||
echo "Polygons for the example slice of SDSS $sample $cuts are in $pol"
|
||||
|
||||
# Graphics
|
||||
|
||||
# number of points per (2 pi) along each edge of a polygon
|
||||
pts_per_twopi=30
|
||||
|
||||
echo "$MANGLEBINDIR/poly2poly -og$pts_per_twopi $quiet $pol $grph"
|
||||
$MANGLEBINDIR/poly2poly -og$pts_per_twopi $quiet $pol $grph || exit
|
||||
echo "Data suitable for plotting polygons for the example slice of the SDSS $sample $cuts mask are in $grph:"
|
||||
echo "each line is a sequence of az, el points delineating the perimeter of a polygon."
|
||||
|
||||
# for plotting with the matlab script
|
||||
|
||||
if which matlab >/dev/null 2>&1 ; then
|
||||
# name of output file to contain matlab graphics
|
||||
|
||||
echo "$MANGLEBINDIR/poly2poly -ol$pts_per_twopi $quiet $pol $list"
|
||||
$MANGLEBINDIR/poly2poly -ol$pts_per_twopi $quiet $pol $list || exit
|
||||
echo "Data for plotting polygons for the example slice of the SDSS $sample $cuts mask in Matlab are in $list."
|
||||
echo "Using Matlab to plot the example slice of the SDSS $sample $cuts mask ..."
|
||||
echo "$MANGLESCRIPTSDIR/graphmask.sh $list $eps"
|
||||
$MANGLESCRIPTSDIR/graphmask.sh $list $eps -45 35 8 21 "Completeness mask for slice of SDSS $sample $cuts"
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "Made a figure illustrating example slice of the SDSS $sample $cuts mask: $eps"
|
||||
echo "Type \"ggv $eps\" or \"gv $eps\" to view the figure."
|
||||
elif which sm >/dev/null 2>&1 ; then
|
||||
echo "$MANGLEBINDIR/poly2poly -og12 -p3 $quiet $pol $grph"
|
||||
$MANGLEBINDIR/poly2poly -og10 -p3 $quiet $pol $grph || exit
|
||||
echo "Data suitable for plotting polygons for the example slice of the SDSS $sample $cuts mask are in $grph:"
|
||||
echo "each line is a sequence of az, el points delineating the perimeter of a polygon."
|
||||
echo "Using Supermongo to plot the example slice of the SDSS $sample $cuts mask:"
|
||||
$MANGLESCRIPTSDIR/graphmasksm.sh $grph $eps1 0 35 0 0 "Completeness mask for slice of SDSS $sample $cuts"
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "Made a figure of half of the example slice of the SDSS $sample $cuts mask: $eps1"
|
||||
echo "Type \"ggv $eps1\" or \"gv $eps1\" to view the figure."
|
||||
echo "A script is also available to plot mangle files Matlab (with the mapping toolbox),"
|
||||
echo "or you can plot $grph using your own favorite plotting tool."
|
||||
fi
|
||||
$MANGLESCRIPTSDIR/graphmasksm.sh $grph $eps2 315 360 0 0 "Completeness mask for slice of SDSS $sample $cuts"
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "Made a figure of the other half of the example slice of the SDSS $sample $cuts mask: $eps2"
|
||||
echo "Type \"ggv $eps2\" or \"gv $eps2\" to view the figure."
|
||||
echo "A script is also available to plot mangle files Matlab (with the mapping toolbox),"
|
||||
echo "or you can plot $grph using your own favorite plotting tool."
|
||||
fi
|
||||
else
|
||||
echo "Scripts are available for plotting mangle polygons in Matlab"
|
||||
echo "(with the mapping toolbox) or Supermongo, or you can plot $grph"
|
||||
echo "using your own favorite plotting tool."
|
||||
fi
|
||||
elif which sm >/dev/null 2>&1 ; then
|
||||
echo "$MANGLEBINDIR/poly2poly -og12 -p3 $quiet $pol $grph"
|
||||
$MANGLEBINDIR/poly2poly -og10 -p3 $quiet $pol $grph || exit
|
||||
echo "Data suitable for plotting polygons for the example slice of the SDSS $sample $cuts mask are in $grph:"
|
||||
echo "each line is a sequence of az, el points delineating the perimeter of a polygon."
|
||||
echo "Using Supermongo to plot the example slice of the SDSS $sample $cuts mask:"
|
||||
$MANGLESCRIPTSDIR/graphmasksm.sh $grph $eps1 0 35 0 0 "Completeness mask for slice of SDSS $sample $cuts"
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "Made a figure of half of the example slice of the SDSS $sample $cuts mask: $eps1"
|
||||
echo "Type \"ggv $eps1\" or \"gv $eps1\" to view the figure."
|
||||
echo "A script is also available to plot mangle files Matlab (with the mapping toolbox),"
|
||||
echo "or you can plot $grph using your own favorite plotting tool."
|
||||
fi
|
||||
$MANGLESCRIPTSDIR/graphmasksm.sh $grph $eps2 315 360 0 0 "Completeness mask for slice of SDSS $sample $cuts"
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "Made a figure of the other half of the example slice of the SDSS $sample $cuts mask: $eps2"
|
||||
echo "Type \"ggv $eps2\" or \"gv $eps2\" to view the figure."
|
||||
echo "A script is also available to plot mangle files Matlab (with the mapping toolbox),"
|
||||
echo "or you can plot $grph using your own favorite plotting tool."
|
||||
fi
|
||||
echo "Using Supermongo to plot the example slice of the SDSS $sample $cuts mask:"
|
||||
else
|
||||
echo "Scripts are available for plotting mangle polygons in Matlab"
|
||||
echo "(with the mapping toolbox) or Supermongo, or you can plot $grph"
|
||||
echo "using your own favorite plotting tool."
|
||||
fi
|
||||
|
||||
rm jw jfhs jfhp jfh jb
|
Loading…
Add table
Add a link
Reference in a new issue