########################################################################
###   Script for cutting the SCI and its adjacent rows               ###
###   This file can be applied to the SCI data in normal mode        ###
###   without any option                                             ###
###                                                                  ###
###   2007-04-04  created by H. Uchiyama (Kyoto Univ.)               ###
########################################################################
#!/bin/csh -f

if ( $#argv != 2 ) then
    echo "Usage   : cut3rows.csh <input filename> <output filename>"
    echo "Example : unix% ./cut3rows.csh input.evt output_cut3rows.evt"
    exit 1
endif

fselect $1+1  $2 "(0 < acty && acty < 51) || ( 53 < acty && acty < 105 ) || ( 107 < acty && acty < 159 ) || ( 161 < acty && acty < 213 ) || ( 215 < acty && acty < 267 ) || ( 269 < acty && acty < 321 ) || ( 323 < acty && acty < 375 ) || ( 377 < acty && acty < 429 ) || ( 431 < acty && acty < 483 ) || ( 485 < acty && acty < 537 ) || ( 539 < acty && acty < 591 ) || ( 593 < acty && acty < 645 ) || ( 647 < acty && acty < 699 ) || ( 701 < acty && acty < 753 ) || ( 755 < acty && acty < 807 ) || ( 809 < acty && acty < 861 ) || ( 863 < acty && acty < 915 ) || ( 917 < acty && acty < 969 ) || ( 971 < acty && acty < 1022 ) "
