Zmap Tiling at 18cm

Here are all the procedures needed to tile at 18cm

Proc 5-1

This procedure just creates all the Zmaps that will be used.

Here is the list of Zmaps to use. Make sure this file (MAPLIST.TXT) is in your working directory, or is a pointer to the list of Zmaps.

# Start in the working directory
cd <path>/F6-RFR/Bennu

#Prepare directory for running MAKE_TILES
mkdir ZINPTS

echo “0.00022       175   1.23400   5.00000” | MAKE_TILES

#This next set of lines will enable MAKE_TILES.b to be run using shell
rm -f MAKE_TILES_2.b 
while read line; do
if [ `echo $line | grep bigmap | wc -l` -ne 0 ]; then
echo $line >> MAKE_TILES_2.b
else
if [ `echo $line | grep -i showmap | wc -l` -eq 0 ]; then
echo "echo $line | /usr/local/bin/SHOWMAP" >> MAKE_TILES_2.b
fi
fi
done < MAKE_TILES.b
mv MAKE_TILES_2.b MAKE_TILES.b
y

#Run the updated MAKE_TILES.b in a shell
nohup sh MAKE_TILES.b

Proc 5-2

This procedure creates 4 directories to tile a quarter of the surface and leave a gap between each directory. The directories are name tile1, tile2, tile3, and tile4.

# Start in the SPC working directory
cd <path>/F6-RFR/Bennu

#Clean out any shape files created during a previous iteration
cd SHAPEFILES
rm –f TSHP*.TXT
cd ..


#clean working directory before starting
 sh rem_script.b
 rm -f TESTFILES/*
 rm -f TESTFILES1/*
 rm -f make_scriptT.in
 rm -f LMRKLIST1.TXT
 rm -f map_coverage.in
 rm -f temp.out

#back up one directory
cd ..

#Use rsync to make multiple copies of the SPC working directory
rsync -hapvP --exclude=IMAGEFILES --exclude=wk <working directory>/ tile1
rsync -hapvP --exclude=IMAGEFILES --exclude=wk <working directory>/ tile2
rsync -hapvP --exclude=IMAGEFILES --exclude=wk <working directory>/ tile3
rsync -hapvP --exclude=IMAGEFILES --exclude=wk <working directory>/ tile4

ln –s ../<working directory>/IMAGEFILES tile1/
ln –s ../<working directory>/IMAGEFILES tile2/
ln –s ../<working directory>/IMAGEFILES tile3/
ln –s ../<working directory>/IMAGEFILES tile4/

Proc 5-3(a through d)

This procedure will run the tiling process in the directory tile[1-4]. You can copy/paste the below text and update bigmapName each time, but instead I recommend using the ZmapTile.sh shell script. Be sure to update the "GSD" and "SCRIPT" before using this shell script! It will be called like so...

cd <tiling directory>
sh ~/bin/ZmapTile.sh ../MAPLISTtile1.TXT #MAPLISTtile1.TXT can be found below.

Here is the Zmap list for tile1 at 18cm

Here is the Zmap list for tile2 at 18cm

Here is the Zmap list for tile3 at 18cm

Here is the Zmap list for tile4 at 18cm

# Start in the tile<1> sub-directory
cd <path>/F6-RFR/Bennu dir>/tile1

 GSD=0.00018
 SCRIPT=XXX018.seed
 bigmapName=<map name>

echo $GSD > inputs
 echo $SCRIPT >> inputs
 echo $bigmapName >> inputs

 # Create a symbolic link to the Zmap used for tiling
 cd MAPFILES/
 rm -f XXXXXX.MAP
 ln -s $bigmapName.MAP XXXXXX.MAP
 cd ..

 #Setup tiling
 echo "XXXXXX" > map_coverage.in
 echo 0 >> map_coverage.in
 echo $GSD >> map_coverage.in
 map_coverage < map_coverage.in
 /opt/local/bin/convert coverage_m.pgm $bigmapName-beforeTiling.jpg
 echo "N" | make_tilefile | tee make_tilefile.out
 sed 1d make_tilefile.out > temp.out
 echo "XXXXXX" > make_scriptT.in
 echo "scripts/$SCRIPT" >> make_scriptT.in
 cat temp.out >> make_scriptT.in



 # Build the scripts
 make_scriptT

 # Run the scripts
 nohup sh run_script.b

 # When complete, save the results
 map_coverage < map_coverage.in
 /opt/local/bin/convert coverage_m.pgm $bigmapName-afterTiling.jpg
 find_nofitT | tee output
 mkdir steptile$bigmapName
 mv *INN *OOT output inputs *Tiling.jpg steptile$bigmapName

 # Once evaluation of new landmarks is complete and they are deemed "good" remove temporary files
 rm -f TESTFILES/*
 rm -f TESTFILES1/*

After the tiling is finished you will need to fix all the landmarks that have flags.

Proc 5-4

This procedure will be used to merge each of the tiled directories back into the main directory. This process takes awhile, so you should merge each tiling directory as it finishes.

# Start in the SPC directory
cd <path>/F6-RFR/Bennu dir>/

#Export landmarks in tile1 into a tar ball; do this whole procedure again for tile2 tile3 and tile4
cd tile<1>

#Fix any landmarks with errors
cat step*/output

