MAPTRANS

Description

These tools will allow you to visualize individual maplet translations.

getMapl.sh

Input Files

{X} BEFORE running getMapl.sh, build a bigmapof the region you wish to study, and run RESIDUALS. USED_MAPS.TXTand MAPINFO.TXTneed to be up to date. getMapl.sh should be run from your working directory.

Here's a sample input:

sh getMapl.shInput region name. (ex: TAG1)>TAG1

Output Files

TAG1mapl.txt

Temp Files

.o

.oo

Script File

File: getMapl.sh #!/bin/bash######################### USAGE: sh getMapl.sh ## #########################echo "Input region name. (ex: TAG1)"read ansfile=$anscp USED_MAPS.TXT .osed '$d' .o > .oolist=`cat .oo`for i in $listdo grep $i MAPINFO.TXT >> ${file}mapl.txtdonerm .o .oo

calTrans.sh

Input Files

/!\ This should also be run from your working directory, and requires the output file from

getMapl.sh to be in that directory.

Here's a sample input:

sh calTrans.shInput region name. (ex: TAG1)>TAG1Input TAG1 mapinfo list. (ex: TAG1mapl.txt)>TAG1mapl.txt

Output files

TAG1.txt

Temp Files

CompOBJ.out

fit

*.obj

For each maplet within the bigmap that was created earlier, an .obj file is made. one at a time, and then delteted.

Script File

File: calTrans.sh #!/bin/bash########################################### USAGE: sh calTrans.sh ## ## N.B. You must have your region mapinfo ## file in your working directory. ###########################################echo "Input region name. (ex: TAG1)"read ans1file=$ans1echo "Input $ans1 mapinfo list. (ex: TAG1mapl.txt)"read ans2mapl=$ans2list=`cat $mapl | cut -c -6`mv -f $file.txt old.$file.txtfor i in $listdo Maplet2FITS MAPFILES/$i.MAP fit FITS2OBJ --local fit $i.obj rm fit CompareOBJ --compute-optimal-translation $i.obj SHAPEFILES/shape3.4-truth.obj > CompOBJ.out rm $i.obj trans=`awk '/Translation/{print $2 " " $3 " " $4}' CompOBJ.out` coord=`grep $i $mapl | awk '{print $4 " " $5 " " $6}'` printf "\n$i $coord $trans" >> $file.txtdonerm CompOBJ.out

plotVectors.sh

=== Input Files ====

/!\ Run this from your working directory, and keep the output from calTrans.sh there too.

Here's a sample input:

sh plotVectors.shInput region name. (ex: TAG1)>TAG1Input view Scaling factor. (ex: 1.5)>1.5

Output Files

TAG1xyzV[000:015:165].png

TAG1vec.gif

Temp Files

pvTrans.gpi

Script File

File: plotVectors.sh #!/bin/bash####################################### USAGE: sh plotVectors.sh ## ## N.B. You must have the output from ## calTrans.sh in your working ## directory. #######################################echo "Input region name. (ex: TAG1)"read ans1file=$ans1echo "Input view scaling factor. (ex: 1.5)"read ans2fac=$ans2scale=0.00436 # Conversion from LON to m, change if r mag deviates from 0.25km #list='0 15 30 45 60 75 90 105 120 135 150 165'list2='000 015 030 045 060 075 090 105 120 135 150 165'arr=($list2)cnt=0for i in $listdo echo "set term x11" > pvTrans.gpi echo "unset key" >> pvTrans.gpi echo "unset border" >> pvTrans.gpi echo "unset xtics" >> pvTrans.gpi echo "unset ytics" >> pvTrans.gpi echo "unset ztics" >> pvTrans.gpi echo "scale="$scale >> pvTrans.gpi echo "fac="$fac >> pvTrans.gpi echo "set view 86,"$i",," >> pvTrans.gpi echo "splot '"$file".txt' using ((360-\$3)*scale):(\$2*scale):4:(\$5*fac):(\$6*fac):(\$7*fac) with vectors" >> $ echo " " >> pvTrans.gpi echo "set output '"$file"xyzV"${arr[$cnt]}".png'" >> pvTrans.gpi echo "set term png" >> pvTrans.gpi echo "replot" >> pvTrans.gpi echo "unset output" >> pvTrans.gpi gnuplot < pvTrans.gpi cnt=$(($cnt+1))donerm pvTrans.gpiconvert -delay 50 -loop 0 ${file}xyzV*.png ${file}vec.gif