# MAS CSA spectrum of a single nuclei
# Uses direct calculation of propagators

# 212 sec on a 166 MHz Pentium II w/Linux

spinsys {
    nuclei 1H
    channels 1H
    shift 1 5p 13p 0.25 0 0 0
}

par {
    start_operator   I1x
    detect_operator  I1p
    spin_rate        500
    gamma_angles     40
    sw               gamma_angles*spin_rate
    crystal_file     rep168
    np               256
    proton_frequency 400e6
}

proc pulseq {} {
    global par

    maxdt 1

    set tdwell [expr 1.0e6/$par(sw)]
    acq
    for {set i 1} {$i < $par(np)} {incr i} {     
        delay $tdwell
        acq
    }
}

proc main {} {
    global par

    set f [fsimpson]
    fsave $f $par(name).fid
    fzerofill $f 8192
    faddlb $f 100 0
    fft $f
    fsave $f $par(name).spe
}
