Next Previous Contents

4. RAW 2 SPLIT

4.1 RAW 2 CLEAN

RAW Datafiles are in a unoptimized format, to clean them and adjust the file format for next steps SJBclean has to be used. SJBclean can be obtained from here.

4.2 CLEAN 2 SPLIT

The cleaned RAW Datafiles can now be splittet into single frequency by applying SJBsplit. SJBsplit can be obtained from here.

4.3 RAW 2 SPLIT

The following script shows a way to combine the steps mentioned above by using unix pipes.

#! /bin/bash
# clean Raw Data Files and split files into single frequency
# calls "sjbclean" and "sjbsplit"
# $1 is first frequency (eg: "1")
# $2 is take every $2 frequency (eg: "15")
# $3 is stop at that frequency (eg: "250")
#
# output: ./split/*.000 to *.255

mkdir ./split

for FILE in *.frq.*.bz2
do
  echo SJBclean FRQ /tmp/SJBclean, SJBsplit $FILE
  bunzip2 -k -c $FILE | sjbclean FRQ /temp/SJBclean | sjbsplit $FILE
  COUNTER=$1
  while [  $COUNTER -lt $3 ]; do
    cat $FILE.$COUNTER.temp | bzip2 >./split/$FILE.$COUNTER
#    rm $FILE.$COUNTER.temp
    let COUNTER=COUNTER+$2
  done
  COUNTER=0
  while [  $COUNTER -lt 256 ]; do
    rm $FILE.$COUNTER.temp
    let COUNTER=COUNTER+1
  done
done
# do not forget to remove not needed frequencys from ./split
rm /temp/SJBclean.1


Next Previous Contents