#!/bin/sh
#
#      $HOME/.lcmodel/marconi/preprocessors/new-press   (20 April 2003)
#
#      Searches the extraInfo file (which is output from bin2raw).  
# If seq='PRESS', then the DEGPPM value in cpStart is replaced with value of 
# DEGPPM_NEW_PRESS (set below).
#
#      You must set DEGPPM_NEW_PRESS to the expected value of the first-order
# phase correction (in dg/ppm) for your PRESS sequence (usually 2.5 for the 
# newer PRESS sequences).  There must be no white space on either side of the
# "=":
#
DEGPPM_NEW_PRESS=2.5
#
#     Normally you do not have to read anything further in this script.  If
# you want to modify or write your own preprocessor, then see the General
# Instructions in $HOME/.lcmodel/doc/preprocessors/README.txt
#
#=============================================================================
#=============================================================================
#
CP_START="$1"
EXTRA_INFO="$2"
SEQ=`awk '/^seq/ { print $2 }' $EXTRA_INFO`
if [ "$SEQ" = PRESS ]
then
     echo "degppm= $DEGPPM_NEW_PRESS" >> $CP_START
fi
exit 0