mkdir -p NEW_FILES/LMKFILES
mkdir -p NEW_FILES/MAPFILES
/usr/local/bin/EXPORT

sh EXPORT.TXT

mv -f NEW_FILES.TAR ../<working directory>/
cd ../<working directory>/

rm -r NEW_FILES
tar -xf NEW_FILES.TAR
/usr/local/bin/IMPORT

cp NEWLIST.TXT make_script.in
y

# runs overlaps on all the new maplets
echo n > make_scriptF.seed
echo n >> make_scriptF.seed
echo g >> make_scriptF.seed
echo u >> make_scriptF.seed
echo 1 >> make_scriptF.seed
echo o >> make_scriptF.seed
echo RECENT >> make_scriptF.seed
echo n >> make_scriptF.seed
echo 1 >> make_scriptF.seed
echo q >> make_scriptF.seed
echo END >> make_scriptF.seed
 
sh rem_script.b
rm -f TESTFILES/*
rm -f TESTFILES1/*
make_scriptF
nohup sh run_script.b

#When complete, save the results
find_nofit | tee output
mkdir steptile<1>
mv *INN *OOT output steptile<1>

# Once evaluation of new landmarks is complete and they are deemed “good” remove temporary files
rm -f TESTFILES/*
rm -f TESTFILES1/*

Proc 5-3e

No I did not make a typo! Proc 5-3e follows Proc 5-4. 5-3e is tiling the gaps between each of the tiling directories. Procedures are the same as 5-3 a through d.

Here is the Zmap list for final tiling at 18cm

Fix any landmarks that throw a flag.

Proc 5-4

Now we export and import each tiling directory, and then run make_scriptF to run overlaps and limbs so all landmarks are tied together in the working directory.

# Start in the SPC directory
cd <path>/F6-RFR/Bennu dir>/

#Export landmarks in tile1 into a tar ball; do this whole procedure again for tile2 tile3 and tile4
cd tile<1>

#Fix any landmarks with errors
cat step*/output

mkdir -p NEW_FILES/LMKFILES
mkdir -p NEW_FILES/MAPFILES
/usr/local/bin/EXPORT

sh EXPORT.TXT

mv -f NEW_FILES.TAR ../<working directory>/
cd ../<working directory>/

rm -r NEW_FILES
tar -xf NEW_FILES.TAR
/usr/local/bin/IMPORT

cp NEWLIST.TXT make_script.in
y

# runs overlaps on all the new maplets
echo n > make_scriptF.seed
echo n >> make_scriptF.seed
echo g >> make_scriptF.seed
echo u >> make_scriptF.seed
echo 1 >> make_scriptF.seed
echo o >> make_scriptF.seed
echo RECENT >> make_scriptF.seed
echo n >> make_scriptF.seed
echo 1 >> make_scriptF.seed
echo q >> make_scriptF.seed
echo END >> make_scriptF.seed
 
sh rem_script.b
rm -f TESTFILES/*
rm -f TESTFILES1/*
make_scriptF
nohup sh run_script.b

#When complete, save the results
find_nofit | tee output
mkdir steptile<1>
mv *INN *OOT output steptile<1>

# Once evaluation of new landmarks is complete and they are deemed “good” remove temporary files
rm -f TESTFILES/*
rm -f TESTFILES1/*

Check RESIDUALS for any errors, fix them, and do an iteration and the block is complete.

End result will look like this.

coverage_18cm.jpg

Procedure for Tiling at 18cm (last edited 2016-09-19 08:22:54 by JohnWeirich)