You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adrian Quintana edited this page Dec 11, 2017
·
1 revision
#!/bin/sh # convert coordinates to extract images after changing pixel size
INPUT=$#
case $INPUT in # if not enough data show help 0|1|2) echo "$0 final_pos_file_folder(s) original_downsampling_factor new_downsampling_factor" echo "Important: do not forget the "" when using wildcards in the input file name" echo "Run this from Preprocessing directory"
CHANGE AS NEEDED directory_with_oldposfiles=Old_pos_files
for posfile in $original_pos_file_name ; do oldposfile=$directory_with_oldposfiles/down$original_downsampling_factor"$posfile.raw.Common.pos" newposfile=$posfile/down$new_downsampling_factor"$posfile.raw.Common.pos"
echo "Scaling file $oldposfile into $newposfile with factor $2/$3" cat $oldposfile | grep -v position | awk '{printf "d\n", $1*'$2'/'$3'., $2*'$2'./'$3'.}' > $newposfile